Skip to content

Commit

Permalink
fixes enum of styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ericoporto committed Jun 6, 2020
1 parent 7400434 commit f28a2da
Showing 1 changed file with 57 additions and 57 deletions.
114 changes: 57 additions & 57 deletions agsimgui/agsimgui.cpp
Expand Up @@ -190,64 +190,64 @@ namespace agsimgui {
" \r\n"
" enum ImGuiCol_ \r\n"
" { \r\n"
" ImGuiCol_Text, \r\n"
" ImGuiCol_TextDisabled, \r\n"
" ImGuiCol_WindowBg, // Background of normal windows \r\n"
" ImGuiCol_ChildBg, // Background of child windows \r\n"
" ImGuiCol_PopupBg, // Background of popups, menus, tooltips windows \r\n"
" ImGuiCol_Border, \r\n"
" ImGuiCol_BorderShadow, \r\n"
" ImGuiCol_FrameBg, // Background of checkbox, radio button, plot, slider, text input \r\n"
" ImGuiCol_FrameBgHovered, \r\n"
" ImGuiCol_FrameBgActive, \r\n"
" ImGuiCol_TitleBg, \r\n"
" ImGuiCol_TitleBgActive, \r\n"
" ImGuiCol_TitleBgCollapsed, \r\n"
" ImGuiCol_MenuBarBg, \r\n"
" ImGuiCol_ScrollbarBg, \r\n"
" ImGuiCol_ScrollbarGrab, \r\n"
" ImGuiCol_ScrollbarGrabHovered, \r\n"
" ImGuiCol_ScrollbarGrabActive, \r\n"
" ImGuiCol_CheckMark, \r\n"
" ImGuiCol_SliderGrab, \r\n"
" ImGuiCol_SliderGrabActive, \r\n"
" ImGuiCol_Button, \r\n"
" ImGuiCol_ButtonHovered, \r\n"
" ImGuiCol_ButtonActive, \r\n"
" ImGuiCol_Header, // Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem \r\n"
" ImGuiCol_HeaderHovered, \r\n"
" ImGuiCol_HeaderActive, \r\n"
" ImGuiCol_Separator, \r\n"
" ImGuiCol_SeparatorHovered, \r\n"
" ImGuiCol_SeparatorActive, \r\n"
" ImGuiCol_ResizeGrip, \r\n"
" ImGuiCol_ResizeGripHovered, \r\n"
" ImGuiCol_ResizeGripActive, \r\n"
" ImGuiCol_Tab, \r\n"
" ImGuiCol_TabHovered, \r\n"
" ImGuiCol_TabActive, \r\n"
" ImGuiCol_TabUnfocused, \r\n"
" ImGuiCol_TabUnfocusedActive, \r\n"
" ImGuiCol_PlotLines, \r\n"
" ImGuiCol_PlotLinesHovered, \r\n"
" ImGuiCol_PlotHistogram, \r\n"
" ImGuiCol_PlotHistogramHovered, \r\n"
" ImGuiCol_TextSelectedBg, \r\n"
" ImGuiCol_DragDropTarget, \r\n"
" ImGuiCol_NavHighlight, // Gamepad/keyboard: current highlighted item \r\n"
" ImGuiCol_NavWindowingHighlight, // Highlight window when using CTRL+TAB \r\n"
" ImGuiCol_NavWindowingDimBg, // Darken/colorize entire screen behind the CTRL+TAB window list, when active \r\n"
" ImGuiCol_ModalWindowDimBg, // Darken/colorize entire screen behind a modal window, when one is active \r\n"
" ImGuiCol_COUNT \r\n"
" eImGuiCol_Text, \r\n"
" eImGuiCol_TextDisabled, \r\n"
" eImGuiCol_WindowBg, // Background of normal windows \r\n"
" eImGuiCol_ChildBg, // Background of child windows \r\n"
" eImGuiCol_PopupBg, // Background of popups, menus, tooltips windows \r\n"
" eImGuiCol_Border, \r\n"
" eImGuiCol_BorderShadow, \r\n"
" eImGuiCol_FrameBg, // Background of checkbox, radio button, plot, slider, text input \r\n"
" eImGuiCol_FrameBgHovered, \r\n"
" eImGuiCol_FrameBgActive, \r\n"
" eImGuiCol_TitleBg, \r\n"
" eImGuiCol_TitleBgActive, \r\n"
" eImGuiCol_TitleBgCollapsed, \r\n"
" eImGuiCol_MenuBarBg, \r\n"
" eImGuiCol_ScrollbarBg, \r\n"
" eImGuiCol_ScrollbarGrab, \r\n"
" eImGuiCol_ScrollbarGrabHovered, \r\n"
" eImGuiCol_ScrollbarGrabActive, \r\n"
" eImGuiCol_CheckMark, \r\n"
" eImGuiCol_SliderGrab, \r\n"
" eImGuiCol_SliderGrabActive, \r\n"
" eImGuiCol_Button, \r\n"
" eImGuiCol_ButtonHovered, \r\n"
" eImGuiCol_ButtonActive, \r\n"
" eImGuiCol_Header, // Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem \r\n"
" eImGuiCol_HeaderHovered, \r\n"
" eImGuiCol_HeaderActive, \r\n"
" eImGuiCol_Separator, \r\n"
" eImGuiCol_SeparatorHovered, \r\n"
" eImGuiCol_SeparatorActive, \r\n"
" eImGuiCol_ResizeGrip, \r\n"
" eImGuiCol_ResizeGripHovered, \r\n"
" eImGuiCol_ResizeGripActive, \r\n"
" eImGuiCol_Tab, \r\n"
" eImGuiCol_TabHovered, \r\n"
" eImGuiCol_TabActive, \r\n"
" eImGuiCol_TabUnfocused, \r\n"
" eImGuiCol_TabUnfocusedActive, \r\n"
" eImGuiCol_PlotLines, \r\n"
" eImGuiCol_PlotLinesHovered, \r\n"
" eImGuiCol_PlotHistogram, \r\n"
" eImGuiCol_PlotHistogramHovered, \r\n"
" eImGuiCol_TextSelectedBg, \r\n"
" eImGuiCol_DragDropTarget, \r\n"
" eImGuiCol_NavHighlight, // Gamepad/keyboard: current highlighted item \r\n"
" eImGuiCol_NavWindowingHighlight, // Highlight window when using CTRL+TAB \r\n"
" eImGuiCol_NavWindowingDimBg, // Darken/colorize entire screen behind the CTRL+TAB window list, when active \r\n"
" eImGuiCol_ModalWindowDimBg, // Darken/colorize entire screen behind a modal window, when one is active \r\n"
" eImGuiCol_COUNT \r\n"
" }; \r\n"
" \r\n"
" enum ImGuiFocusedFlags \r\n"
" { \r\n"
" ImGuiFocusedFlags_None = 0, \r\n"
" ImGuiFocusedFlags_ChildWindows = 1, // IsWindowFocused(): Return true if any children of the window is focused \r\n"
" ImGuiFocusedFlags_RootWindow = 2, // IsWindowFocused(): Test from root window (top most parent of the current hierarchy) \r\n"
" ImGuiFocusedFlags_AnyWindow = 4, // IsWindowFocused(): Return true if any window is focused. \r\n"
" ImGuiFocusedFlags_RootAndChildWindows = 3 \r\n"
" eImGuiFocusedFlags_None = 0, \r\n"
" eImGuiFocusedFlags_ChildWindows = 1, // IsWindowFocused(): Return true if any children of the window is focused \r\n"
" eImGuiFocusedFlags_RootWindow = 2, // IsWindowFocused(): Test from root window (top most parent of the current hierarchy) \r\n"
" eImGuiFocusedFlags_AnyWindow = 4, // IsWindowFocused(): Return true if any window is focused. \r\n"
" eImGuiFocusedFlags_RootAndChildWindows = 3 \r\n"
" }; \r\n"
" \r\n"
" enum ImGuiHoveredFlags \r\n"
Expand Down Expand Up @@ -585,7 +585,7 @@ namespace agsimgui {
" import attribute float CircleSegmentMaxError; \r\n"
" \r\n"
" /// Colors \r\n"
" import attribute ImVec4 Colors[ImGuiCol_COUNT]; \r\n"
" import attribute ImVec4 Colors[]; \r\n"
" }; \r\n"
" \r\n"
" struct AgsImGui{ \r\n"
Expand Down Expand Up @@ -1650,14 +1650,14 @@ uint32_t AgsImGuiStyle_GetCircleSegmentMaxError(AgsImGuiStyle* self){


void AgsImGuiStyle_SetColors(AgsImGuiStyle* self, int i, AgsImVec4* color){
if ((i < 0) || (i > ImGuiCol_COUNT))
if ((i < 0) || (i >= ImGuiCol_COUNT))
return;

SetAgsImVec4(self->Colors[i], color);
}

AgsImVec4* AgsImGuiStyle_GetColors(AgsImGuiStyle* self, int i){
if ((i < 0) || (i > ImGuiCol_COUNT))
if ((i < 0) || (i >= ImGuiCol_COUNT))
return nullptr;

return NewAgsImVec4(self->Colors[i]);
Expand Down

0 comments on commit f28a2da

Please sign in to comment.