mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'pfau/small_ui_fixes' into 'master'
Small UI fixes See merge request veloren/veloren!888
This commit is contained in:
commit
32db0df208
@ -10,7 +10,7 @@
|
||||
/// To add a new language in Veloren, juste write an additional `.ron` file in
|
||||
/// `assets/voxygen/i18n` and that's it!
|
||||
|
||||
/// Localization for "global" English
|
||||
/// Lokalisation für Deutsch/Deutschland
|
||||
VoxygenLocalization(
|
||||
metadata: (
|
||||
language_name: "Deutsch",
|
||||
@ -238,7 +238,7 @@ Viel Spaß in der Welt von Veloren, Abenteurer!"#,
|
||||
"hud.settings.zoom_sensitivity": "Zoom Sensibilität",
|
||||
"hud.settings.invert_scroll_zoom": "Scroll-Zoom invertieren",
|
||||
"hud.settings.invert_mouse_y_axis": "Maus Y-Achse invertieren",
|
||||
"hud.settings.free_look_behavior": "Freie Sicht",
|
||||
"hud.settings.free_look_behavior": "Freies Umsehen",
|
||||
|
||||
"hud.settings.view_distance": "Sichtweite",
|
||||
"hud.settings.maximum_fps": "Maximale FPS",
|
||||
|
@ -156,17 +156,12 @@ https://account.veloren.net."#,
|
||||
"hud.press_key_to_respawn": r#"Press {key} to respawn at the last campfire you visited."#,
|
||||
|
||||
// Welcome message
|
||||
"hud.welcome": r#"Welcome to the Veloren Alpha!,
|
||||
"hud.welcome": r#"Welcome to the Veloren Alpha!
|
||||
|
||||
|
||||
Some tips before you start:
|
||||
|
||||
|
||||
MOST IMPORTANTLY: To set your respawn point type /waypoint into the chat.
|
||||
|
||||
This can also be done when you are already dead!
|
||||
|
||||
|
||||
Press F1 to see the available key commands.
|
||||
|
||||
Type /help into the chat to see chat commands
|
||||
|
@ -149,9 +149,7 @@ pub enum Event {
|
||||
Stats,
|
||||
Close,
|
||||
}
|
||||
/*
|
||||
|
||||
*/
|
||||
impl<'a> Widget for Bag<'a> {
|
||||
type Event = Option<Event>;
|
||||
type State = State;
|
||||
|
@ -42,6 +42,7 @@ use crate::{
|
||||
use client::{Client, Event as ClientEvent};
|
||||
use common::{assets::load_expect, comp, terrain::TerrainChunk, vol::RectRasterableVol};
|
||||
use conrod_core::{
|
||||
position::Relative,
|
||||
text::cursor::Index,
|
||||
widget::{self, Button, Image, Rectangle, Text},
|
||||
widget_ids, Color, Colorable, Labelable, Positionable, Sizeable, Widget,
|
||||
@ -305,6 +306,7 @@ pub struct Show {
|
||||
impl Show {
|
||||
fn bag(&mut self, open: bool) {
|
||||
self.bag = open;
|
||||
self.map = false;
|
||||
self.want_grab = !open;
|
||||
}
|
||||
|
||||
@ -361,6 +363,8 @@ impl Show {
|
||||
|| self.map
|
||||
|| self.social
|
||||
|| self.spell
|
||||
|| self.help
|
||||
|| self.intro
|
||||
|| match self.open_windows {
|
||||
Windows::None => false,
|
||||
_ => true,
|
||||
@ -368,6 +372,8 @@ impl Show {
|
||||
{
|
||||
self.bag = false;
|
||||
self.esc_menu = false;
|
||||
self.help = false;
|
||||
self.intro = false;
|
||||
self.map = false;
|
||||
self.social = false;
|
||||
self.spell = false;
|
||||
@ -1239,23 +1245,27 @@ impl Hud {
|
||||
if self.show.intro && !self.show.esc_menu && !self.intro_2 {
|
||||
match global_state.settings.gameplay.intro_show {
|
||||
Intro::Show => {
|
||||
Rectangle::fill_with([800.0, 850.0], Color::Rgba(0.0, 0.0, 0.0, 0.80))
|
||||
.top_left_with_margins_on(ui_widgets.window, 180.0, 10.0)
|
||||
.floating(true)
|
||||
.set(self.ids.intro_bg, ui_widgets);
|
||||
Rectangle::fill_with(
|
||||
[800.0 * 0.8, 850.0 * 0.8],
|
||||
Color::Rgba(0.0, 0.0, 0.0, 0.80),
|
||||
)
|
||||
.top_left_with_margins_on(ui_widgets.window, 180.0 * 0.8, 10.0 * 0.8)
|
||||
.floating(true)
|
||||
.set(self.ids.intro_bg, ui_widgets);
|
||||
Text::new(intro_text)
|
||||
.top_left_with_margins_on(self.ids.intro_bg, 10.0, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(20))
|
||||
.font_size(self.fonts.cyri.scale(16))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(self.ids.intro_text, ui_widgets);
|
||||
if Button::image(self.imgs.button)
|
||||
.w_h(100.0, 50.0)
|
||||
.w_h(90.0, 35.0)
|
||||
.mid_bottom_with_margin_on(self.ids.intro_bg, 10.0)
|
||||
.label(&self.voxygen_i18n.get("common.close"))
|
||||
.label_font_size(self.fonts.cyri.scale(20))
|
||||
.label_font_size(self.fonts.cyri.scale(16))
|
||||
.label_font_id(self.fonts.cyri.conrod_id)
|
||||
.label_color(TEXT_COLOR)
|
||||
.label_y(Relative::Scalar(4.0))
|
||||
.hover_image(self.imgs.button_hover)
|
||||
.press_image(self.imgs.button_press)
|
||||
.set(self.ids.intro_close, ui_widgets)
|
||||
@ -1550,14 +1560,14 @@ impl Hud {
|
||||
if self.show.help && !self.show.map && !self.show.esc_menu {
|
||||
Image::new(self.imgs.help)
|
||||
.middle_of(ui_widgets.window)
|
||||
.w_h(1260.0 * 1.2, 519.0 * 1.2)
|
||||
.w_h(1260.0, 519.0)
|
||||
.set(self.ids.help, ui_widgets);
|
||||
// Show tips
|
||||
if Button::image(self.imgs.button)
|
||||
/*if Button::image(self.imgs.button)
|
||||
.w_h(120.0, 50.0)
|
||||
.hover_image(self.imgs.button_hover)
|
||||
.press_image(self.imgs.button_press)
|
||||
.label(&self.voxygen_i18n.get("hud.show_tips"))
|
||||
.label(&self.voxygen_i18n.get("common.close"))
|
||||
.label_font_size(self.fonts.cyri.scale(20))
|
||||
.label_font_id(self.fonts.cyri.conrod_id)
|
||||
.label_color(TEXT_COLOR)
|
||||
@ -1569,7 +1579,7 @@ impl Hud {
|
||||
self.show.intro = false;
|
||||
self.intro = false;
|
||||
self.intro_2 = true;
|
||||
};
|
||||
};*/
|
||||
// X-button
|
||||
if Button::image(self.imgs.close_button)
|
||||
.w_h(40.0, 40.0)
|
||||
|
@ -534,7 +534,7 @@ impl MainMenuUi {
|
||||
.set(self.ids.password_bg, ui_widgets);
|
||||
for event in TextBox::new(&self.password)
|
||||
.w_h(290.0, 30.0)
|
||||
.mid_bottom_with_margin_on(self.ids.password_bg, 44.0 / 2.0)
|
||||
.mid_bottom_with_margin_on(self.ids.password_bg, 17.0)
|
||||
.font_size(self.fonts.cyri.scale(22))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.text_color(TEXT_COLOR)
|
||||
|
Loading…
Reference in New Issue
Block a user