mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'pfau/fix_menu' into 'master'
fix broken main menu See merge request veloren/veloren!1077
This commit is contained in:
commit
03cea72415
BIN
assets/voxygen/element/frames/banner.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/banner.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/frames/banner_bottom.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/banner_bottom.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/misc_bg/textbox_mid.png
(Stored with Git LFS)
BIN
assets/voxygen/element/misc_bg/textbox_mid.png
(Stored with Git LFS)
Binary file not shown.
@ -20,6 +20,8 @@ use conrod_core::{
|
|||||||
use rand::{seq::SliceRandom, thread_rng};
|
use rand::{seq::SliceRandom, thread_rng};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
const COL1: Color = Color::Rgba(0.07, 0.1, 0.1, 0.9);
|
||||||
|
|
||||||
// UI Color-Theme
|
// UI Color-Theme
|
||||||
/*const UI_MAIN: Color = Color::Rgba(0.61, 0.70, 0.70, 1.0); // Greenish Blue
|
/*const UI_MAIN: Color = Color::Rgba(0.61, 0.70, 0.70, 1.0); // Greenish Blue
|
||||||
const UI_HIGHLIGHT_0: Color = Color::Rgba(0.79, 1.09, 1.09, 1.0);*/
|
const UI_HIGHLIGHT_0: Color = Color::Rgba(0.79, 1.09, 1.09, 1.0);*/
|
||||||
@ -84,19 +86,19 @@ image_ids! {
|
|||||||
v_logo: "voxygen.element.v_logo",
|
v_logo: "voxygen.element.v_logo",
|
||||||
|
|
||||||
info_frame: "voxygen.element.frames.info_frame_2",
|
info_frame: "voxygen.element.frames.info_frame_2",
|
||||||
banner: "voxygen.element.frames.banner",
|
|
||||||
|
|
||||||
banner_bottom: "voxygen.element.frames.banner_bottom",
|
|
||||||
|
|
||||||
|
|
||||||
<ImageGraphic>
|
<ImageGraphic>
|
||||||
bg: "voxygen.background.bg_main",
|
bg: "voxygen.background.bg_main",
|
||||||
banner_top: "voxygen.element.frames.banner_top",
|
banner_top: "voxygen.element.frames.banner_top",
|
||||||
|
banner: "voxygen.element.frames.banner",
|
||||||
|
banner_bottom: "voxygen.element.frames.banner_bottom",
|
||||||
button: "voxygen.element.buttons.button",
|
button: "voxygen.element.buttons.button",
|
||||||
button_hover: "voxygen.element.buttons.button_hover",
|
button_hover: "voxygen.element.buttons.button_hover",
|
||||||
button_press: "voxygen.element.buttons.button_press",
|
button_press: "voxygen.element.buttons.button_press",
|
||||||
input_bg_top: "voxygen.element.misc_bg.textbox_top",
|
input_bg: "voxygen.element.misc_bg.textbox_mid",
|
||||||
input_bg_mid: "voxygen.element.misc_bg.textbox_mid",
|
|
||||||
input_bg_bot: "voxygen.element.misc_bg.textbox_bot",
|
|
||||||
disclaimer: "voxygen.element.frames.disclaimer",
|
disclaimer: "voxygen.element.frames.disclaimer",
|
||||||
|
|
||||||
|
|
||||||
@ -406,7 +408,7 @@ impl MainMenuUi {
|
|||||||
Image::new(self.imgs.banner)
|
Image::new(self.imgs.banner)
|
||||||
.w_h(65.0 * 6.0, 100.0 * 6.0)
|
.w_h(65.0 * 6.0, 100.0 * 6.0)
|
||||||
.middle_of(self.ids.bg)
|
.middle_of(self.ids.bg)
|
||||||
.color(Some(Color::Rgba(1.0, 1.0, 1.0, 0.9)))
|
.color(Some(Color::Rgba(0.0, 0.0, 0.0, 0.9)))
|
||||||
.set(self.ids.banner, ui_widgets);
|
.set(self.ids.banner, ui_widgets);
|
||||||
|
|
||||||
Image::new(self.imgs.banner_top)
|
Image::new(self.imgs.banner_top)
|
||||||
@ -478,7 +480,7 @@ impl MainMenuUi {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
// Info Window
|
// Info Window
|
||||||
Rectangle::fill_with([550.0, 250.0], color::BLACK)
|
Rectangle::fill_with([550.0, 250.0], COL1)
|
||||||
.top_left_with_margins_on(ui_widgets.window, 40.0, 40.0)
|
.top_left_with_margins_on(ui_widgets.window, 40.0, 40.0)
|
||||||
.color(Color::Rgba(0.0, 0.0, 0.0, 0.95))
|
.color(Color::Rgba(0.0, 0.0, 0.0, 0.95))
|
||||||
.set(self.ids.info_frame, ui_widgets);
|
.set(self.ids.info_frame, ui_widgets);
|
||||||
@ -510,16 +512,16 @@ impl MainMenuUi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Username
|
// Username
|
||||||
Rectangle::fill_with([320.0, 50.0], color::rgba(0.0, 0.0, 0.0, 0.97))
|
Rectangle::fill_with([320.0, 50.0], color::rgba(0.0, 0.0, 0.0, 0.0))
|
||||||
.mid_top_with_margin_on(self.ids.banner_top, 160.0)
|
.mid_top_with_margin_on(self.ids.banner_top, 150.0)
|
||||||
.set(self.ids.usrnm_bg, ui_widgets);
|
.set(self.ids.usrnm_bg, ui_widgets);
|
||||||
Image::new(self.imgs.input_bg_top)
|
Image::new(self.imgs.input_bg)
|
||||||
.w_h(337.0, 67.0)
|
.w_h(338.0, 50.0)
|
||||||
.middle_of(self.ids.usrnm_bg)
|
.middle_of(self.ids.usrnm_bg)
|
||||||
.set(self.ids.username_bg, ui_widgets);
|
.set(self.ids.username_bg, ui_widgets);
|
||||||
for event in TextBox::new(&self.username)
|
for event in TextBox::new(&self.username)
|
||||||
.w_h(290.0, 30.0)
|
.w_h(290.0, 30.0)
|
||||||
.mid_bottom_with_margin_on(self.ids.username_bg, 38.0 / 2.0)
|
.mid_bottom_with_margin_on(self.ids.username_bg, 14.0)
|
||||||
.font_size(self.fonts.cyri.scale(22))
|
.font_size(self.fonts.cyri.scale(22))
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
.text_color(TEXT_COLOR)
|
.text_color(TEXT_COLOR)
|
||||||
@ -539,16 +541,16 @@ impl MainMenuUi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Password
|
// Password
|
||||||
Rectangle::fill_with([320.0, 50.0], color::rgba(0.0, 0.0, 0.0, 0.97))
|
Rectangle::fill_with([320.0, 50.0], color::rgba(0.0, 0.0, 0.0, 0.0))
|
||||||
.down_from(self.ids.usrnm_bg, 30.0)
|
.down_from(self.ids.usrnm_bg, 10.0)
|
||||||
.set(self.ids.passwd_bg, ui_widgets);
|
.set(self.ids.passwd_bg, ui_widgets);
|
||||||
Image::new(self.imgs.input_bg_mid)
|
Image::new(self.imgs.input_bg)
|
||||||
.w_h(337.0, 67.0)
|
.w_h(338.0, 50.0)
|
||||||
.middle_of(self.ids.passwd_bg)
|
.middle_of(self.ids.passwd_bg)
|
||||||
.set(self.ids.password_bg, ui_widgets);
|
.set(self.ids.password_bg, ui_widgets);
|
||||||
for event in TextBox::new(&self.password)
|
for event in TextBox::new(&self.password)
|
||||||
.w_h(290.0, 30.0)
|
.w_h(290.0, 30.0)
|
||||||
.mid_bottom_with_margin_on(self.ids.password_bg, 17.0)
|
.mid_bottom_with_margin_on(self.ids.password_bg, 10.0)
|
||||||
// the text is smaller to allow longer passwords, conrod limits text length
|
// the text is smaller to allow longer passwords, conrod limits text length
|
||||||
// this allows 35 characters but can be increased, approximate formula: 420 / scale = length
|
// this allows 35 characters but can be increased, approximate formula: 420 / scale = length
|
||||||
.font_size(self.fonts.cyri.scale(12))
|
.font_size(self.fonts.cyri.scale(12))
|
||||||
@ -636,16 +638,16 @@ impl MainMenuUi {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
// Server address
|
// Server address
|
||||||
Rectangle::fill_with([320.0, 50.0], color::rgba(0.0, 0.0, 0.0, 0.97))
|
Rectangle::fill_with([320.0, 50.0], color::rgba(0.0, 0.0, 0.0, 0.0))
|
||||||
.down_from(self.ids.passwd_bg, 30.0)
|
.down_from(self.ids.passwd_bg, 8.0)
|
||||||
.set(self.ids.srvr_bg, ui_widgets);
|
.set(self.ids.srvr_bg, ui_widgets);
|
||||||
Image::new(self.imgs.input_bg_bot)
|
Image::new(self.imgs.input_bg)
|
||||||
.w_h(337.0, 67.0)
|
.w_h(338.0, 50.0)
|
||||||
.middle_of(self.ids.srvr_bg)
|
.middle_of(self.ids.srvr_bg)
|
||||||
.set(self.ids.address_bg, ui_widgets);
|
.set(self.ids.address_bg, ui_widgets);
|
||||||
for event in TextBox::new(&self.server_address)
|
for event in TextBox::new(&self.server_address)
|
||||||
.w_h(290.0, 30.0)
|
.w_h(290.0, 30.0)
|
||||||
.mid_top_with_margin_on(self.ids.address_bg, 28.0 / 2.0)
|
.mid_top_with_margin_on(self.ids.address_bg, 8.0)
|
||||||
.font_size(self.fonts.cyri.scale(22))
|
.font_size(self.fonts.cyri.scale(22))
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
.text_color(TEXT_COLOR)
|
.text_color(TEXT_COLOR)
|
||||||
|
Loading…
Reference in New Issue
Block a user