mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
sprites VD slider visuals
This commit is contained in:
parent
feca113c86
commit
3421b3d8da
@ -252,7 +252,8 @@ Viel Spaß in der Welt von Veloren, Abenteurer!"#,
|
||||
"hud.settings.invert_mouse_y_axis": "Maus Y-Achse invertieren",
|
||||
"hud.settings.free_look_behavior": "Freies Umsehen",
|
||||
|
||||
"hud.settings.view_distance": "Sichtweite",
|
||||
"hud.settings.view_distance": "Gelände Sichtweite",
|
||||
"hud.settings.sprites_view_distance": "Objekt Sichtweite",
|
||||
"hud.settings.maximum_fps": "Maximale FPS",
|
||||
"hud.settings.fov": "Sichtfeld (Grad)",
|
||||
"hud.settings.gamma": "Gamma",
|
||||
|
@ -250,6 +250,7 @@ Enjoy your stay in the World of Veloren."#,
|
||||
"hud.settings.free_look_behavior": "Free look behavior",
|
||||
|
||||
"hud.settings.view_distance": "View Distance",
|
||||
"hud.settings.sprites_view_distance": "Sprites View Distance",
|
||||
"hud.settings.maximum_fps": "Maximum FPS",
|
||||
"hud.settings.fov": "Field of View (deg)",
|
||||
"hud.settings.gamma": "Gamma",
|
||||
|
@ -89,6 +89,9 @@ widget_ids! {
|
||||
vd_slider,
|
||||
vd_text,
|
||||
vd_value,
|
||||
sprite_dist_slider,
|
||||
sprite_dist_text,
|
||||
sprite_dist_value,
|
||||
max_fps_slider,
|
||||
max_fps_text,
|
||||
max_fps_value,
|
||||
@ -1612,7 +1615,43 @@ impl<'a> Widget for SettingsWindow<'a> {
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.gamma_value, ui);
|
||||
// Sprites VD
|
||||
if let Some(new_val) = ImageSlider::discrete(
|
||||
self.global_state.settings.graphics.view_distance,
|
||||
1,
|
||||
65,
|
||||
self.imgs.slider_indicator,
|
||||
self.imgs.slider,
|
||||
)
|
||||
.w_h(104.0, 22.0)
|
||||
.right_from(state.ids.vd_slider, 50.0)
|
||||
.track_breadth(12.0)
|
||||
.slider_length(10.0)
|
||||
.pad_track((5.0, 5.0))
|
||||
.set(state.ids.sprite_dist_slider, ui)
|
||||
{
|
||||
events.push(Event::AdjustViewDistance(new_val));
|
||||
}
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.settings.sprites_view_distance"),
|
||||
)
|
||||
.up_from(state.ids.sprite_dist_slider, 8.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sprite_dist_text, ui);
|
||||
|
||||
Text::new(&format!(
|
||||
"{}",
|
||||
self.global_state.settings.graphics.view_distance
|
||||
))
|
||||
.right_from(state.ids.sprite_dist_slider, 8.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.sprite_dist_value, ui);
|
||||
// AaMode
|
||||
Text::new(&self.localized_strings.get("hud.settings.antialiasing_mode"))
|
||||
.down_from(state.ids.gamma_slider, 8.0)
|
||||
|
Loading…
Reference in New Issue
Block a user