You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, the default widget is a label, which means that if you don't specify a widget type inside an annotation, that particular struct field is rendered as a text label (provided it implements Display), which is not interactive.
The idea is to define the following default widgets for each type:
rust type
default widget
remarks
i32, u32, f32, [f32; 2], (f32, f32) etc...
input
bool
checkbox
String, ImString
input
String might need an extra allocation, which is not desirable
NOTE: Table not definitive
This way you can save a few keystrokes:
#[derive(imgui_ext::Gui)]structExample{#[imgui(checkbox)]a:bool,#[imgui(input)]b:[f32;2],}// would become equivalent to:#[derive(imgui_ext::Gui)]structExample{#[imgui]a:bool,#[imgui]b:[f32;2],}
The text was updated successfully, but these errors were encountered:
At the moment, the default widget is a label, which means that if you don't specify a widget type inside an annotation, that particular struct field is rendered as a text label (provided it implements
Display
), which is not interactive.The idea is to define the following default widgets for each type:
i32
,u32
,f32
,[f32; 2]
,(f32, f32)
etc...bool
String
,ImString
This way you can save a few keystrokes:
The text was updated successfully, but these errors were encountered: