diff --git a/tests/lua-game-controller-test/src/GameControllerTest.lua b/tests/lua-game-controller-test/src/GameControllerTest.lua index ca87a39bef..9b186fb84b 100644 --- a/tests/lua-game-controller-test/src/GameControllerTest.lua +++ b/tests/lua-game-controller-test/src/GameControllerTest.lua @@ -276,6 +276,10 @@ function GameControllerTest:registerControllerListener() holder._buttonL1:setColor(cc.c3b(19,231,238)) elseif keyCode == cc.ControllerKey.BUTTON_RIGHT_SHOULDER then holder._buttonR1:setColor(cc.c3b(19,231,238)) + elseif keyCode == cc.ControllerKey.BUTTON_LEFT_THUMBSTICK then + holder._leftJoystick:setColor(cc.c3b(19,231,238)) + elseif keyCode == cc.ControllerKey.BUTTON_RIGHT_THUMBSTICK then + holder._rightJoystick:setColor(cc.c3b(19,231,238)) else local ketStatus = string.format("Key Down:%d",keyCode) holder._externalKeyLabel:setString(ketStatus) @@ -301,6 +305,10 @@ function GameControllerTest:registerControllerListener() holder._buttonL1:setColor(cc.c3b(250,255,255)) elseif keyCode == cc.ControllerKey.BUTTON_RIGHT_SHOULDER then holder._buttonR1:setColor(cc.c3b(250,255,255)) + elseif keyCode == cc.ControllerKey.BUTTON_LEFT_THUMBSTICK then + holder._leftJoystick:setColor(cc.c3b(250,255,255)) + elseif keyCode == cc.ControllerKey.BUTTON_RIGHT_THUMBSTICK then + holder._rightJoystick:setColor(cc.c3b(250,255,255)) else local ketStatus = string.format("Key Up:%d",keyCode) holder._externalKeyLabel:setString(ketStatus)