diff --git a/assets/voxygen/i18n/de_DE.ron b/assets/voxygen/i18n/de_DE.ron index 5c9e7b21d8..c2b672e579 100644 --- a/assets/voxygen/i18n/de_DE.ron +++ b/assets/voxygen/i18n/de_DE.ron @@ -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", diff --git a/assets/voxygen/i18n/en.ron b/assets/voxygen/i18n/en.ron index 6e39d56c43..ef5b00b544 100644 --- a/assets/voxygen/i18n/en.ron +++ b/assets/voxygen/i18n/en.ron @@ -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", diff --git a/voxygen/src/hud/settings_window.rs b/voxygen/src/hud/settings_window.rs index 7f2e517c51..fac506bc54 100644 --- a/voxygen/src/hud/settings_window.rs +++ b/voxygen/src/hud/settings_window.rs @@ -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)