Rename constants that break in MSVC

This commit is contained in:
Yousef Khadadeh 2025-11-18 21:39:14 +03:00
parent f6961fbf8d
commit 40c64eab62
7 changed files with 8 additions and 8 deletions

View file

@ -61,7 +61,7 @@ void MovableTabList::update(UpdateInputData& io, const std::vector<std::pair<std
.layoutDirection = CLAY_LEFT_TO_RIGHT
}
}) {
closeButtons[i].update(io, SelectableButton::DrawType::TRANSPARENT, [&](SelectionHelper& s, bool iS) {
closeButtons[i].update(io, SelectableButton::DrawType::TRANSPARENT_ALL, [&](SelectionHelper& s, bool iS) {
if(s.clicked)
closedTab = i;
closeIcons[i].update(io, "data/icons/close.svg", s.held || s.hovered, nullptr);

View file

@ -22,7 +22,7 @@ void SelectableButton::update(UpdateInputData& io, DrawType drawType, const std:
else
backgroundColorHighlight = {0.0f, 0.0f, 0.0f, 0.0f};
if(drawType == DrawType::TRANSPARENT || drawType == DrawType::TRANSPARENT_BORDER)
if(drawType == DrawType::TRANSPARENT_ALL || drawType == DrawType::TRANSPARENT_BORDER)
backgroundColor = {0.0f, 0.0f, 0.0f, 0.0f};
else if(drawType == DrawType::FILLED)
backgroundColor = io.theme->backColor2;

View file

@ -6,7 +6,7 @@ namespace GUIStuff {
class SelectableButton : public Element {
public:
enum class DrawType {
TRANSPARENT,
TRANSPARENT_ALL,
FILLED,
FILLED_INVERSE,
TRANSPARENT_BORDER

View file

@ -446,7 +446,7 @@ bool GUIManager::svg_icon_button_transparent(const std::string& id, const std::s
svg_icon("1", svgPath, is || s.held || s.hovered);
if(elemUpdate)
elemUpdate();
}, SelectableButton::DrawType::TRANSPARENT, isSelected);
}, SelectableButton::DrawType::TRANSPARENT_ALL, isSelected);
}
pop_id();
return toRet;
@ -509,7 +509,7 @@ bool GUIManager::text_button_left_transparent(const std::string& id, const std::
if(elemUpdate)
elemUpdate();
}
}, SelectableButton::DrawType::TRANSPARENT, isSelected);
}, SelectableButton::DrawType::TRANSPARENT_ALL, isSelected);
}
return toRet;
}