mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-26 05:38:20 -06:00
pub progressbar, impl default
This commit is contained in:
parent
a78e01435f
commit
277fd4c27d
|
@ -1,4 +1,4 @@
|
||||||
use glam::{vec2, Vec4};
|
use glam::{vec2, Vec4, vec4};
|
||||||
use crate::{
|
use crate::{
|
||||||
UiSize, LayoutInfo,
|
UiSize, LayoutInfo,
|
||||||
draw::UiDrawCommand,
|
draw::UiDrawCommand,
|
||||||
|
@ -7,11 +7,22 @@ use crate::{
|
||||||
};
|
};
|
||||||
use super::UiElement;
|
use super::UiElement;
|
||||||
|
|
||||||
struct ProgressBar {
|
pub struct ProgressBar {
|
||||||
size: (UiSize, UiSize),
|
pub size: (UiSize, UiSize),
|
||||||
value: f32,
|
pub value: f32,
|
||||||
color_foreground: Vec4,
|
pub color_foreground: Vec4,
|
||||||
color_background: Vec4,
|
pub color_background: Vec4,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for ProgressBar {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self {
|
||||||
|
size: (UiSize::Auto, UiSize::Auto),
|
||||||
|
value: 0.,
|
||||||
|
color_foreground: vec4(0.0, 0.0, 1.0, 1.0),
|
||||||
|
color_background: vec4(0.0, 0.0, 0.0, 1.0),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const BAR_HEIGHT: f32 = 20.0;
|
const BAR_HEIGHT: f32 = 20.0;
|
||||||
|
|
Loading…
Reference in a new issue