diff options
author | Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com> | 2018-04-19 01:55:42 +0700 |
---|---|---|
committer | SmallJoker <SmallJoker@users.noreply.github.com> | 2018-04-18 20:55:42 +0200 |
commit | b1e58c9c35ae3eb6167a0745086cdb0ddb1dd9d7 (patch) | |
tree | cca81d8b9b1839c25d42e165259165965bf23e82 /src/gui/touchscreengui.h | |
parent | cca925377b7929276de3bb04553ca6ee2012d35d (diff) | |
download | dragonfireclient-b1e58c9c35ae3eb6167a0745086cdb0ddb1dd9d7.tar.xz |
Android: Modify touch screen GUI's buttons (#7240)
* Android: Add zoom, minimap, and toggle chat button
Zoom button is put above jump button.
Minimap and toggle chat button are put in settings bar.
* Jump button is rotated down button
* Move three buttons on the right screen higher
Diffstat (limited to 'src/gui/touchscreengui.h')
-rw-r--r-- | src/gui/touchscreengui.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/touchscreengui.h b/src/gui/touchscreengui.h index 21c52f756..d3ce84929 100644 --- a/src/gui/touchscreengui.h +++ b/src/gui/touchscreengui.h @@ -36,6 +36,7 @@ using namespace irr::gui; typedef enum { jump_id = 0, crunch_id, + zoom_id, after_last_element_id, settings_starter_id, rare_controls_starter_id, @@ -45,6 +46,8 @@ typedef enum { debug_id, camera_id, range_id, + minimap_id, + toggle_chat_id, chat_id, inventory_id, drop_id, @@ -70,7 +73,7 @@ typedef enum { #define MAX_TOUCH_COUNT 64 #define BUTTON_REPEAT_DELAY 0.2f -#define SETTINGS_BAR_Y_OFFSET 6.5 +#define SETTINGS_BAR_Y_OFFSET 5 #define RARE_CONTROLS_BAR_Y_OFFSET 4 extern const char **touchgui_button_imagenames; @@ -84,6 +87,10 @@ struct button_info std::vector<int> ids; IGUIButton *guibutton = nullptr; bool immediate_release; + + // 0: false, 1: (true) first texture, 2: (true) second texture + int togglable = 0; + std::vector<const char *> textures; }; class AutoHideButtonBar @@ -101,6 +108,10 @@ public: void addButton(touch_gui_button_id id, const wchar_t *caption, const char *btn_image); + // add toggle button to be shown + void addToggleButton(touch_gui_button_id id, const wchar_t *caption, + const char *btn_image_1, const char *btn_image_2); + // detect settings bar button events bool isButton(const SEvent &event); |