mirror of
https://github.com/Relintai/ui_extensions.git
synced 2025-02-20 17:04:26 +01:00
Clang format.
This commit is contained in:
parent
eb6be07648
commit
8c4302f7f7
@ -32,13 +32,12 @@ void BSInputEventKey::from_input_event_key(const Ref<InputEventKey> event) {
|
|||||||
set_command(event->get_command());
|
set_command(event->get_command());
|
||||||
|
|
||||||
set_pressed(event->is_pressed());
|
set_pressed(event->is_pressed());
|
||||||
|
|
||||||
|
|
||||||
#if VERSION_MAJOR < 4
|
#if VERSION_MAJOR < 4
|
||||||
set_scancode(event->get_scancode());
|
set_scancode(event->get_scancode());
|
||||||
#else
|
#else
|
||||||
set_keycode(event->get_keycode());
|
set_keycode(event->get_keycode());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
set_unicode(event->get_unicode());
|
set_unicode(event->get_unicode());
|
||||||
set_echo(event->is_echo());
|
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())
|
if (key.is_null())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#if VERSION_MAJOR < 4
|
#if VERSION_MAJOR < 4
|
||||||
uint32_t code = get_scancode_with_modifiers();
|
uint32_t code = get_scancode_with_modifiers();
|
||||||
uint32_t event_code = key->get_scancode_with_modifiers();
|
uint32_t event_code = key->get_scancode_with_modifiers();
|
||||||
#else
|
#else
|
||||||
uint32_t code = get_keycode_with_modifiers();
|
uint32_t code = get_keycode_with_modifiers();
|
||||||
uint32_t event_code = key->get_keycode_with_modifiers();
|
uint32_t event_code = key->get_keycode_with_modifiers();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool match = code == event_code;
|
bool match = code == event_code;
|
||||||
if (match) {
|
if (match) {
|
||||||
|
@ -22,15 +22,13 @@ SOFTWARE.
|
|||||||
|
|
||||||
#include "register_types.h"
|
#include "register_types.h"
|
||||||
|
|
||||||
#include "touch_button.h"
|
|
||||||
#include "bs_input_event_key.h"
|
#include "bs_input_event_key.h"
|
||||||
|
#include "touch_button.h"
|
||||||
|
|
||||||
void register_ui_extensions_types() {
|
void register_ui_extensions_types() {
|
||||||
ClassDB::register_class<TouchButton>();
|
ClassDB::register_class<TouchButton>();
|
||||||
ClassDB::register_class<BSInputEventKey>();
|
ClassDB::register_class<BSInputEventKey>();
|
||||||
}
|
|
||||||
|
|
||||||
void unregister_ui_extensions_types() {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void unregister_ui_extensions_types() {
|
||||||
|
}
|
||||||
|
@ -92,7 +92,6 @@ void TouchButton::_input(Ref<InputEvent> p_event) {
|
|||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TouchButton::_gui_input(Ref<InputEvent> p_event) {
|
void TouchButton::_gui_input(Ref<InputEvent> p_event) {
|
||||||
if (p_event->get_device() == -1) {
|
if (p_event->get_device() == -1) {
|
||||||
accept_event();
|
accept_event();
|
||||||
@ -120,6 +119,6 @@ bool TouchButton::_is_point_inside(const Vector2 &vec) {
|
|||||||
Point2 point;
|
Point2 point;
|
||||||
point.x = vec.x;
|
point.x = vec.x;
|
||||||
point.y = vec.y;
|
point.y = vec.y;
|
||||||
|
|
||||||
return get_global_rect().has_point(point);
|
return get_global_rect().has_point(point);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user