Reconfigure/Remap Android buttons?

Skull Kingz

Active member
I'm not sure if I'm having a phone error or what, but I'm trying to rearrange the button configuration on the Android port and I'm having no luck at all. Any advice? The way my game is set up just doesn't feel comfortable.
 
I'm not sure if I'm having a phone error or what, but I'm trying to rearrange the button configuration on the Android port and I'm having no luck at all. Any advice? The way my game is set up just doesn't feel comfortable.
@Skull Kingz Are you trying to change the touch button layout? If yes, it's not possible through the controller config. menu (but the menu works for usb/bluetooth controllers), instead you need to edit it manually placing the "touch.txt" file inside the "saves" folder of your OpenBOR installation and then adding the code below.

You can use this one as a start point.
C:
// BUTTON           X       Y       SIZE    SECTION
button moveleft     0.14    0.25    0.09    3
button moveright    0.36    0.25    0.09    3
button moveup       0.25    0.36    0.09    3
button movedown     0.25    0.14    0.09    3
button special      0.38    0.10    0.07    2
button attack       0.24    0.24    0.07    2
button jump         0.10    0.10    0.07    2
button attack2      0.52    0.24    0.07    2
button attack3      0.38    0.38    0.07    2
button attack4      0.10    0.38    0.07    2
button esc          0.00    -0.99   0.07    0
button start        0.12    0.69    0.07    2
button screenshot   0.12    0.69    0.07    3
 
@Skull Kingz

the touch.txt file can be added into the DATA folder of any module and if you compile pretty much it will be within .pak file itself....
and when you start the game buttons will be the way you want.

in case you ever want to make a game and include a custom layout (deleted buttons, only display 4, etc)
that is how

the genious of @Kratus ´s method is that you can go in the options , choose a layout , re-start the game and the layout will be there.

the only thing that has been missing for a while is the method to replace the button graphics in order to have , say yellow buttons, custom button names , etc..
 
@Skull Kingz

just be aware that the method where you include the touch.txt files and button template within the 1699640031684.jpeg folder will most probably supercede/override any touch.txt file outside

(or is it the other way around? a touch file on the saves folder overrides the one inside the PAK?)
 
the only thing that has been missing for a while is the method to replace the button graphics in order to have , say yellow buttons, custom button names , etc..

The engine is already capable of doing it since older builds. I can prepare some documentation to be added in the new wiki.

1699671280965.png

(or is it the other way around? a touch file on the saves folder overrides the one inside the PAK?)
External saves touch.txt overrides the data folder version, this is how I change the layout/texture in the SORX. A filestream script exports a new txt file every time you change the layout through the menu.
 
@Kratus what are those red arrows ?

is this template able to make those red arrows touchable or are the red arrows the place where you add other button info in your buttons .txt ?
 
@Kratus what are those red arrows ?

is this template able to make those red arrows touchable or are the red arrows the place where you add other button info in your buttons .txt ?
These red arrows are just an illustration to show the combo keys. I posted this image to show an example of how SORX is using a custom graphic for the touch buttons.
 
Another question about the buttons, was there ever an option for a second texture for when buttons are active?
example , active buttons turns yellow when pressed

i see on this old post that there was this thing called "surface"

surface {path}
  • You can define your button's appearance using this. The path is relative to the OpenBOR folder path. If you plan to include it to your mod, you should point your touch.txt to point at the data folder. Example:
    surface data\yourbutton.png
  • The button should be in PNG and you need to follow the button template included in the tutorial zip.

by the way , the way i got it to work is with this:

//// button {name} {x} {y} {radius} {corner} 0 top left, 1 top right, 3 bott left, 2 bott right //
// -99 value hides button //
texture saves/buttonv2.png

button moveleft 0.110000 0.240000 0.090000 3
button moveright 0.370000 0.240000 0.090000 3
button moveup 0.240000 0.370000 0.090000 3
button movedown 0.240000 0.110000 0.090000 3
button special 0.24 0.23 0.080000 1
button attack 0.360000 0.230000 0.080000 2
button jump 0.230000 0.100000 0.080000 2
button attack2 0.24 0.230000 0.080000 0
button attack3 -99 -99 0.080000 2
button attack4 -99 -99 0.080000 2
button esc 0.1 0.10000 0.080000 0
button start 0.1 0.1 0.080000 1
button screenshot -99 -99 0.080000 3

there was no need for a longer path, like on other examples i saw
 
Back
Top Bottom