mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-22 00:48:09 +01:00
Fix logic.
This commit is contained in:
parent
1d20785663
commit
59d5eedf61
@ -1028,9 +1028,9 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
|
||||
// Keep track internally of which mouse buttons are pressed
|
||||
// so we can disallow changing tool.
|
||||
if (mb->is_pressed()) {
|
||||
_mouse_buttons_pressed |= mb->get_button_index();
|
||||
_mouse_buttons_pressed |= (1 << mb->get_button_index());
|
||||
} else {
|
||||
_mouse_buttons_pressed &= ~mb->get_button_index();
|
||||
_mouse_buttons_pressed &= ~(1 << mb->get_button_index());
|
||||
}
|
||||
|
||||
if (mb->get_button_index() == BUTTON_LEFT) {
|
||||
@ -1948,6 +1948,8 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
|
||||
editor = p_editor;
|
||||
undo_redo = EditorNode::get_undo_redo();
|
||||
|
||||
_mouse_buttons_pressed = 0;
|
||||
|
||||
tool = TOOL_NONE;
|
||||
selection_active = false;
|
||||
mouse_over = false;
|
||||
|
@ -111,7 +111,7 @@ class TileMapEditor : public VBoxContainer {
|
||||
|
||||
Tool tool;
|
||||
Tool last_tool;
|
||||
uint32_t _mouse_buttons_pressed = 0;
|
||||
uint32_t _mouse_buttons_pressed;
|
||||
|
||||
bool selection_active;
|
||||
bool mouse_over;
|
||||
|
Loading…
Reference in New Issue
Block a user