Change structs to match imgui 1.84

Also change oddly-specific test to avoid having to change it every update
This commit is contained in:
dbr 2021-09-13 14:42:44 +10:00
parent 6007bc5a4b
commit e39ab4249e
5 changed files with 6 additions and 1 deletions

View File

@ -48,6 +48,7 @@ pub struct FontAtlas {
pub tex_glyph_padding: i32,
locked: bool,
text_ready: bool,
tex_pixels_use_colors: bool,
tex_pixels_alpha8: *mut u8,
tex_pixels_rgba32: *mut u32,

View File

@ -19,6 +19,7 @@ pub struct Font {
pub config_data_count: i16,
pub fallback_char: sys::ImWchar,
pub ellipsis_char: sys::ImWchar,
pub dot_char: sys::ImWchar,
pub dirty_lookup_tables: bool,
pub scale: f32,
pub ascent: f32,

View File

@ -292,6 +292,7 @@ pub struct Io {
pub mouse_delta: [f32; 2],
key_mods: sys::ImGuiKeyModFlags,
key_mods_prev: sys::ImGuiKeyModFlags,
mouse_pos_prev: [f32; 2],
mouse_clicked_pos: [[f32; 2]; 5],
mouse_clicked_time: [f64; 5],

View File

@ -96,7 +96,7 @@ pub fn dear_imgui_version() -> &'static str {
#[test]
fn test_version() {
// TODO: what's the point of this test?
assert_eq!(dear_imgui_version(), "1.82");
assert!(dear_imgui_version().starts_with("1."));
}
impl Context {

View File

@ -10,6 +10,8 @@ use crate::Direction;
pub struct Style {
/// Global alpha applies to everything
pub alpha: f32,
/// Additional alpha multiplier applied to disabled elements. Multiplies over current value of [`Style::alpha`].
pub disabled_alpha: f32,
/// Padding within a window
pub window_padding: [f32; 2],
/// Rounding radius of window corners.