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
GetStyleColorVec4 seems to just be used to pass a reference to PushStyleColor, so I don't think we need to do anything special.
On the other hand, GetIO and GetStyle allow the user to change internal ImGui settings by mutating the state. So I think we might want a slightly different API. For instance, we could have:
This would definitely be an improvement in usability over manually mutating fields through the reference.
Another upside is that it avoids us having to actually define the ImGuiIO and ImGuiStyle structs proper: we can just implement whatever get/set operations we want. I think this is particularly relevant with the function pointers in the ImGuiIO struct like GetClipboardTextFn, SetClipboardTextFn, where it seems much more appropriate to have a HasImGuiIOField instance for 'ClipboardTextFn as opposed to requiring the user to manage two different function pointers.
The text was updated successfully, but these errors were encountered:
These 3 functions return a reference.
GetStyleColorVec4
seems to just be used to pass a reference toPushStyleColor
, so I don't think we need to do anything special.On the other hand,
GetIO
andGetStyle
allow the user to change internal ImGui settings by mutating the state. So I think we might want a slightly different API. For instance, we could have:and then an interface for getting/setting fields:
This would definitely be an improvement in usability over manually mutating fields through the reference.
Another upside is that it avoids us having to actually define the
ImGuiIO
andImGuiStyle
structs proper: we can just implement whateverget
/set
operations we want. I think this is particularly relevant with the function pointers in theImGuiIO
struct likeGetClipboardTextFn
,SetClipboardTextFn
, where it seems much more appropriate to have aHasImGuiIOField
instance for'ClipboardTextFn
as opposed to requiring the user to manage two different function pointers.The text was updated successfully, but these errors were encountered: