I am currently using a one-touch joystick and I was wondering if I create different buttons and press them will the joystick appear on top of that button? If so, how can I fix that? Thank you!
Hi. Are you saying that when you click the button the joystick also appears?
Are you returning ‘true’ from your button listener?
Oh, and how are you making your buttons? Widget Lib? SSK2? Other?
Note: There are a lot of ambiguities here because there are so many ways to set up the joystick and buttons.
I’d need to see you project in all likelihood to figure out what you’ve got mis-configured.
I updated the Easy Inputs Sampler:
https://github.com/roaminggamer/RG_FreeStuff/raw/master/SSK2/kernels/inputs_Easy/001_easyInputs.zip
See the example called ‘One Stick + Two Buttons’ in “scripts/oneStickPlusButtons.lua”
Found on RG_FreeStuff: https://github.com/roaminggamer/RG_FreeStuff/
Under the SSK2 folder: https://github.com/roaminggamer/RG_FreeStuff/SSK2/
>> https://github.com/roaminggamer/RG_FreeStuff/tree/master/SSK2/kernels/inputs_Easy
I don’t think this will help you, but I wanted to clearly demonstrate the joysticks and buttons can co-exist with no issues.
One last reply for now. You said ‘one touch joystick’ but that is not a thing in SSK2. In SSK2 I provide these easy input creators:
- One Touch- Whole screen as button.
- Two Touch - Screen split in middle horizontal emulating two buttons.
- One Stick - A joystick that has two modes.
- Two Stick - Screen is split with two joysticks, one on each half of screen.
- One Stick + One Touch- Half-screen is joystick pad, half is button. (Swap-able via configuration in call to builder.)
Lastly, the library supplies a joystick factory so you can build them directly and control where they go a little more easily.
When using the factory, there is a critical argument called ‘inputObj’ that controls how touches are processed. See the docs.
Wow, you’ve bombarded me! I’ll take a look at the example.
Also, when I meant one touch, I meant one stick/two stick. Sorry for the confusion.
Cheers,
Alex
So far, I have not added a button, I am just asking for the sake of knowing. I hope I don’t seem lazy.
I will probably use SSK2 to create the buttons. I have considered going “full SSK2” on this project just to explore some of its features.
Sigh… next time try it. I thought you did and had trouble.
Yes, buttons work fine if constructed correctly and added AFTER you create the joystick easy helper AND/OR if you add the buttons in a layer above the widget.
You may get into trouble if the joystick widget is above the buttons in the draw order.
I have looked at the example and it seems as if your buttons work quite well with the joystick.
Sorry about that! Thank you for the recommendations.
Hi. Are you saying that when you click the button the joystick also appears?
Are you returning ‘true’ from your button listener?
Oh, and how are you making your buttons? Widget Lib? SSK2? Other?
Note: There are a lot of ambiguities here because there are so many ways to set up the joystick and buttons.
I’d need to see you project in all likelihood to figure out what you’ve got mis-configured.
I updated the Easy Inputs Sampler:
https://github.com/roaminggamer/RG_FreeStuff/raw/master/SSK2/kernels/inputs_Easy/001_easyInputs.zip
See the example called ‘One Stick + Two Buttons’ in “scripts/oneStickPlusButtons.lua”
Found on RG_FreeStuff: https://github.com/roaminggamer/RG_FreeStuff/
Under the SSK2 folder: https://github.com/roaminggamer/RG_FreeStuff/SSK2/
>> https://github.com/roaminggamer/RG_FreeStuff/tree/master/SSK2/kernels/inputs_Easy
I don’t think this will help you, but I wanted to clearly demonstrate the joysticks and buttons can co-exist with no issues.
One last reply for now. You said ‘one touch joystick’ but that is not a thing in SSK2. In SSK2 I provide these easy input creators:
- One Touch- Whole screen as button.
- Two Touch - Screen split in middle horizontal emulating two buttons.
- One Stick - A joystick that has two modes.
- Two Stick - Screen is split with two joysticks, one on each half of screen.
- One Stick + One Touch- Half-screen is joystick pad, half is button. (Swap-able via configuration in call to builder.)
Lastly, the library supplies a joystick factory so you can build them directly and control where they go a little more easily.
When using the factory, there is a critical argument called ‘inputObj’ that controls how touches are processed. See the docs.
Wow, you’ve bombarded me! I’ll take a look at the example.
Also, when I meant one touch, I meant one stick/two stick. Sorry for the confusion.
Cheers,
Alex
So far, I have not added a button, I am just asking for the sake of knowing. I hope I don’t seem lazy.
I will probably use SSK2 to create the buttons. I have considered going “full SSK2” on this project just to explore some of its features.
Sigh… next time try it. I thought you did and had trouble.
Yes, buttons work fine if constructed correctly and added AFTER you create the joystick easy helper AND/OR if you add the buttons in a layer above the widget.
You may get into trouble if the joystick widget is above the buttons in the draw order.
I have looked at the example and it seems as if your buttons work quite well with the joystick.