Clang format.

This commit is contained in:
Relintai 2020-04-10 13:57:06 +02:00
parent eb6be07648
commit 8c4302f7f7
3 changed files with 10 additions and 14 deletions

View File

@ -32,13 +32,12 @@ void BSInputEventKey::from_input_event_key(const Ref<InputEventKey> event) {
set_command(event->get_command());
set_pressed(event->is_pressed());
#if VERSION_MAJOR < 4
#if VERSION_MAJOR < 4
set_scancode(event->get_scancode());
#else
#else
set_keycode(event->get_keycode());
#endif
#endif
set_unicode(event->get_unicode());
set_echo(event->is_echo());
@ -50,13 +49,13 @@ bool BSInputEventKey::action_match(const Ref<InputEvent> &p_event, bool *p_press
if (key.is_null())
return false;
#if VERSION_MAJOR < 4
#if VERSION_MAJOR < 4
uint32_t code = get_scancode_with_modifiers();
uint32_t event_code = key->get_scancode_with_modifiers();
#else
#else
uint32_t code = get_keycode_with_modifiers();
uint32_t event_code = key->get_keycode_with_modifiers();
#endif
#endif
bool match = code == event_code;
if (match) {

View File

@ -22,15 +22,13 @@ SOFTWARE.
#include "register_types.h"
#include "touch_button.h"
#include "bs_input_event_key.h"
#include "touch_button.h"
void register_ui_extensions_types() {
ClassDB::register_class<TouchButton>();
ClassDB::register_class<BSInputEventKey>();
}
void unregister_ui_extensions_types() {
}
void unregister_ui_extensions_types() {
}

View File

@ -92,7 +92,6 @@ void TouchButton::_input(Ref<InputEvent> p_event) {
}*/
}
void TouchButton::_gui_input(Ref<InputEvent> p_event) {
if (p_event->get_device() == -1) {
accept_event();
@ -120,6 +119,6 @@ bool TouchButton::_is_point_inside(const Vector2 &vec) {
Point2 point;
point.x = vec.x;
point.y = vec.y;
return get_global_rect().has_point(point);
}