diff --git a/README.md b/README.md index 492b17ce..68a95e69 100644 --- a/README.md +++ b/README.md @@ -25,13 +25,13 @@ Or point to the ZIP file of a [specific release](https://github.com/Insality/dru **Druid** requires the following input bindings: - Mouse trigger - `Button 1` -> `touch` _For basic input components_ -- Mouse trigger - `Wheel up` -> `scroll_up` _For scroll component_ -- Mouse trigger - `Wheel down` -> `scroll_down` _For scroll component_ +- Mouse trigger - `Wheel up` -> `mouse_wheel_up` _For scroll component_ +- Mouse trigger - `Wheel down` -> `mouse_wheel_down` _For scroll component_ - Key trigger - `Backspace` -> `key_backspace` _For back_handler component, input component_ - Key trigger - `Back` -> `key_back` _For back_handler component, Android back button, input component_ - Key trigger - `Enter` -> `key_enter` _For input component, optional_ - Key trigger - `Esc` -> `key_esc` _For input component, optional_ -- Touch triggers - `Touch multi` -> `multitouch` _For scroll component_ +- Touch triggers - `Touch multi` -> `touch_multi` _For scroll component_ ![](media/input_binding_2.png) ![](media/input_binding_1.png) @@ -50,9 +50,9 @@ input_key_esc = key_esc input_key_back = key_back input_key_enter = key_enter input_key_backspace = key_backspace -input_multitouch = multitouch -input_scroll_up = scroll_up -input_scroll_down = scroll_down +input_multitouch = touch_multi +input_scroll_up = mouse_wheel_up +input_scroll_down = mouse_wheel_down ``` diff --git a/druid/const.lua b/druid/const.lua index 52762996..7aa1d5c0 100755 --- a/druid/const.lua +++ b/druid/const.lua @@ -14,11 +14,11 @@ M.ACTION_MARKED_TEXT = hash(sys.get_config("druid.input_marked_text", "marked_te M.ACTION_ESC = hash(sys.get_config("druid.input_key_esc", "key_esc")) M.ACTION_BACK = hash(sys.get_config("druid.input_key_back", "key_back")) M.ACTION_ENTER = hash(sys.get_config("druid.input_key_enter", "key_enter")) -M.ACTION_MULTITOUCH = hash(sys.get_config("druid.input_multitouch", "multitouch")) +M.ACTION_MULTITOUCH = hash(sys.get_config("druid.input_multitouch", "touch_multi")) M.ACTION_BACKSPACE = hash(sys.get_config("druid.input_key_backspace", "key_backspace")) -M.ACTION_SCROLL_UP = hash(sys.get_config("druid.input_scroll_up", "scroll_up")) -M.ACTION_SCROLL_DOWN = hash(sys.get_config("druid.input_scroll_down", "scroll_down")) +M.ACTION_SCROLL_UP = hash(sys.get_config("druid.input_scroll_up", "mouse_wheel_up")) +M.ACTION_SCROLL_DOWN = hash(sys.get_config("druid.input_scroll_down", "mouse_wheel_down")) M.IS_STENCIL_CHECK = not (sys.get_config("druid.no_stencil_check") == "1") diff --git a/example/example.gui_script b/example/example.gui_script index e42c6c2d..2d9a3129 100644 --- a/example/example.gui_script +++ b/example/example.gui_script @@ -121,6 +121,7 @@ local function init_lobby(self) self.lobby_scroll = self.druid:new_scroll("lobby_view", "lobby_content") self.lobby_grid = self.druid:new_dynamic_grid("lobby_content") self.lobby_scroll:bind_grid(self.lobby_grid) + self.lobby_scroll.style.WHEEL_SCROLL_SPEED = 20 self.lobby_grid:add(get_title(self, "General examples")) self.lobby_grid:add(get_button(self, "Overview", "general_overview", "/general/overview/overview.gui_script")) diff --git a/game.project b/game.project index d5aaf3aa..3e4b2d68 100644 --- a/game.project +++ b/game.project @@ -36,9 +36,9 @@ input_key_esc = key_esc input_key_back = key_back input_key_enter = key_enter input_key_backspace = key_backspace -input_multitouch = multitouch -input_scroll_up = scroll_up -input_scroll_down = scroll_down +input_multitouch = touch_multi +input_scroll_up = mouse_wheel_up +input_scroll_down = mouse_wheel_down [html5] engine_arguments = --verify-graphics-calls=false diff --git a/input/game.input_binding b/input/game.input_binding index a6d0b3a3..e42b4b5f 100644 --- a/input/game.input_binding +++ b/input/game.input_binding @@ -32,11 +32,11 @@ key_trigger { } mouse_trigger { input: MOUSE_WHEEL_UP - action: "scroll_up" + action: "mouse_wheel_up" } mouse_trigger { input: MOUSE_WHEEL_DOWN - action: "scroll_down" + action: "mouse_wheel_down" } mouse_trigger { input: MOUSE_BUTTON_1 @@ -44,7 +44,7 @@ mouse_trigger { } touch_trigger { input: TOUCH_MULTI - action: "multitouch" + action: "touch_multi" } text_trigger { input: TEXT diff --git a/media/input_binding_1.png b/media/input_binding_1.png index aa0856a6..ca902e9f 100644 Binary files a/media/input_binding_1.png and b/media/input_binding_1.png differ diff --git a/settings_deployer b/settings_deployer index 36568b59..f54021b0 100644 --- a/settings_deployer +++ b/settings_deployer @@ -1,4 +1,4 @@ #!/bin/bash use_latest_bob=false enable_incremental_version=true -bob_sha="3.0:0e77ba11ac957ee01878bbde2e6ac0c9fae6dc01" +bob_sha="4.0:f4a699eb412a2445e894568f2d7466aba61b4c41"