rename keycode, mousecode enumerations

This commit is contained in:
MihailRis
2025-04-02 17:39:31 +03:00
parent 9843a1fc27
commit 881edb7b28
22 changed files with 160 additions and 154 deletions
+5 -5
View File
@@ -281,7 +281,7 @@ bool SlotView::isHighlighted() const {
void SlotView::performLeftClick(ItemStack& stack, ItemStack& grabbed) {
const auto& input = gui.getInput();
if (layout.taking && input.pressed(keycode::LEFT_SHIFT)) {
if (layout.taking && input.pressed(Keycode::LEFT_SHIFT)) {
if (layout.shareFunc) {
layout.shareFunc(layout.index, stack);
}
@@ -348,7 +348,7 @@ void SlotView::performRightClick(ItemStack& stack, ItemStack& grabbed) {
}
}
void SlotView::clicked(mousecode button) {
void SlotView::clicked(Mousecode button) {
if (bound == nullptr)
return;
auto exchangeSlot =
@@ -359,9 +359,9 @@ void SlotView::clicked(mousecode button) {
ItemStack& grabbed = exchangeSlot->getStack();
ItemStack& stack = *bound;
if (button == mousecode::BUTTON_1) {
if (button == Mousecode::BUTTON_1) {
performLeftClick(stack, grabbed);
} else if (button == mousecode::BUTTON_2) {
} else if (button == Mousecode::BUTTON_2) {
performRightClick(stack, grabbed);
}
if (layout.updateFunc) {
@@ -370,7 +370,7 @@ void SlotView::clicked(mousecode button) {
}
void SlotView::onFocus() {
clicked(mousecode::BUTTON_1);
clicked(Mousecode::BUTTON_1);
}
const std::wstring& SlotView::getTooltip() const {