It seems fairly obvious that a bracket-style scoping of ImGuiContext mutation should be supported per the dear-imgui.hs API. My intuition says to more-or-less implement a function such as:
setStyleVar :: (MonadIO m) => StyleVar -> StyleVarValue -> m a -> m a
setStyleVars :: (MonadIO m) => [(StyleVar, StyleVarValue)] -> m a -> m a
this would effectively invoke pushStyleVar with its first two parameters, invoke the provided MonadIO instance, and then invoke popStyleVar.
It seems fairly obvious that a bracket-style scoping of ImGuiContext mutation should be supported per the dear-imgui.hs API. My intuition says to more-or-less implement a function such as:
this would effectively invoke pushStyleVar with its first two parameters, invoke the provided MonadIO instance, and then invoke popStyleVar.