X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fgadgets.h;h=9f2d6e2408aa36cb5e0d204ac98bd24a30b01454;hp=17fccafad3a36a51ea5aeed663c05c97bd742af8;hb=f73405762b7a66ebed17c0f6fa56e909d7e5626f;hpb=5d1f7067db786914303167fd036d18424dce413f diff --git a/src/libgame/gadgets.h b/src/libgame/gadgets.h index 17fccafa..9f2d6e24 100644 --- a/src/libgame/gadgets.h +++ b/src/libgame/gadgets.h @@ -112,7 +112,8 @@ #define GDI_INFO_TEXT 48 #define GDI_ACTIVE 49 #define GDI_DIRECT_DRAW 50 -#define GDI_CALLBACK_ACTION_ALWAYS 51 +#define GDI_OVERLAY_TOUCH_BUTTON 51 +#define GDI_CALLBACK_ACTION_ALWAYS 52 // gadget deactivation hack #define GDI_ACTIVE_POS(a) ((a) < 0 ? POS_OFFSCREEN : (a)) @@ -237,6 +238,7 @@ struct GadgetInfo int custom_type_id; // custom gadget type identifier char info_text[MAX_INFO_TEXTSIZE + 1];// short popup info text int x, y; // gadget position + int orig_x, orig_y; // gadget position (original) int width, height; // gadget size unsigned int type; // type (button, text input, ...) unsigned int state; // state (pressed, released, ...) @@ -245,6 +247,8 @@ struct GadgetInfo boolean mapped; // gadget is mapped on the screen boolean active; // gadget is active boolean direct_draw; // directly draw to frontbuffer + boolean overlay_touch_button; // gadget is overlay touch button + int overlay_touch_button_alpha; // overlay touch button alpha value boolean callback_action_always; // also callback if gadget unchanged int font; // font to use when inactive int font_active; // font to use when active @@ -282,6 +286,10 @@ void UnmapGadget(struct GadgetInfo *); void UnmapAllGadgets(void); void RemapAllGadgets(void); +void SetGadgetsPosition_OverlayTouchButtons(void); +void DrawGadgets_OverlayTouchButtons(void); +boolean CheckPosition_OverlayTouchButtons(int, int, int); + boolean anyTextInputGadgetActive(void); boolean anyTextAreaGadgetActive(void); boolean anySelectboxGadgetActive(void);