2022-03-17 22:33:22 +01:00
|
|
|
#ifndef TOUCH_BUTTON_H
|
|
|
|
#define TOUCH_BUTTON_H
|
2023-12-17 22:59:50 +01:00
|
|
|
|
2022-03-15 13:29:32 +01:00
|
|
|
|
2022-08-17 15:35:28 +02:00
|
|
|
#include "core/config/engine.h"
|
2022-03-15 13:29:32 +01:00
|
|
|
|
|
|
|
#include "core/os/os.h"
|
|
|
|
#include "scene/gui/button.h"
|
|
|
|
#include "scene/main/viewport.h"
|
|
|
|
|
|
|
|
class TouchButton : public Button {
|
|
|
|
GDCLASS(TouchButton, Button);
|
|
|
|
|
|
|
|
public:
|
|
|
|
TouchButton() {}
|
|
|
|
|
|
|
|
bool _is_point_inside(const Point2 &p_point);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void _notification(int p_what);
|
|
|
|
virtual void _gui_input(Ref<InputEvent> p_event);
|
2023-09-07 09:56:16 +02:00
|
|
|
virtual void _shortcut_input(Ref<InputEvent> p_event);
|
2022-03-15 13:29:32 +01:00
|
|
|
void _input(Ref<InputEvent> p_event);
|
|
|
|
static void _bind_methods();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|