public void pushStyleVar(StyleVar var, float value) { StyleMod mod = new StyleMod(); mod.style = var; switch (var) { case StyleVar.Alpha: mod.prevousValue.X = alpha; alpha = value; break; case StyleVar.WindowFillAlpha: mod.prevousValue.X = windowFillAlphaDefault; windowFillAlphaDefault = value; break; case StyleVar.WindowRounding: mod.prevousValue.X = windowRounding; windowRounding = value; break; case StyleVar.ChildWindowRounding: mod.prevousValue.X = childWindowRounding; childWindowRounding = value; break; case StyleVar.FrameRounding: mod.prevousValue.X = frameRounding; frameRounding = value; break; case StyleVar.IndentSpacing: mod.prevousValue.X = indentSpacing; indentSpacing = value; break; case StyleVar.GrabMinSize: mod.prevousValue.X = grabMinSize; grabMinSize = value; break; default: throw new Exception(String.Format("Can't find float var {0}", var)); } styleStack.Push(mod); }
public void pushStyleVar(StyleVar var, Vector2 value) { StyleMod mod = new StyleMod(); mod.style = var; switch (var) { case StyleVar.WindowPadding: mod.prevousValue = windowPadding; windowPadding = value; break; case StyleVar.WindowMinSize: mod.prevousValue = windowMinSize; windowMinSize = value; break; case StyleVar.FramePadding: mod.prevousValue = framePadding; framePadding = value; break; case StyleVar.ItemSpacing: mod.prevousValue = itemSpacing; itemSpacing = value; break; case StyleVar.ItemInnerSpacing: mod.prevousValue = itemInnerSpacing; itemInnerSpacing = value; break; default: throw new Exception(String.Format("Can't find Vector2 var {0}", var)); } styleStack.Push(mod); }
public static extern void igPushStyleVarVec(StyleVar idx, Vector2 val);
public static extern void igPushStyleVar(StyleVar idx, float val);
public static void PushStyleVar(StyleVar var, Vector2 value) => ImGuiNative.igPushStyleVarVec(var, value);
public static void PushStyleVar(StyleVar var, float value) => ImGuiNative.igPushStyleVar(var, value);
public static void PushStyleVar(StyleVar style_item, float value) { imnodesNative.imnodes_PushStyleVar(style_item, value); }
public static extern void imnodes_PushStyleVar(StyleVar style_item, float value);