mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Don't display the world map on character edit
This commit is contained in:
@ -178,6 +178,9 @@ enum Mode {
|
|||||||
create_button: button::State,
|
create_button: button::State,
|
||||||
rand_character_button: button::State,
|
rand_character_button: button::State,
|
||||||
rand_name_button: button::State,
|
rand_name_button: button::State,
|
||||||
|
/// `character_id.is_some()` can be used to determine if we're in edit
|
||||||
|
/// mode as opposed to create mode.
|
||||||
|
// TODO: Something less janky? Express the problem domain better!
|
||||||
character_id: Option<CharacterId>,
|
character_id: Option<CharacterId>,
|
||||||
start_site_idx: usize,
|
start_site_idx: usize,
|
||||||
},
|
},
|
||||||
@ -1241,7 +1244,8 @@ impl Controls {
|
|||||||
rand_character.into(),
|
rand_character.into(),
|
||||||
];
|
];
|
||||||
|
|
||||||
let right_column_content = vec![
|
let right_column_content = if character_id.is_none() {
|
||||||
|
vec![
|
||||||
Image::new(self.map_img)
|
Image::new(self.map_img)
|
||||||
.height(Length::Units(300))
|
.height(Length::Units(300))
|
||||||
.width(Length::Units(300))
|
.width(Length::Units(300))
|
||||||
@ -1285,7 +1289,11 @@ impl Controls {
|
|||||||
.max_width(200)
|
.max_width(200)
|
||||||
.padding(5)
|
.padding(5)
|
||||||
.into(),
|
.into(),
|
||||||
];
|
]
|
||||||
|
} else {
|
||||||
|
// If we're editing an existing character, don't display the world column
|
||||||
|
Vec::new()
|
||||||
|
};
|
||||||
|
|
||||||
let column = |column_content, scroll| {
|
let column = |column_content, scroll| {
|
||||||
let column = Container::new(
|
let column = Container::new(
|
||||||
|
Reference in New Issue
Block a user