public unsafe void SetFrom(ImGuiStylePtr s) { Alpha = s.Alpha; WindowPadding = Helper.V2f(s.WindowPadding); WindowRounding = s.WindowRounding; WindowBorderSize = s.WindowBorderSize; WindowMinSize = Helper.V2f(s.WindowMinSize); WindowTitleAlign = Helper.V2f(s.WindowTitleAlign); WindowMenuButtonPosition = s.WindowMenuButtonPosition; ChildRounding = s.ChildRounding; ChildBorderSize = s.ChildBorderSize; PopupRounding = s.PopupRounding; PopupBorderSize = s.PopupBorderSize; FramePadding = Helper.V2f(s.FramePadding); FrameRounding = s.FrameRounding; FrameBorderSize = s.FrameBorderSize; ItemSpacing = Helper.V2f(s.ItemSpacing); ItemInnerSpacing = Helper.V2f(s.ItemInnerSpacing); TouchExtraPadding = Helper.V2f(s.TouchExtraPadding); IndentSpacing = s.IndentSpacing; ColumnsMinSpacing = s.ColumnsMinSpacing; ScrollbarSize = s.ScrollbarSize; ScrollbarRounding = s.ScrollbarRounding; GrabMinSize = s.GrabMinSize; GrabRounding = s.GrabRounding; TabRounding = s.TabRounding; TabBorderSize = s.TabBorderSize; ColorButtonPosition = s.ColorButtonPosition; ButtonTextAlign = Helper.V2f(s.ButtonTextAlign); SelectableTextAlign = Helper.V2f(s.SelectableTextAlign); DisplayWindowPadding = Helper.V2f(s.DisplayWindowPadding); DisplaySafeAreaPadding = Helper.V2f(s.DisplaySafeAreaPadding); MouseCursorScale = s.MouseCursorScale; AntiAliasedLines = s.AntiAliasedLines; AntiAliasedFill = s.AntiAliasedFill; CurveTessellationTol = s.CurveTessellationTol; CircleTessellationMaxError = s.CircleTessellationMaxError; for (int i = 0; i < Colors.Length; ++i) { Colors[i] = Helper.Color(s.Colors[i]); } }
public static unsafe void RenderArrowPointingAt(ImDrawListPtr draw_list, Vector2 pos, Vector2 half_sz, ImGuiDir direction, Vector4 col) { uint testcol = v4_to_uint(col); switch (direction) { case ImGuiDir.Left: draw_list.AddTriangleFilled(new Vector2(pos.X + half_sz.X, pos.Y - half_sz.Y), new Vector2(pos.X + half_sz.X, pos.Y + half_sz.Y), pos, v4_to_uint(col)); return; case ImGuiDir.Right: draw_list.AddTriangleFilled(new Vector2(pos.X - half_sz.X, pos.Y + half_sz.Y), new Vector2(pos.X - half_sz.X, pos.Y - half_sz.Y), pos, v4_to_uint(col)); return; case ImGuiDir.Up: draw_list.AddTriangleFilled(new Vector2(pos.X + half_sz.X, pos.Y + half_sz.Y), new Vector2(pos.X - half_sz.X, pos.Y + half_sz.Y), pos, v4_to_uint(col)); return; case ImGuiDir.Down: draw_list.AddTriangleFilled(new Vector2(pos.X - half_sz.X, pos.Y - half_sz.Y), new Vector2(pos.X + half_sz.X, pos.Y - half_sz.Y), pos, v4_to_uint(col)); return; case ImGuiDir.None: case ImGuiDir.COUNT: break; // Fix warnings } }
public abstract byte igArrowButton(byte *str_id, ImGuiDir dir);