mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
add title to server select menu, don't use unneeded Container in language select menu
This commit is contained in:
parent
12abd64a01
commit
52479fec2f
@ -160,6 +160,8 @@ https://veloren.net/account/."#,
|
|||||||
"main.login.banned": "You have been banned with the following reason",
|
"main.login.banned": "You have been banned with the following reason",
|
||||||
"main.login.kicked": "You have been kicked with the following reason",
|
"main.login.kicked": "You have been kicked with the following reason",
|
||||||
|
|
||||||
|
"main.servers.select_server": "Select a server",
|
||||||
|
|
||||||
/// End Main screen section
|
/// End Main screen section
|
||||||
|
|
||||||
|
|
||||||
|
@ -217,9 +217,9 @@ impl LanguageSelectBanner {
|
|||||||
selected_language_index: Option<usize>,
|
selected_language_index: Option<usize>,
|
||||||
button_style: style::button::Style,
|
button_style: style::button::Style,
|
||||||
) -> Element<Message> {
|
) -> Element<Message> {
|
||||||
let title =
|
let title = Text::new(i18n.get("main.select_language"))
|
||||||
Container::new(Text::new(i18n.get("main.select_language")).size(fonts.cyri.scale(35)))
|
.size(fonts.cyri.scale(35))
|
||||||
.center_x();
|
.horizontal_alignment(iced::HorizontalAlignment::Center);
|
||||||
|
|
||||||
let mut list = Scrollable::new(&mut self.selection_list)
|
let mut list = Scrollable::new(&mut self.selection_list)
|
||||||
.spacing(8)
|
.spacing(8)
|
||||||
|
@ -39,15 +39,21 @@ impl Screen {
|
|||||||
i18n: &Localization,
|
i18n: &Localization,
|
||||||
button_style: style::button::Style,
|
button_style: style::button::Style,
|
||||||
) -> Element<Message> {
|
) -> Element<Message> {
|
||||||
let button = neat_button(
|
let title = Text::new(i18n.get("main.servers.select_server"))
|
||||||
|
.size(fonts.cyri.scale(35))
|
||||||
|
.width(Length::Fill)
|
||||||
|
.horizontal_alignment(iced::HorizontalAlignment::Center);
|
||||||
|
|
||||||
|
let back_button = Container::new(
|
||||||
|
Container::new(neat_button(
|
||||||
&mut self.back_button,
|
&mut self.back_button,
|
||||||
i18n.get("common.back"),
|
i18n.get("common.back"),
|
||||||
0.77_f32,
|
0.77_f32,
|
||||||
button_style,
|
button_style,
|
||||||
Some(Message::Back),
|
Some(Message::Back),
|
||||||
);
|
))
|
||||||
|
.max_width(200),
|
||||||
let button = Container::new(Container::new(button).max_width(200))
|
)
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.align_x(Align::Center);
|
.align_x(Align::Center);
|
||||||
|
|
||||||
@ -88,7 +94,7 @@ impl Screen {
|
|||||||
|
|
||||||
Container::new(
|
Container::new(
|
||||||
Container::new(
|
Container::new(
|
||||||
Column::with_children(vec![list.into(), button.into()])
|
Column::with_children(vec![title.into(), list.into(), back_button.into()])
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.height(Length::Fill)
|
.height(Length::Fill)
|
||||||
.spacing(10)
|
.spacing(10)
|
||||||
|
Loading…
Reference in New Issue
Block a user