mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Tweaks to prompt dialog.
This commit is contained in:
parent
efbc5f9b75
commit
2e09feb426
@ -84,7 +84,7 @@ lazy_static! {
|
||||
let map = SkillTreeMap::load_expect_cloned(
|
||||
"common.skill_trees.skills_skill-groups_manifest",
|
||||
).0;
|
||||
map.iter().flat_map(|(sgk, skills)| skills.into_iter().map(move |s| (*s, *sgk))).collect()
|
||||
map.iter().flat_map(|(sgk, skills)| skills.iter().map(move |s| (*s, *sgk))).collect()
|
||||
};
|
||||
// Loads the maximum level that a skill can obtain
|
||||
pub static ref SKILL_MAX_LEVEL: HashMap<Skill, u16> = {
|
||||
|
@ -109,6 +109,7 @@ use std::{
|
||||
sync::Arc,
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
use tracing::warn;
|
||||
use vek::*;
|
||||
|
||||
const TEXT_COLOR: Color = Color::Rgba(1.0, 1.0, 1.0, 1.0);
|
||||
@ -909,6 +910,7 @@ impl PromptDialogSettings {
|
||||
self.outcome_via_keypress = Some(outcome);
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn with_no_negative_option(mut self) -> Self {
|
||||
self.negative_option = false;
|
||||
self
|
||||
@ -1161,13 +1163,13 @@ impl Hud {
|
||||
acquired them. Prerequisites or costs may have changed."
|
||||
},
|
||||
};
|
||||
let common_message = "At least one of your skill groups has been \
|
||||
invalidated. You will need to re-assign your skill \
|
||||
points to get skills.";
|
||||
let persistence_error =
|
||||
format!("{}\n{}", persistence_error, common_message);
|
||||
|
||||
let common_message = "Some of your skill points have been reset. You will \
|
||||
need to reassign them.";
|
||||
|
||||
warn!("{}\n{}", persistence_error, common_message);
|
||||
let prompt_dialog = PromptDialogSettings::new(
|
||||
persistence_error,
|
||||
format!("{}\n", common_message),
|
||||
Event::AcknowledgePersistenceLoadError,
|
||||
None,
|
||||
)
|
||||
|
@ -143,8 +143,13 @@ impl<'a> Widget for PromptDialog<'a> {
|
||||
self.prompt_dialog_settings.affirmative_event.clone(),
|
||||
));
|
||||
}
|
||||
Text::new("Accept")
|
||||
.bottom_right_with_margins_on(state.ids.accept_key, 5.0, -65.0)
|
||||
let accept_txt = if self.prompt_dialog_settings.negative_option {
|
||||
"Accept"
|
||||
} else {
|
||||
"Ok"
|
||||
};
|
||||
Text::new(accept_txt)
|
||||
.bottom_left_with_margins_on(state.ids.accept_key, 4.0, 28.0)
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.font_size(self.fonts.cyri.scale(18))
|
||||
.color(TEXT_COLOR)
|
||||
|
Loading…
Reference in New Issue
Block a user