Skip to content

Commit

Permalink
Dont style (only colour) any of the in-game ImGUI elements
Browse files Browse the repository at this point in the history
  • Loading branch information
EddieEldridge committed Nov 28, 2023
1 parent 226472e commit dd8f114
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 30 deletions.
58 changes: 29 additions & 29 deletions M2TWEOP Code/M2TWEOP library/themeManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,35 @@ void tomlToStyle(std::string themeName)
auto config = cpptoml::parse_file(fPath);

// Assign the styles
style.Alpha = *config->get_as<double>("alpha");
style.WindowPadding = arrayToImVec2(*config->get_array_of<double>("windowPadding"));
style.WindowRounding = *config->get_as<double>("windowRounding");
style.WindowBorderSize = *config->get_as<double>("windowBorderSize");
style.WindowMinSize = arrayToImVec2(*config->get_array_of<double>("windowMinSize"));
style.WindowTitleAlign = arrayToImVec2(*config->get_array_of<double>("windowTitleAlign"));
style.WindowMenuButtonPosition = ImGuiDir_Left;
style.ColorButtonPosition = ImGuiDir_Left;
style.ChildRounding = *config->get_as<double>("childRounding");
style.ChildBorderSize = *config->get_as<double>("childBorderSize");
style.PopupRounding = *config->get_as<double>("popupRounding");
style.PopupBorderSize = *config->get_as<double>("popupBorderSize");
style.FramePadding = arrayToImVec2(*config->get_array_of<double>("framePadding"));
style.FrameRounding = *config->get_as<double>("frameRounding");
style.FrameBorderSize = *config->get_as<double>("frameBorderSize");
style.ItemSpacing = arrayToImVec2(*config->get_array_of<double>("itemSpacing"));
style.ItemInnerSpacing = arrayToImVec2(*config->get_array_of<double>("itemInnerSpacing"));
style.CellPadding = arrayToImVec2(*config->get_array_of<double>("cellPadding"));
style.IndentSpacing = *config->get_as<double>("indentSpacing");
style.ColumnsMinSpacing = *config->get_as<double>("columnsMinSpacing");
style.ScrollbarSize = *config->get_as<double>("scrollbarSize");
style.ScrollbarRounding = *config->get_as<double>("scrollbarRounding");
style.GrabMinSize = *config->get_as<double>("grabMinSize");
style.GrabRounding = *config->get_as<double>("grabRounding");
style.TabRounding = *config->get_as<double>("tabRounding");
style.TabBorderSize = *config->get_as<double>("tabBorderSize");
style.TabMinWidthForCloseButton = *config->get_as<double>("tabMinWidthForCloseButton");
style.ButtonTextAlign = arrayToImVec2(*config->get_array_of<double>("buttonTextAlign"));
style.SelectableTextAlign = arrayToImVec2(*config->get_array_of<double>("selectableTextAlign"));
// style.Alpha = *config->get_as<double>("alpha");
// style.WindowPadding = arrayToImVec2(*config->get_array_of<double>("windowPadding"));
// style.WindowRounding = *config->get_as<double>("windowRounding");
// style.WindowBorderSize = *config->get_as<double>("windowBorderSize");
// style.WindowMinSize = arrayToImVec2(*config->get_array_of<double>("windowMinSize"));
// style.WindowTitleAlign = arrayToImVec2(*config->get_array_of<double>("windowTitleAlign"));
// style.WindowMenuButtonPosition = ImGuiDir_Left;
// style.ColorButtonPosition = ImGuiDir_Left;
// style.ChildRounding = *config->get_as<double>("childRounding");
// style.ChildBorderSize = *config->get_as<double>("childBorderSize");
// style.PopupRounding = *config->get_as<double>("popupRounding");
// style.PopupBorderSize = *config->get_as<double>("popupBorderSize");
// style.FramePadding = arrayToImVec2(*config->get_array_of<double>("framePadding"));
// style.FrameRounding = *config->get_as<double>("frameRounding");
// style.FrameBorderSize = *config->get_as<double>("frameBorderSize");
// style.ItemSpacing = arrayToImVec2(*config->get_array_of<double>("itemSpacing"));
// style.ItemInnerSpacing = arrayToImVec2(*config->get_array_of<double>("itemInnerSpacing"));
// style.CellPadding = arrayToImVec2(*config->get_array_of<double>("cellPadding"));
// style.IndentSpacing = *config->get_as<double>("indentSpacing");
// style.ColumnsMinSpacing = *config->get_as<double>("columnsMinSpacing");
// style.ScrollbarSize = *config->get_as<double>("scrollbarSize");
// style.ScrollbarRounding = *config->get_as<double>("scrollbarRounding");
// style.GrabMinSize = *config->get_as<double>("grabMinSize");
// style.GrabRounding = *config->get_as<double>("grabRounding");
// style.TabRounding = *config->get_as<double>("tabRounding");
// style.TabBorderSize = *config->get_as<double>("tabBorderSize");
// style.TabMinWidthForCloseButton = *config->get_as<double>("tabMinWidthForCloseButton");
// style.ButtonTextAlign = arrayToImVec2(*config->get_array_of<double>("buttonTextAlign"));
// style.SelectableTextAlign = arrayToImVec2(*config->get_array_of<double>("selectableTextAlign"));

// // Access the 'colors' section in the TOML file
auto colorsTable = config->get_table("colors");
Expand Down
1 change: 1 addition & 0 deletions M2TWEOP DataFiles/Uninstall_EOP.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if /i "%userResponse%"=="Y" (
DEL /F /Q "lua5.1.dll"
DEL /F /Q "M2TWEOPLibrary.dll"
DEL /F /Q "openal32.dll"
DEL /F /Q "d3d9_vk.dll"
) else (
echo You chose to cancel.
)
Expand Down
2 changes: 1 addition & 1 deletion M2TWEOP DataFiles/eopData/themes/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TextDisabled = "rgba(195, 145, 67, 1.0)"
WindowBg = "rgba(13, 13, 13, 1.0)"
ChildBg = "rgba(20, 20, 20, 1.0)"
PopupBg = "rgba(20, 22, 26, 1.0)"
Border = "rgba(195, 145, 67, 1.0)"
Border = "rgba(20, 20, 20, 1.0)"
BorderShadow = "rgba(0, 0, 0, 1.0)"
FrameBg = "rgba(46, 46, 46, 1.0)"
FrameBgHovered = "rgba(40, 43, 49, 1.0)"
Expand Down

0 comments on commit dd8f114

Please sign in to comment.