diff --git a/gui/assets/Junction-regular.otf b/gui/assets/Junction-regular.otf new file mode 100644 index 0000000..0fdc277 Binary files /dev/null and b/gui/assets/Junction-regular.otf differ diff --git a/gui/src/game/constants.rs b/gui/src/game/constants.rs index 80be2a7..83040c6 100644 --- a/gui/src/game/constants.rs +++ b/gui/src/game/constants.rs @@ -1,5 +1,4 @@ pub const WINDOW_TITLE: &str = "Solitaire Chess"; -pub const HEADING_TEXT: &str = "Solitaire Chess"; pub const VOLUME: f32 = 0.1; // Between 0 and 1 pub const SCREEN_HEIGHT_MIN: f32 = 200.0; pub const SCREEN_HEIGHT_MAX: f32 = 10000.0; @@ -25,6 +24,7 @@ pub const BUTTON_WIDTH_MULTIPLIER: f32 = 0.20; // Gap between the bottom of the row and the first row of buttons pub const BOTTOM_BUTTON_ROW_OFFSET_MULTIPLIER: f32 = 0.3; +pub const HEADING_TEXT: &str = "Solitaire Chess"; pub const RESET_BUTTON_TEXT: &str = "RESET"; pub const NEXT_BUTTON_TEXT: &str = "NEXT"; pub const RULES_BUTTON_TEXT: &str = "RULES"; diff --git a/gui/src/game/draw.rs b/gui/src/game/draw.rs index 556ac5b..ada7951 100644 --- a/gui/src/game/draw.rs +++ b/gui/src/game/draw.rs @@ -220,7 +220,7 @@ impl Game { }; draw_multiline_text_ex( rules, - self.board_rect.x + 0.05 * self.square_width, + self.board_rect.x + 0.5 * self.square_width, self.board_rect.y + 0.5 * (self.board_rect.h - measurement.height) - 2. * measurement.offset_y, Some(2.), diff --git a/gui/src/main.rs b/gui/src/main.rs index 64e4285..b9f505c 100644 --- a/gui/src/main.rs +++ b/gui/src/main.rs @@ -62,7 +62,7 @@ async fn init() -> Game { mode, }; - let font_ttf = include_bytes!("../assets/caskaydia.ttf"); + let font_ttf = include_bytes!("../assets/Junction-regular.otf"); let Ok(font) = load_ttf_font_from_bytes(font_ttf) else { panic!("Failed to load font"); }; diff --git a/tools/deploy.sh b/tools/deploy.sh index 363849e..d6cc089 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -1 +1 @@ -cargo build --target wasm32-unknown-unknown --release && scp target/wasm32-unknown-unknown/release/sol_chess.wasm potato@neophyte.me:~/site/games/sol_chess/. +cargo build -p sol_chess --target wasm32-unknown-unknown --release && scp target/wasm32-unknown-unknown/release/sol_chess.wasm potato@neophyte.me:~/site/games/sol_chess/. diff --git a/tools/scripts.sh b/tools/scripts.sh index 803afc3..9c79fb7 100644 --- a/tools/scripts.sh +++ b/tools/scripts.sh @@ -43,7 +43,7 @@ build_web() { echo "Archive directory: ${ARCHIVE_DIR}" set -x - cargo build --target wasm32-unknown-unknown ${BUILD_PROFILE_SWITCH} + cargo build -p ${BINARY_NAME} --target wasm32-unknown-unknown ${BUILD_PROFILE_SWITCH} set +x if [ $? -ne 0 ]; then echo "Wasm build failed"