Rename constants that break in MSVC
This commit is contained in:
parent
f6961fbf8d
commit
40c64eab62
7 changed files with 8 additions and 8 deletions
|
|
@ -61,7 +61,7 @@ void MovableTabList::update(UpdateInputData& io, const std::vector<std::pair<std
|
||||||
.layoutDirection = CLAY_LEFT_TO_RIGHT
|
.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)
|
if(s.clicked)
|
||||||
closedTab = i;
|
closedTab = i;
|
||||||
closeIcons[i].update(io, "data/icons/close.svg", s.held || s.hovered, nullptr);
|
closeIcons[i].update(io, "data/icons/close.svg", s.held || s.hovered, nullptr);
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ void SelectableButton::update(UpdateInputData& io, DrawType drawType, const std:
|
||||||
else
|
else
|
||||||
backgroundColorHighlight = {0.0f, 0.0f, 0.0f, 0.0f};
|
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};
|
backgroundColor = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||||
else if(drawType == DrawType::FILLED)
|
else if(drawType == DrawType::FILLED)
|
||||||
backgroundColor = io.theme->backColor2;
|
backgroundColor = io.theme->backColor2;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ namespace GUIStuff {
|
||||||
class SelectableButton : public Element {
|
class SelectableButton : public Element {
|
||||||
public:
|
public:
|
||||||
enum class DrawType {
|
enum class DrawType {
|
||||||
TRANSPARENT,
|
TRANSPARENT_ALL,
|
||||||
FILLED,
|
FILLED,
|
||||||
FILLED_INVERSE,
|
FILLED_INVERSE,
|
||||||
TRANSPARENT_BORDER
|
TRANSPARENT_BORDER
|
||||||
|
|
|
||||||
|
|
@ -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);
|
svg_icon("1", svgPath, is || s.held || s.hovered);
|
||||||
if(elemUpdate)
|
if(elemUpdate)
|
||||||
elemUpdate();
|
elemUpdate();
|
||||||
}, SelectableButton::DrawType::TRANSPARENT, isSelected);
|
}, SelectableButton::DrawType::TRANSPARENT_ALL, isSelected);
|
||||||
}
|
}
|
||||||
pop_id();
|
pop_id();
|
||||||
return toRet;
|
return toRet;
|
||||||
|
|
@ -509,7 +509,7 @@ bool GUIManager::text_button_left_transparent(const std::string& id, const std::
|
||||||
if(elemUpdate)
|
if(elemUpdate)
|
||||||
elemUpdate();
|
elemUpdate();
|
||||||
}
|
}
|
||||||
}, SelectableButton::DrawType::TRANSPARENT, isSelected);
|
}, SelectableButton::DrawType::TRANSPARENT_ALL, isSelected);
|
||||||
}
|
}
|
||||||
return toRet;
|
return toRet;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -327,7 +327,7 @@ void InputManager::backend_key_down_update(const SDL_KeyboardEvent& e) {
|
||||||
set_key_down(e, KEY_TEXT_DELETE);
|
set_key_down(e, KEY_TEXT_DELETE);
|
||||||
if(text.textBox && key(KEY_TEXT_DELETE).repeat)
|
if(text.textBox && key(KEY_TEXT_DELETE).repeat)
|
||||||
text.do_textbox_operation_with_undo([&]() {
|
text.do_textbox_operation_with_undo([&]() {
|
||||||
text.textBox->process_key_input(*text.cursor, RichText::TextBox::InputKey::DELETE, ctrl_or_meta_held(), key(KEY_GENERIC_LSHIFT).held, text.modMap);
|
text.textBox->process_key_input(*text.cursor, RichText::TextBox::InputKey::DEL, ctrl_or_meta_held(), key(KEY_GENERIC_LSHIFT).held, text.modMap);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case SDLK_HOME:
|
case SDLK_HOME:
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ void TextBox::process_key_input(Cursor& cur, InputKey in, bool ctrl, bool shift,
|
||||||
else
|
else
|
||||||
cur.selectionEndPos = cur.selectionBeginPos = cur.pos = remove(cur.pos, move(ctrl ? Movement::LEFT_WORD : Movement::LEFT, cur.pos));
|
cur.selectionEndPos = cur.selectionBeginPos = cur.pos = remove(cur.pos, move(ctrl ? Movement::LEFT_WORD : Movement::LEFT, cur.pos));
|
||||||
break;
|
break;
|
||||||
case InputKey::DELETE:
|
case InputKey::DEL:
|
||||||
if(cur.selectionBeginPos != cur.selectionEndPos)
|
if(cur.selectionBeginPos != cur.selectionEndPos)
|
||||||
cur.selectionEndPos = cur.selectionBeginPos = cur.pos = remove(cur.selectionBeginPos, cur.selectionEndPos);
|
cur.selectionEndPos = cur.selectionBeginPos = cur.pos = remove(cur.selectionBeginPos, cur.selectionEndPos);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ class TextBox {
|
||||||
HOME,
|
HOME,
|
||||||
END,
|
END,
|
||||||
BACKSPACE,
|
BACKSPACE,
|
||||||
DELETE,
|
DEL,
|
||||||
ENTER,
|
ENTER,
|
||||||
TAB,
|
TAB,
|
||||||
SELECT_ALL
|
SELECT_ALL
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue