Rename game input for spellbook to diary

This commit is contained in:
coffee-compiler 2024-08-25 20:45:26 +00:00 committed by Samuel Keiffer
parent 9971aa26a4
commit 3541d2871b
8 changed files with 28 additions and 27 deletions

View File

@ -66,6 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Crash when deleting entries from the server list. - Crash when deleting entries from the server list.
- Active buttons in repair equipment interface when missing requirements. - Active buttons in repair equipment interface when missing requirements.
- Ability to send trade requests to every entity. - Ability to send trade requests to every entity.
- Naming of entries in controls settings.
## [0.16.0] - 2024-03-30 ## [0.16.0] - 2024-03-30

View File

@ -41,7 +41,7 @@ gameinput-bag = Bag
gameinput-trade = Trade gameinput-trade = Trade
gameinput-social = Social gameinput-social = Social
gameinput-sit = Sit gameinput-sit = Sit
gameinput-spellbook = Spells gameinput-diary = Diary
gameinput-settings = Settings gameinput-settings = Settings
gameinput-respawn = Respawn gameinput-respawn = Respawn
gameinput-togglewield = Toggle Wield gameinput-togglewield = Toggle Wield

View File

@ -172,9 +172,9 @@ impl From<&crate::settings::GamepadSettings> for ControllerSettings {
map.entry(settings.game_buttons.crafting) map.entry(settings.game_buttons.crafting)
.or_default() .or_default()
.push(GameInput::Crafting); .push(GameInput::Crafting);
map.entry(settings.game_buttons.spellbook) map.entry(settings.game_buttons.diary)
.or_default() .or_default()
.push(GameInput::Spellbook); .push(GameInput::Diary);
map.entry(settings.game_buttons.settings) map.entry(settings.game_buttons.settings)
.or_default() .or_default()
.push(GameInput::Settings); .push(GameInput::Settings);
@ -407,9 +407,9 @@ impl From<&crate::settings::GamepadSettings> for ControllerSettings {
map.entry(settings.game_layer_buttons.crafting) map.entry(settings.game_layer_buttons.crafting)
.or_default() .or_default()
.push(GameInput::Crafting); .push(GameInput::Crafting);
map.entry(settings.game_layer_buttons.spellbook) map.entry(settings.game_layer_buttons.diary)
.or_default() .or_default()
.push(GameInput::Spellbook); .push(GameInput::Diary);
map.entry(settings.game_layer_buttons.settings) map.entry(settings.game_layer_buttons.settings)
.or_default() .or_default()
.push(GameInput::Settings); .push(GameInput::Settings);

View File

@ -99,8 +99,8 @@ pub enum GameInput {
Social, Social,
#[strum(serialize = "gameinput-crafting")] #[strum(serialize = "gameinput-crafting")]
Crafting, Crafting,
#[strum(serialize = "gameinput-spellbook")] #[strum(serialize = "gameinput-diary")]
Spellbook, Diary,
#[strum(serialize = "gameinput-settings")] #[strum(serialize = "gameinput-settings")]
Settings, Settings,
#[strum(serialize = "gameinput-controls")] #[strum(serialize = "gameinput-controls")]

View File

@ -1050,7 +1050,7 @@ impl Show {
fn toggle_crafting(&mut self) { self.crafting(!self.crafting) } fn toggle_crafting(&mut self) { self.crafting(!self.crafting) }
fn toggle_spell(&mut self) { self.diary(!self.diary) } fn toggle_diary(&mut self) { self.diary(!self.diary) }
fn toggle_ui(&mut self) { self.ui = !self.ui; } fn toggle_ui(&mut self) { self.ui = !self.ui; }
@ -4780,8 +4780,8 @@ impl Hud {
self.show.toggle_crafting(); self.show.toggle_crafting();
true true
}, },
GameInput::Spellbook if state => { GameInput::Diary if state => {
self.show.toggle_spell(); self.show.toggle_diary();
true true
}, },
GameInput::Settings if state => { GameInput::Settings if state => {

View File

@ -101,8 +101,8 @@ widget_ids! {
exp_img_frame, exp_img_frame,
exp_img, exp_img,
exp_lvl, exp_lvl,
spellbook_txt_bg, diary_txt_bg,
spellbook_txt, diary_txt,
sp_arrow, sp_arrow,
sp_arrow_txt_bg, sp_arrow_txt_bg,
sp_arrow_txt, sp_arrow_txt,
@ -799,18 +799,18 @@ impl<'a> Skillbar<'a> {
.set(state.ids.exp_img, ui); .set(state.ids.exp_img, ui);
// Show Shortcut // Show Shortcut
if let Some(spell) = &self if let Some(diary) = &self
.global_state .global_state
.settings .settings
.controls .controls
.get_binding(GameInput::Spellbook) .get_binding(GameInput::Diary)
{ {
self.create_new_button_with_shadow( self.create_new_button_with_shadow(
ui, ui,
spell, diary,
state.ids.exp_img, state.ids.exp_img,
state.ids.spellbook_txt_bg, state.ids.diary_txt_bg,
state.ids.spellbook_txt, state.ids.diary_txt,
); );
} }
} else { } else {
@ -837,18 +837,18 @@ impl<'a> Skillbar<'a> {
.set(state.ids.exp_img, ui); .set(state.ids.exp_img, ui);
// Show Shortcut // Show Shortcut
if let Some(spell) = &self if let Some(diary) = &self
.global_state .global_state
.settings .settings
.controls .controls
.get_binding(GameInput::Spellbook) .get_binding(GameInput::Diary)
{ {
self.create_new_button_with_shadow( self.create_new_button_with_shadow(
ui, ui,
spell, diary,
state.ids.exp_img, state.ids.exp_img,
state.ids.spellbook_txt_bg, state.ids.diary_txt_bg,
state.ids.spellbook_txt, state.ids.diary_txt,
); );
} }
} }

View File

@ -154,7 +154,7 @@ impl ControlSettings {
GameInput::Trade => Some(KeyMouse::Key(VirtualKeyCode::T)), GameInput::Trade => Some(KeyMouse::Key(VirtualKeyCode::T)),
GameInput::Social => Some(KeyMouse::Key(VirtualKeyCode::O)), GameInput::Social => Some(KeyMouse::Key(VirtualKeyCode::O)),
GameInput::Crafting => Some(KeyMouse::Key(VirtualKeyCode::C)), GameInput::Crafting => Some(KeyMouse::Key(VirtualKeyCode::C)),
GameInput::Spellbook => Some(KeyMouse::Key(VirtualKeyCode::P)), GameInput::Diary => Some(KeyMouse::Key(VirtualKeyCode::P)),
GameInput::Settings => Some(KeyMouse::Key(VirtualKeyCode::F10)), GameInput::Settings => Some(KeyMouse::Key(VirtualKeyCode::F10)),
GameInput::Controls => Some(KeyMouse::Key(VirtualKeyCode::F1)), GameInput::Controls => Some(KeyMouse::Key(VirtualKeyCode::F1)),
GameInput::ToggleInterface => Some(KeyMouse::Key(VirtualKeyCode::F2)), GameInput::ToggleInterface => Some(KeyMouse::Key(VirtualKeyCode::F2)),

View File

@ -110,7 +110,7 @@ pub mod con_settings {
pub character_window: LayerEntry, pub character_window: LayerEntry,
pub social: LayerEntry, pub social: LayerEntry,
pub crafting: LayerEntry, pub crafting: LayerEntry,
pub spellbook: LayerEntry, pub diary: LayerEntry,
pub settings: LayerEntry, pub settings: LayerEntry,
pub controls: LayerEntry, pub controls: LayerEntry,
pub toggle_interface: LayerEntry, pub toggle_interface: LayerEntry,
@ -249,7 +249,7 @@ pub mod con_settings {
mod1: Button::Simple(GilButton::RightTrigger), mod1: Button::Simple(GilButton::RightTrigger),
mod2: Button::Simple(GilButton::Unknown), mod2: Button::Simple(GilButton::Unknown),
}, },
spellbook: LayerEntry { diary: LayerEntry {
button: Button::Simple(GilButton::Select), button: Button::Simple(GilButton::Select),
mod1: Button::Simple(GilButton::Unknown), mod1: Button::Simple(GilButton::Unknown),
mod2: Button::Simple(GilButton::Unknown), mod2: Button::Simple(GilButton::Unknown),
@ -327,7 +327,7 @@ pub mod con_settings {
pub character_window: Button, pub character_window: Button,
pub social: Button, pub social: Button,
pub crafting: Button, pub crafting: Button,
pub spellbook: Button, pub diary: Button,
pub settings: Button, pub settings: Button,
pub controls: Button, pub controls: Button,
pub toggle_interface: Button, pub toggle_interface: Button,
@ -432,7 +432,7 @@ pub mod con_settings {
character_window: Button::Simple(GilButton::Unknown), character_window: Button::Simple(GilButton::Unknown),
social: Button::Simple(GilButton::Unknown), social: Button::Simple(GilButton::Unknown),
crafting: Button::Simple(GilButton::Unknown), crafting: Button::Simple(GilButton::Unknown),
spellbook: Button::Simple(GilButton::Unknown), diary: Button::Simple(GilButton::Unknown),
settings: Button::Simple(GilButton::Unknown), settings: Button::Simple(GilButton::Unknown),
controls: Button::Simple(GilButton::Unknown), controls: Button::Simple(GilButton::Unknown),
toggle_interface: Button::Simple(GilButton::Unknown), toggle_interface: Button::Simple(GilButton::Unknown),