mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Respond to review, make char_slider take String
This commit is contained in:
parent
a994984b09
commit
94dbd4cb25
@ -1052,7 +1052,7 @@ impl Controls {
|
||||
const SLIDER_HEIGHT: u16 = 30;
|
||||
|
||||
fn char_slider<'a>(
|
||||
text: &str,
|
||||
text: String,
|
||||
state: &'a mut slider::State,
|
||||
max: u8,
|
||||
selected_val: u8,
|
||||
@ -1079,7 +1079,7 @@ impl Controls {
|
||||
}
|
||||
fn char_slider_greyable<'a>(
|
||||
active: bool,
|
||||
text: &str,
|
||||
text: String,
|
||||
state: &'a mut slider::State,
|
||||
max: u8,
|
||||
selected_val: u8,
|
||||
@ -1117,7 +1117,7 @@ impl Controls {
|
||||
|
||||
let slider_options = Column::with_children(vec![
|
||||
char_slider(
|
||||
&i18n.get("char_selection.hair_style"),
|
||||
i18n.get("char_selection.hair_style").into_owned(),
|
||||
&mut sliders.hair_style,
|
||||
body.species.num_hair_styles(body.body_type) - 1,
|
||||
body.hair_style,
|
||||
@ -1125,7 +1125,7 @@ impl Controls {
|
||||
(fonts, imgs),
|
||||
),
|
||||
char_slider(
|
||||
&i18n.get("char_selection.hair_color"),
|
||||
i18n.get("char_selection.hair_color").into_owned(),
|
||||
&mut sliders.hair_color,
|
||||
body.species.num_hair_colors() - 1,
|
||||
body.hair_color,
|
||||
@ -1133,7 +1133,7 @@ impl Controls {
|
||||
(fonts, imgs),
|
||||
),
|
||||
char_slider(
|
||||
&i18n.get("char_selection.skin"),
|
||||
i18n.get("char_selection.skin").into_owned(),
|
||||
&mut sliders.skin,
|
||||
body.species.num_skin_colors() - 1,
|
||||
body.skin,
|
||||
@ -1141,7 +1141,7 @@ impl Controls {
|
||||
(fonts, imgs),
|
||||
),
|
||||
char_slider(
|
||||
&i18n.get("char_selection.eyeshape"),
|
||||
i18n.get("char_selection.eyeshape").into_owned(),
|
||||
&mut sliders.eyes,
|
||||
body.species.num_eyes(body.body_type) - 1,
|
||||
body.eyes,
|
||||
@ -1149,7 +1149,7 @@ impl Controls {
|
||||
(fonts, imgs),
|
||||
),
|
||||
char_slider(
|
||||
&i18n.get("char_selection.eye_color"),
|
||||
i18n.get("char_selection.eye_color").into_owned(),
|
||||
&mut sliders.eye_color,
|
||||
body.species.num_eye_colors() - 1,
|
||||
body.eye_color,
|
||||
@ -1158,7 +1158,7 @@ impl Controls {
|
||||
),
|
||||
char_slider_greyable(
|
||||
body.species.num_accessories(body.body_type) > 1,
|
||||
&i18n.get("char_selection.accessories"),
|
||||
i18n.get("char_selection.accessories").into_owned(),
|
||||
&mut sliders.accessory,
|
||||
body.species.num_accessories(body.body_type) - 1,
|
||||
body.accessory,
|
||||
@ -1167,7 +1167,7 @@ impl Controls {
|
||||
),
|
||||
char_slider_greyable(
|
||||
body.species.num_beards(body.body_type) > 1,
|
||||
&i18n.get("char_selection.beard"),
|
||||
i18n.get("char_selection.beard").into_owned(),
|
||||
&mut sliders.beard,
|
||||
body.species.num_beards(body.body_type) - 1,
|
||||
body.beard,
|
||||
|
Loading…
Reference in New Issue
Block a user