Hi long time since ive been on, im getting back into programming with B4a but ive already hit a snag i have to scroll to the right in the project viewer as shown in the attached image.
i couldn't see word wrap option in the application window for B4a?
Maybe in future. Dont know if this is planned.
But you can split your string to multiple lines using _
or you can use the new string literals using
$"Long text
over multiple lines
to read it better"$
I also use the underscore character a lot!
So much that my B4A code even looks like C/Java sometimes...
B4X:
If ( _
Controller.L_Analog_X >= Controller.Dead_Zone _
OR Controller.L_Analog_Y >= Controller.Dead_Zone _
OR Controller.R_Analog_X >= Controller.Dead_Zone _
OR Controller.R_Analog_Y >= Controller.Dead_Zone _
OR Controller.L_Trigger >= Controller.Dead_Zone _
OR Controller.R_Trigger >= Controller.Dead_Zone _
) _
AND _
Not(Gamepad_Mode) Then
Gamepad_Mode = True
Hide_Controls(Player)
End If
I use a 4K screen. If I get too long lines on that one, I'm doing something wrong...
Also, as others have said, consider the _. Usually, if you get too long lines, breaking them improves readability. It also provides breaks at logical places, something a word wrap might not do.