mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'imbris/small-fixes' into 'master'
Remove unused fields from UI stuff Closes #1012 See merge request veloren/veloren!2388
This commit is contained in:
commit
af874af771
@ -806,7 +806,6 @@ pub struct Hud {
|
|||||||
force_chat_cursor: Option<Index>,
|
force_chat_cursor: Option<Index>,
|
||||||
tab_complete: Option<String>,
|
tab_complete: Option<String>,
|
||||||
pulse: f32,
|
pulse: f32,
|
||||||
_velocity: f32,
|
|
||||||
slot_manager: slots::SlotManager,
|
slot_manager: slots::SlotManager,
|
||||||
hotbar: hotbar::State,
|
hotbar: hotbar::State,
|
||||||
events: Vec<Event>,
|
events: Vec<Event>,
|
||||||
@ -925,7 +924,6 @@ impl Hud {
|
|||||||
force_chat_cursor: None,
|
force_chat_cursor: None,
|
||||||
tab_complete: None,
|
tab_complete: None,
|
||||||
pulse: 0.0,
|
pulse: 0.0,
|
||||||
_velocity: 0.0,
|
|
||||||
slot_manager,
|
slot_manager,
|
||||||
hotbar: hotbar_state,
|
hotbar: hotbar_state,
|
||||||
events: Vec::new(),
|
events: Vec::new(),
|
||||||
@ -2040,10 +2038,6 @@ impl Hud {
|
|||||||
|
|
||||||
// Display debug window.
|
// Display debug window.
|
||||||
if let Some(debug_info) = debug_info {
|
if let Some(debug_info) = debug_info {
|
||||||
self._velocity = match debug_info.velocity {
|
|
||||||
Some(velocity) => velocity.0.magnitude(),
|
|
||||||
None => 0.0,
|
|
||||||
};
|
|
||||||
// Alpha Version
|
// Alpha Version
|
||||||
Text::new(&version)
|
Text::new(&version)
|
||||||
.top_left_with_margins_on(ui_widgets.window, 5.0, 5.0)
|
.top_left_with_margins_on(ui_widgets.window, 5.0, 5.0)
|
||||||
|
@ -45,8 +45,8 @@ pub struct ImageSlider<T, K> {
|
|||||||
struct Track {
|
struct Track {
|
||||||
image_id: image::Id,
|
image_id: image::Id,
|
||||||
color: Option<Color>,
|
color: Option<Color>,
|
||||||
#[allow(dead_code)]
|
// TODO: this is being set by users but we don't use it for anything here, figure out what it
|
||||||
src_rect: Option<Rect>,
|
// is supposed to be used for
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
breadth: Option<f32>,
|
breadth: Option<f32>,
|
||||||
// Padding on the ends of the track constraining the slider to a smaller area.
|
// Padding on the ends of the track constraining the slider to a smaller area.
|
||||||
@ -58,8 +58,6 @@ struct Slider {
|
|||||||
hover_image_id: Option<image::Id>,
|
hover_image_id: Option<image::Id>,
|
||||||
press_image_id: Option<image::Id>,
|
press_image_id: Option<image::Id>,
|
||||||
color: Option<Color>,
|
color: Option<Color>,
|
||||||
#[allow(dead_code)]
|
|
||||||
src_rect: Option<Rect>,
|
|
||||||
length: Option<f32>,
|
length: Option<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,8 +83,6 @@ impl<T, K> ImageSlider<T, K> {
|
|||||||
pub slider_length { slider.length = Some(f32) }
|
pub slider_length { slider.length = Some(f32) }
|
||||||
pub track_color { track.color = Some(Color) }
|
pub track_color { track.color = Some(Color) }
|
||||||
pub slider_color { slider.color = Some(Color) }
|
pub slider_color { slider.color = Some(Color) }
|
||||||
pub track_src_rect { track.src_rect = Some(Rect) }
|
|
||||||
pub slider_src_rect { slider.src_rect = Some(Rect) }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new(
|
fn new(
|
||||||
@ -105,7 +101,6 @@ impl<T, K> ImageSlider<T, K> {
|
|||||||
track: Track {
|
track: Track {
|
||||||
image_id: track_image_id,
|
image_id: track_image_id,
|
||||||
color: None,
|
color: None,
|
||||||
src_rect: None,
|
|
||||||
breadth: None,
|
breadth: None,
|
||||||
padding: (0.0, 0.0),
|
padding: (0.0, 0.0),
|
||||||
},
|
},
|
||||||
@ -114,7 +109,6 @@ impl<T, K> ImageSlider<T, K> {
|
|||||||
hover_image_id: None,
|
hover_image_id: None,
|
||||||
press_image_id: None,
|
press_image_id: None,
|
||||||
color: None,
|
color: None,
|
||||||
src_rect: None,
|
|
||||||
length: None,
|
length: None,
|
||||||
},
|
},
|
||||||
kind: std::marker::PhantomData,
|
kind: std::marker::PhantomData,
|
||||||
|
Loading…
Reference in New Issue
Block a user