mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-12 05:58:35 +00:00
Implement new_line(), calc_text_size(), and with_style_var_pushed_*() methods I needed while making a demo. I'm pretty new to Rust, but ran into this issue and thought I could maybe solve it while I was learning the library. https://github.com/Gekkio/imgui-rs/issues/39 I'm curious on your thoughts on these additions. Please LMK if you would prefer a different direction, I'm pretty new to both Rust and this library so please let me know if you have any suggestions! I'm hoping to contribute to this library moving forward, as I work on my game's UI.
18 lines
381 B
Rust
18 lines
381 B
Rust
use ImVec2;
|
|
|
|
#[derive(Copy, Clone, Debug, PartialEq)]
|
|
pub enum StyleVar {
|
|
Alpha(f32),
|
|
WindowPadding(ImVec2),
|
|
WindowRounding(f32),
|
|
WindowMinSize(ImVec2),
|
|
ChildWindowRounding(f32),
|
|
FramePadding(ImVec2),
|
|
FrameRounding(f32),
|
|
ItemSpacing(ImVec2),
|
|
ItemInnerSpacing(ImVec2),
|
|
IndentSpacing(f32),
|
|
GrabMinSize(f32),
|
|
ButtonTextAlign(ImVec2),
|
|
}
|