mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Minor changes to font sizes
Former-commit-id: d998532c9b858cea5704b307b8bc6ef0ef3c75d7
This commit is contained in:
parent
8ecb849970
commit
4607ad612d
@ -416,6 +416,11 @@ pub struct Hud {
|
||||
settings_tab: SettingsTab,
|
||||
}
|
||||
|
||||
//#[inline]
|
||||
//pub fn rgba_bytes(r: u8, g: u8, b: u8, a: f32) -> Color {
|
||||
//Color::Rgba(r as f32 / 255.0, g as f32 / 255.0, b as f32 / 255.0, a)
|
||||
//}
|
||||
|
||||
impl Hud {
|
||||
pub fn new(window: &mut Window) -> Self {
|
||||
let mut ui = Ui::new(window).unwrap();
|
||||
@ -747,7 +752,7 @@ impl Hud {
|
||||
.set(self.ids.mana_bar, ui_widgets);
|
||||
|
||||
// Filling
|
||||
Rectangle::fill_with([182.0 * (self.hp_percentage), 6.0], color::rgb(0.15, 0.14, 0.39)) // "W=182.0 * [Mana. %]"
|
||||
Rectangle::fill_with([182.0 * (self.mana_percentage), 6.0], color::rgb(0.15, 0.14, 0.39)) // "W=182.0 * [Mana. %]"
|
||||
.top_left_with_margins_on(self.ids.mana_bar, 5.0, 0.0)
|
||||
.set(self.ids.mana_bar_color, ui_widgets);
|
||||
|
||||
@ -1357,8 +1362,9 @@ impl Hud {
|
||||
.hover_image(self.imgs.button_dark_hover)
|
||||
.press_image(self.imgs.button_dark_press)
|
||||
.label("Settings")
|
||||
.label_y(conrod_core::position::Relative::Scalar(2.0))
|
||||
.label_rgba(220.0, 220.0, 220.0, 0.8)
|
||||
.label_font_size(20)
|
||||
.label_font_size(17)
|
||||
.set(self.ids.menu_button_1, ui_widgets)
|
||||
.was_clicked()
|
||||
{
|
||||
@ -1372,8 +1378,9 @@ impl Hud {
|
||||
.hover_image(self.imgs.button_dark_hover)
|
||||
.press_image(self.imgs.button_dark_press)
|
||||
.label("Controls")
|
||||
.label_y(conrod_core::position::Relative::Scalar(2.0))
|
||||
.label_rgba(220.0, 220.0, 220.0, 0.8)
|
||||
.label_font_size(20)
|
||||
.label_font_size(17)
|
||||
.set(self.ids.menu_button_2, ui_widgets)
|
||||
.was_clicked()
|
||||
{
|
||||
@ -1386,8 +1393,9 @@ impl Hud {
|
||||
.hover_image(self.imgs.button_dark_hover)
|
||||
.press_image(self.imgs.button_dark_press)
|
||||
.label("Servers")
|
||||
.label_y(conrod_core::position::Relative::Scalar(2.0))
|
||||
.label_rgba(220.0, 220.0, 220.0, 0.8)
|
||||
.label_font_size(20)
|
||||
.label_font_size(17)
|
||||
.set(self.ids.menu_button_3, ui_widgets)
|
||||
.was_clicked()
|
||||
{
|
||||
@ -1400,8 +1408,9 @@ impl Hud {
|
||||
.hover_image(self.imgs.button_dark_hover)
|
||||
.press_image(self.imgs.button_dark_press)
|
||||
.label("Logout")
|
||||
.label_y(conrod_core::position::Relative::Scalar(2.0))
|
||||
.label_rgba(220.0, 220.0, 220.0, 0.8)
|
||||
.label_font_size(20)
|
||||
.label_font_size(17)
|
||||
.set(self.ids.menu_button_4, ui_widgets)
|
||||
.was_clicked()
|
||||
{
|
||||
@ -1414,8 +1423,9 @@ impl Hud {
|
||||
.hover_image(self.imgs.button_dark_hover)
|
||||
.press_image(self.imgs.button_dark_press)
|
||||
.label("Quit")
|
||||
.label_y(conrod_core::position::Relative::Scalar(2.0))
|
||||
.label_rgba(220.0, 220.0, 220.0, 0.8)
|
||||
.label_font_size(20)
|
||||
.label_font_size(17)
|
||||
.set(self.ids.menu_button_5, ui_widgets)
|
||||
.was_clicked()
|
||||
{
|
||||
|
@ -22,6 +22,8 @@ widget_ids! {
|
||||
|
||||
// Windows
|
||||
selection_window,
|
||||
char_name,
|
||||
char_level,
|
||||
creation_window,
|
||||
select_window_title,
|
||||
race_heading,
|
||||
@ -480,10 +482,23 @@ impl CharSelectionUi {
|
||||
.w_h(522.0, 722.0)
|
||||
.mid_right_with_margin_on(ui_widgets.window, 10.0)
|
||||
.set(self.ids.selection_window, ui_widgets);
|
||||
// Character Name & Level
|
||||
Text::new("Character Name")
|
||||
.mid_top_with_margin_on(self.ids.selection_window, 80.0)
|
||||
.font_size(30)
|
||||
.rgba(220.0, 220.0, 220.0, 0.8)
|
||||
.set(self.ids.char_name, ui_widgets);
|
||||
Text::new("1")
|
||||
.mid_top_with_margin_on(self.ids.char_name, 40.0)
|
||||
.font_size(30)
|
||||
.rgba(220.0, 220.0, 220.0, 0.8)
|
||||
.set(self.ids.char_level, ui_widgets);
|
||||
|
||||
|
||||
// Selected Character
|
||||
if no == 1 {
|
||||
Image::new(self.imgs.test_char_l_big)
|
||||
.w_h(522.0, 722.0)
|
||||
.middle_of(self.ids.selection_window)
|
||||
.set(self.ids.test_char_l_big, ui_widgets);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user