mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields. * The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks. * Most bitmask operations replaced by functions in BitField<> * Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is. * Documentation and API dump updated to reflect bitfields in core types.
This commit is contained in:
@@ -380,13 +380,13 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||
}
|
||||
|
||||
if (symbol_lookup_on_click_enabled) {
|
||||
if (mm->is_command_or_control_pressed() && mm->get_button_mask() == MouseButton::NONE) {
|
||||
if (mm->is_command_or_control_pressed() && mm->get_button_mask().is_empty()) {
|
||||
symbol_lookup_pos = get_line_column_at_pos(mpos);
|
||||
symbol_lookup_new_word = get_word_at_pos(mpos);
|
||||
if (symbol_lookup_new_word != symbol_lookup_word) {
|
||||
emit_signal(SNAME("symbol_validate"), symbol_lookup_new_word);
|
||||
}
|
||||
} else if (!mm->is_command_or_control_pressed() || (mm->get_button_mask() != MouseButton::NONE && symbol_lookup_pos != get_line_column_at_pos(mpos))) {
|
||||
} else if (!mm->is_command_or_control_pressed() || (!mm->get_button_mask().is_empty() && symbol_lookup_pos != get_line_column_at_pos(mpos))) {
|
||||
set_symbol_lookup_word_as_valid(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user