From a7ffd6e0f91fedd47e743d59bfc1ae875a72cec5 Mon Sep 17 00:00:00 2001 From: "Elijah C. Voigt" Date: Sun, 3 Mar 2024 21:07:52 -0800 Subject: [PATCH] Button images rough implementation Tuning font sizing and need to add font changes upon interaction --- assets/fonts/Neothic/Neothic.ttf | Bin 0 -> 36412 bytes assets/fonts/Neothic/OFL.txt | 93 ++++++++++++++ assets/images/Blank Button (Depressed).png | 3 + assets/images/Blank Button (Resting).png | 3 + assets/martian.tweak.toml | 17 ++- src/credits.rs | 53 +++++--- src/game.rs | 77 ++++++++--- src/menu.rs | 142 ++++++++++++++++----- src/tutorial.rs | 68 +++++++--- src/tweak.rs | 2 + src/ui.rs | 24 +++- 11 files changed, 389 insertions(+), 93 deletions(-) create mode 100644 assets/fonts/Neothic/Neothic.ttf create mode 100644 assets/fonts/Neothic/OFL.txt create mode 100644 assets/images/Blank Button (Depressed).png create mode 100644 assets/images/Blank Button (Resting).png diff --git a/assets/fonts/Neothic/Neothic.ttf b/assets/fonts/Neothic/Neothic.ttf new file mode 100644 index 0000000000000000000000000000000000000000..1323e1aeeafec866ca9f6804cd1390d452586333 GIT binary patch literal 36412 zcmeHw33yb;m2TDT+btom(7qxh(TJvzg^*gUm6p&#OSFU#tyV|DvV;JM9kB*0GAINC zQ7{;6Y#eY1A;hC03`2;YgB^m`gm}S(VHn0kJPGld#N$Wu96tx7+wVW8Z%fVMEbp7i zWWJ9p^?&Qut*UeC)Tydd%e_}fAw&c~6{4zfMm4T*@uf7JL#wN%JH>Hf!1Y92Csa4g zYP24mso{E>5O=*^-Ply|uem>u6JqBm+@CV5F*|o-*P`)A;w!kGJAZlmO7knpGm!W) zAr#NT_BAVgK29$I_d^#h>+XEy%oi@g3F_W~MIG%6l78J}Mtn*ye-S()szWa0x(e6h z7cF0VpZoB5Bd$L{dS71Jv3kY*KkWIL5N)`f)V!=~etYGobHao$Jx_6#x8Ju?{GC_@ z_aX#HThYF}(Ou&{qYVL){b$2@(Wyisw|Yd1q-+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0gw!F}nCmv?DE`9T-Op*T8^2rQM_=-RGeXdWd2C>H!gyK=EnR^USOwE)9md!9!4T}h=oaHu zl);xV;@gTb)q^}9+J$k+9^_=NP(tpfwl3swXcXok>C4T3`Ei)m$$aV{7wchm ztiRpt^BJjPx0k?Pl%V5QAHG?{I3p_s7WKQ-}YG z5WAG<2=d|UVOSS%VqSPA)^7#sj(!aJ;Z5FY2C)>l<$;pDdy%~_!IQ*OZ}kzS9IL!qX+ooCn`(de&3I=0{`b8 zxqogzq`U$e_zcd^__q4y`!-^|edxgI{U157>W%{|pZbBdc!3p#+Zl!(2c?&7aXuPKkJ|`xeD#7?*P`I1y-Pg4p?2cIj}aYAHMJScKg1KHQ_&T zV7-`*`acmY_;#27!gm&{$u6uS2OradFNWOT^t*hoVTE}$R+j%{>0`y2j#c>K`%2Ji zyiV~?96_x>a7ewpY4l-6?=G;uHyQTe6tn>&F{f1lo2Lr7PXQe-Rs$tM$pg0*p)aXmo^yfdvv)h0f6S}5fG%N=r@<4Nh0dC^J5&ikk3G5yPYIIG%7@b!W fxFudC=!aoSXz~qXxda}6(O3>IFu~97!ukIJh``0a literal 0 HcmV?d00001 diff --git a/assets/fonts/Neothic/OFL.txt b/assets/fonts/Neothic/OFL.txt new file mode 100644 index 0000000..f435ed8 --- /dev/null +++ b/assets/fonts/Neothic/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/assets/images/Blank Button (Depressed).png b/assets/images/Blank Button (Depressed).png new file mode 100644 index 0000000..27c3819 --- /dev/null +++ b/assets/images/Blank Button (Depressed).png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8a138c799b96fbd64707f17784a243f39986897cc9c1d5db528141d5e814f58 +size 65219 diff --git a/assets/images/Blank Button (Resting).png b/assets/images/Blank Button (Resting).png new file mode 100644 index 0000000..69f598e --- /dev/null +++ b/assets/images/Blank Button (Resting).png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91a8e710ce6731bcf2530bddaa55529e81a8b126250b01bfb22f6e28f523e59c +size 63413 diff --git a/assets/martian.tweak.toml b/assets/martian.tweak.toml index 8e2ae6a..f6fd2c6 100644 --- a/assets/martian.tweak.toml +++ b/assets/martian.tweak.toml @@ -7,9 +7,9 @@ text = """ An Icehouse game by Andrew Looney -Art by Sam Hall +Art: Sam Hall -Programming by Elijah Voigt +Programming: Elijah Voigt --- @@ -25,13 +25,15 @@ FMOD/FMOD Studio: fmod.com Image Textures retrieved from textures.com: -Concrete Energy Pole - https://www.textures.com/download/PBR0340/136381 +Concrete Energy Pole: https://www.textures.com/download/PBR0340/136381 -Space Blanket Folds - https://www.textures.com/download/PBR0152/133187 +Space Blanket Folds: https://www.textures.com/download/PBR0152/133187 Background 2D art by NASA: LINK HERE -Silkscreen Font by Jason Kottke - https://www.kottke.org/plus/type/silkscreen/ +Silkscreen Font by Jason Kottke: https://www.kottke.org/plus/type/silkscreen/ + +Neothic Font by Daymarius: https://www.dafont.com/neothic.font """ ### @@ -115,6 +117,11 @@ end = ["Ok, now move some pieces somewheres!"] x = 640 y = 480 +[buttons] +image_resting = "images/Blank Button (Resting).png" +image_depressed = "images/Blank Button (Depressed).png" +font = "fonts/Neothic/Neothic.ttf" + ######################################################################### # Audio settings ######################################################################### diff --git a/src/credits.rs b/src/credits.rs index bd17177..8e6dd59 100644 --- a/src/credits.rs +++ b/src/credits.rs @@ -4,7 +4,7 @@ pub(crate) struct CreditsPlugin; impl Plugin for CreditsPlugin { fn build(&self, app: &mut App) { - app.add_systems(Startup, init_credits_ui) + app.add_systems(OnExit(GameState::Loading), init_credits_ui) .add_systems(OnEnter(GameState::Credits), update_credits); } } @@ -12,7 +12,15 @@ impl Plugin for CreditsPlugin { #[derive(Debug, Component)] struct Credits; -fn init_credits_ui(mut commands: Commands) { +fn init_credits_ui( + mut commands: Commands, + tweaks_file: Res, + tweaks: Res>, +) { + let tweak = tweaks.get(tweaks_file.handle.clone()).expect("Load tweaks"); + let button_handle = tweak.get_handle::("buttons_image_resting").unwrap(); + let font_handle = tweak.get_handle::("buttons_font").unwrap(); + commands .spawn(( GameState::Credits, @@ -39,7 +47,7 @@ fn init_credits_ui(mut commands: Commands) { padding: UiRect::all(Val::Px(25.0)), ..default() }, - background_color: Color::BLACK.with_a(0.5).into(), + background_color: Color::BLACK.into(), ..default() }, )) @@ -67,25 +75,36 @@ fn init_credits_ui(mut commands: Commands) { margin: UiRect::all(Val::Px(5.0)), ..default() }, - background_color: Color::ORANGE.with_a(0.5).into(), + image: UiImage { + texture: button_handle.clone(), + ..default() + }, ..default() }, )) .with_children(|parent| { - parent.spawn(TextBundle { - text: Text { - sections: vec![TextSection { - value: "Back".into(), - style: TextStyle { - color: Color::BLACK, - font_size: 32.0, - ..default() - }, - }], + parent.spawn( + TextBundle { + text: Text { + sections: vec![ + TextSection { + value: "B a c k".into(), + style: TextStyle { + color: Color::WHITE, + font_size: 12.0, + font: font_handle.clone(), + }, + } + ], + ..default() + }, + style: Style { + margin: UiRect::all(Val::Px(20.0)), + ..default() + }, ..default() - }, - ..default() - }); + } + ); }); }); } diff --git a/src/game.rs b/src/game.rs index c1c9e2d..a6d794d 100644 --- a/src/game.rs +++ b/src/game.rs @@ -596,7 +596,16 @@ fn check_endgame(board: Res, mut next_state: ResMut> } } -fn set_endgame(score: Res, mut commands: Commands) { +fn set_endgame( + score: Res, + mut commands: Commands, + tweaks_file: Res, + tweaks: Res>, +) { + let tweak = tweaks.get(tweaks_file.handle.clone()).expect("Load tweaks"); + let button_handle = tweak.get_handle::("buttons_image_resting").unwrap(); + let font_handle = tweak.get_handle::("buttons_font").unwrap(); + commands .spawn(( Endgame, @@ -663,19 +672,36 @@ fn set_endgame(score: Res, mut commands: Commands) { margin: UiRect::all(Val::Px(5.0)), ..default() }, - background_color: Color::ORANGE.with_a(0.5).into(), + image: UiImage { + texture: button_handle.clone(), + ..default() + }, ..default() }, )) .with_children(|parent| { - parent.spawn((TextBundle::from_section( - "New Game", - TextStyle { - color: Color::BLACK, - font_size: 32.0, + parent.spawn( + TextBundle { + text: Text { + sections: vec![ + TextSection { + value: "N e w G a m e".into(), + style: TextStyle { + color: Color::WHITE, + font_size: 16.0, + font: font_handle.clone(), + }, + } + ], + ..default() + }, + style: Style { + margin: UiRect::all(Val::Px(20.0)), + ..default() + }, ..default() - }, - ),)); + } + ); }); // Quit button @@ -689,19 +715,36 @@ fn set_endgame(score: Res, mut commands: Commands) { margin: UiRect::all(Val::Px(5.0)), ..default() }, - background_color: Color::ORANGE.with_a(0.5).into(), + image: UiImage { + texture: button_handle.clone(), + ..default() + }, ..default() }, )) .with_children(|parent| { - parent.spawn((TextBundle::from_section( - "Quit", - TextStyle { - color: Color::BLACK, - font_size: 32.0, + parent.spawn( + TextBundle { + text: Text { + sections: vec![ + TextSection { + value: "Q u i t".into(), + style: TextStyle { + color: Color::WHITE, + font_size: 16.0, + font: font_handle.clone(), + }, + } + ], + ..default() + }, + style: Style { + margin: UiRect::all(Val::Px(20.0)), + ..default() + }, ..default() - }, - ),)); + } + ); }); }); }); diff --git a/src/menu.rs b/src/menu.rs index 9f2f5f9..3870d7b 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -41,9 +41,17 @@ pub(crate) enum MenuState { #[derive(Debug, Component)] pub(crate) struct ButtonAction(pub S); -fn init_play_menu(mut commands: Commands) { +fn init_play_menu( + mut commands: Commands, + tweaks_file: Res, + tweaks: Res>, +) { info!("Initializing Play menu"); + let tweak = tweaks.get(tweaks_file.handle.clone()).expect("Load tweaks"); + let button_handle = tweak.get_handle::("buttons_image_resting").unwrap(); + let font_handle = tweak.get_handle::("buttons_font").unwrap(); + commands .spawn(( MenuState::On, @@ -84,19 +92,36 @@ fn init_play_menu(mut commands: Commands) { margin: UiRect::all(Val::Px(5.0)), ..default() }, - background_color: Color::ORANGE.with_a(0.5).into(), + image: UiImage { + texture: button_handle.clone(), + ..default() + }, ..default() }, )) .with_children(|parent| { - parent.spawn((TextBundle::from_section( - "Continue", - TextStyle { - color: Color::BLACK, - font_size: 32.0, + parent.spawn( + TextBundle { + text: Text { + sections: vec![ + TextSection { + value: "C o n t i n u e".into(), + style: TextStyle { + color: Color::WHITE, + font_size: 16.0, + font: font_handle.clone(), + }, + } + ], + ..default() + }, + style: Style { + margin: UiRect::all(Val::Px(20.0)), + ..default() + }, ..default() - }, - ),)); + } + ); }); // Tutorial button @@ -110,19 +135,36 @@ fn init_play_menu(mut commands: Commands) { margin: UiRect::all(Val::Px(5.0)), ..default() }, - background_color: Color::ORANGE.with_a(0.5).into(), + image: UiImage { + texture: button_handle.clone(), + ..default() + }, ..default() }, )) .with_children(|parent| { - parent.spawn((TextBundle::from_section( - "Tutorial", - TextStyle { - color: Color::BLACK, - font_size: 32.0, + parent.spawn( + TextBundle { + text: Text { + sections: vec![ + TextSection { + value: "T u t o r i a l".into(), + style: TextStyle { + color: Color::WHITE, + font_size: 16.0, + font: font_handle.clone(), + }, + } + ], + ..default() + }, + style: Style { + margin: UiRect::all(Val::Px(20.0)), + ..default() + }, ..default() - }, - ),)); + } + ); }); // Credits button @@ -136,19 +178,36 @@ fn init_play_menu(mut commands: Commands) { margin: UiRect::all(Val::Px(5.0)), ..default() }, - background_color: Color::ORANGE.with_a(0.5).into(), + image: UiImage { + texture: button_handle.clone(), + ..default() + }, ..default() }, )) .with_children(|parent| { - parent.spawn((TextBundle::from_section( - "Credits", - TextStyle { - color: Color::BLACK, - font_size: 32.0, + parent.spawn( + TextBundle { + text: Text { + sections: vec![ + TextSection { + value: "C r e d i t s".into(), + style: TextStyle { + color: Color::WHITE, + font_size: 16.0, + font: font_handle.clone(), + }, + } + ], + ..default() + }, + style: Style { + margin: UiRect::all(Val::Px(20.0)), + ..default() + }, ..default() - }, - ),)); + } + ); }); // Quit button @@ -162,19 +221,36 @@ fn init_play_menu(mut commands: Commands) { margin: UiRect::all(Val::Px(5.0)), ..default() }, - background_color: Color::ORANGE.with_a(0.5).into(), + image: UiImage { + texture: button_handle.clone(), + ..default() + }, ..default() }, )) .with_children(|parent| { - parent.spawn((TextBundle::from_section( - "Quit", - TextStyle { - color: Color::BLACK, - font_size: 32.0, + parent.spawn( + TextBundle { + text: Text { + sections: vec![ + TextSection { + value: "Q u i t".into(), + style: TextStyle { + color: Color::WHITE, + font_size: 16.0, + font: font_handle.clone(), + }, + } + ], + ..default() + }, + style: Style { + margin: UiRect::all(Val::Px(20.0)), + ..default() + }, ..default() - }, - ),)); + } + ); }); }); } diff --git a/src/tutorial.rs b/src/tutorial.rs index 06220ac..bbb0d68 100644 --- a/src/tutorial.rs +++ b/src/tutorial.rs @@ -85,6 +85,8 @@ fn initialize_tutorial( let background_hex = tweak.get::("tutorial_rgba_background").unwrap(); let text_visible_hex = tweak.get::("tutorial_rgba_visible").unwrap(); + let button_handle = tweak.get_handle::("buttons_image_resting").unwrap(); + let font_handle = tweak.get_handle::("buttons_font").unwrap(); // List of (state, lines) for tutorial steps [ @@ -235,19 +237,36 @@ fn initialize_tutorial( margin: UiRect::all(Val::Px(5.0)), ..default() }, - background_color: Color::ORANGE.with_a(0.5).into(), + image: UiImage { + texture: button_handle.clone(), + ..default() + }, ..default() }, )) .with_children(|parent| { - parent.spawn((TextBundle::from_section( - "Start Over", - TextStyle { - color: Color::BLACK, - font_size: 16.0, + parent.spawn( + TextBundle { + text: Text { + sections: vec![ + TextSection { + value: "R e s t a r t".into(), + style: TextStyle { + color: Color::WHITE, + font_size: 12.0, + font: font_handle.clone(), + }, + } + ], + ..default() + }, + style: Style { + margin: UiRect::all(Val::Px(20.0)), + ..default() + }, ..default() - }, - ),)); + } + ); }); parent @@ -261,19 +280,36 @@ fn initialize_tutorial( margin: UiRect::all(Val::Px(5.0)), ..default() }, - background_color: Color::ORANGE.with_a(0.5).into(), + image: UiImage { + texture: button_handle.clone(), + ..default() + }, ..default() }, )) .with_children(|parent| { - parent.spawn((TextBundle::from_section( - "Continue Game", - TextStyle { - color: Color::BLACK, - font_size: 16.0, + parent.spawn( + TextBundle { + text: Text { + sections: vec![ + TextSection { + value: "C o n t i n u e".into(), + style: TextStyle { + color: Color::WHITE, + font_size: 12.0, + font: font_handle.clone(), + }, + } + ], + ..default() + }, + style: Style { + margin: UiRect::all(Val::Px(20.0)), + ..default() + }, ..default() - }, - ),)); + } + ); }); }); } diff --git a/src/tweak.rs b/src/tweak.rs index e940798..e3fcc00 100644 --- a/src/tweak.rs +++ b/src/tweak.rs @@ -51,6 +51,8 @@ impl Tweaks { Some(load_context.load::(s).untyped()) } else if s.ends_with(".png") { Some(load_context.load::(s).untyped()) + } else if s.ends_with(".ttf") || s.ends_with(".otf") { + Some(load_context.load::(s).untyped()) } else { None } diff --git a/src/ui.rs b/src/ui.rs index 74dab46..1a061a8 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -69,22 +69,36 @@ fn manage_cursor( } fn interactive_button( - mut events: Query<(&mut BackgroundColor, &Interaction), (With