1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Refactor: remove GuiCmd

This commit is contained in:
Emil Ernerfeldt
2019-03-11 15:59:49 +01:00
parent 87288634e9
commit 192b59ebb0
6 changed files with 153 additions and 254 deletions

View File

@@ -111,47 +111,6 @@ pub struct InteractInfo {
pub rect: Rect,
}
#[derive(Clone, Debug, Serialize)]
pub enum GuiCmd {
PaintCommands(Vec<PaintCmd>),
/// The background for a button
Button {
interact: InteractInfo,
},
Checkbox {
checked: bool,
interact: InteractInfo,
},
/// The header button background for a foldable region
FoldableHeader {
interact: InteractInfo,
open: bool,
},
RadioButton {
checked: bool,
interact: InteractInfo,
},
Slider {
interact: InteractInfo,
max: f32,
min: f32,
value: f32,
},
/// A string of text with a position for each character.
Text {
color: Option<Color>,
pos: Vec2,
text: String,
text_style: TextStyle,
/// Start each character in the text, as offset from pos.
x_offsets: Vec<f32>,
},
/// Background of e.g. a popup
Window {
rect: Rect,
},
}
// ----------------------------------------------------------------------------
#[derive(Clone, Debug, Serialize)]