• Rigs of Rods 2022.04 has been released! Get it here.
  • Due to extremely high demand we are unable to handle new or existing requests to the races API. We will try to fix this as soon as possible.

UI improvement

bobz

New member
Joined
Nov 10, 2018
Messages
3
Hello I had an idea and I wanted to know what the community think about it and how hard it would be to implement.

I often have to answer questions about how to do things in RoR. And I remember when I started using it, trying all keys to find what I want.
Today with the "Controls" menu in game, it's a bit easier to find a forgotten shortcut. Anyway I think this could be improved.

What I have in mind is a bunch of buttons all around the game screen. Maybe some buttons related to vehicle itself (start, light, horn...) in the lower part of the screen. Another bunch of buttons in the right part of the screen for extra vehicle functions (reset, camera, long back space push (don't know the name of this feature)...). And finally buttons for commands (those descibed in CTRL+T window) in the left part of the screen.
Ideally those buttons could have tool tips displaying short-cuts so that users can learn them painlessly. And to avoid them to be too intrusive, those buttons could appear only when user is moving its mouse.

Please, let me know what you think about this.
 

tritonas00

Member
Invited
Joined
Jan 19, 2018
Messages
70
Hi @bobz, good to see you around!

I would like to implement this. Just to make it clear, you mean actual buttons (with icons or text as label?) that will execute commands when clicked? And hovering will show tooltips with the corresponding keyboard shortcuts?
 
OP
OP
B

bobz

New member
Joined
Nov 10, 2018
Messages
3
Great to see you are interested.
And yes, that's what I mean. Button should be clickable for beginners or users who don't want to learn shortcuts. For the other users, tooltips will help to learn or refresh memory.

The look and feel of those buttons is a good question. This should be discussed.
I think buttons with icons are more appealing and maybe more user friendly. But, if we want icons, we will need some artists to design them. Anyway I am confident we can find such contributors in the RoR community. Until those icons exists, we could stick to text only buttons for a proof of concept, then ask for help on icons design.
The case of commands buttons (CTRL+T window) is maybe different. We can't have icons for all commands. So maybe in this case we should stick to text buttons.
 

only_a_ptr

Lead Developer
Administrator
Developer
Joined
Jan 31, 2018
Messages
40
Location
Prague, CZ
Hello.

I think it's a great idea, and in fact, I've already made a proof-of-concept using DearIMGUI and scripting: https://github.com/RigsOfRods/rigs-of-rods/pull/2840. The UI is very basic, just one window with colored text, but it showcases how the script can read keyboard commands and their descriptions from input engine. It also shows how the UI can be context sensitive. The pull request is part of latest release and the demo script is distributed in /resources/scripts.zip (repo link: https://github.com/RigsOfRods/rigs-of-rods/blob/master/resources/scripts/demo_script.as).

Presently, it cannot simulate keyboard presses, but it shouldn't be hard to add such functionality if you're interested. Also, there isn't any online reference manual yet, but you can read the documentation files in the repo for the time being: https://github.com/RigsOfRods/rigs-of-rods/tree/master/doc/angelscript/Script2Game - specifically the input manager functions are in https://github.com/RigsOfRods/rigs-...oc/angelscript/Script2Game/InputEngineClass.h. The DearIMGUI bindings are completely undocumented, but all the basic widgets are available, complete list can be seen directly in the source: https://github.com/RigsOfRods/rigs-.../main/scripting/ImGuiAngelscript.cpp#L40-L443

I realize what I'm presenting here is rather crude, and I'm perfectly fine if you choose to implement the UI changes in code instead. But I think using script would make the project more flexible and accessible to contributors.
 

tritonas00

Member
Invited
Joined
Jan 19, 2018
Messages
70
Well it took some time, but concluded:

If you spawn anything and hover your mouse on the left of the screen a new menu will appear:
screenshot_2022-05-15_21-48-15_1.png


The headers are expandable and you can do various actions using the buttons and also learn the corresponding keyboard shortcuts:
screenshot_2022-05-15_21-48-01_1.png


Thanks all who contributed and gave valuable feedback!
 
Top