Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New "T-Screen" (vehicle info side-panel) #3165

Merged
merged 14 commits into from
Sep 26, 2024

Conversation

ohlidalp
Copy link
Member

@ohlidalp ohlidalp commented Jul 14, 2024

I've merged the fragmented vehicle info windows and settings into one:

  • The vehicle stats side-panel (hotkey T)
  • The vehicle description and commands window (hotkey Ctrl+T)
  • The on-mouse-hover vehicle buttons side panel
  • The diagnostic view options from TopMenubar/Tools

How it behaves now:

  • if you move the mouse to the left, and ui_show_vehicle_buttons=true (default), then the T-pane will show up translucent with the 'Basics' tab open by default but remember which tab you selected.
  • if you press T, the T-panel will show opaque and open the 'Stats' tab
  • if you press Cltr+T, the T-panel will show opaque and open the 'Commands' tab, showing the helptex texture and commands with descriptions and key combos and an unique in-scene highlight system (both the controls UI and the associated command beams on the vehicle are highlighted bright yellow).
  • The T-panel (both opaque and translucent) has an extra tab 'Diag' which contains skeletonview toggles.

The basics view (on mouse hover):
obrazek

Commands view (Hotkey Ctrl+T) - with a highlight:
obrazek

The diagnostic options:
obrazek

@ohlidalp ohlidalp force-pushed the ohlidalp_new_T-screen branch 2 times, most recently from cc620b8 to 3da215a Compare July 17, 2024 23:06
@ohlidalp ohlidalp marked this pull request as ready for review July 17, 2024 23:07
@ohlidalp
Copy link
Member Author

ohlidalp commented Aug 4, 2024

Note to self: make the panel narrower for small screens: https://discord.com/channels/136544456244461568/189904947649708032/1263347906501677078
obrazek

@ohlidalp ohlidalp force-pushed the ohlidalp_new_T-screen branch from 3da215a to 8670afe Compare August 4, 2024 12:05
@ohlidalp
Copy link
Member Author

ohlidalp commented Aug 4, 2024

To accomodate 1024x768, I've narrowed the T-panel and moved it a tad up (I had to shrink down the FPS panel, it now shows Batch count and Tri count on top).
obrazek

@woagXD
Copy link

woagXD commented Aug 18, 2024

looks pretty clean, hope it gets into the game soon!

@CuriousMike56
Copy link
Collaborator

CuriousMike56 commented Aug 19, 2024

Commands don't work at all, neither function keys or clicking the menu buttons.

FPS counter has issues at 100+ FPS:
RoR_2024-08-19_11-23-11

How it behaves now:
* if you move the mouse to the left, and `ui_show_vehicle_buttons=true` (default), then the T-pane will show up translucent with the 'Basics' tab open by default but remember which tab you selected.
* if you press T, the T-panel will show opaque and open the 'Stats' tab
* if you press Cltr+T, the T-panel will show opaque and open the 'Commands' tab, showing the `helptex` texture and commands with descriptions and key combos and an unique in-scene highlight system (both the controls UI and the associated command beams on the vehicle are highlighted bright yellow).
* The T-panel (both opaque and translucent) has an extra tab 'Diag' which contains skeletonview toggles.

How it behaved previously:
* if you move the mouse to the left, and `ui_show_vehicle_buttons=true` (default), a "Buttons UI" would appear - `GUI_VehicleButtons` by Tritonas00 - just buttons with tooltips, no text, custom light/command buttons just numbered without descriptions.
* Pressing T would show up stand-alone stats side-panel `GUI_SimActorStats`
* Pressing Ctrl+T would show up standalone window `GUI_VehicleDescription` with description text, authors, and commands with descriptions and key combos.
* Diagnostic views (skeletonview) was controlled from TopMenubar/Tools menu, `GUI_TopMenubar`, taking signifficant amout of vertical space.
2 problems:
* Command update code in GameContext.cpp - `GameContext::UpdateCommonInputEvents()` was botched and didn't handle keyboard.
* The line-hover highlight in GUI_VehicleInfoTPanel.cpp was actually blocking mouse input to the buttons.
@ohlidalp ohlidalp force-pushed the ohlidalp_new_T-screen branch from 8670afe to bd0df4c Compare September 22, 2024 11:06
@CuriousMike56
Copy link
Collaborator

  • Menu width doesn't accommodate longer command names:
    RoR_2024-09-22_11-03-38
  • Category text on the hover menu should be grey like above instead of black:
    RoR_2024-09-22_11-15-27

@ohlidalp
Copy link
Member Author

ohlidalp commented Sep 22, 2024

The only way to accomodate the long descriptions without breaking low-res again was to ditch the columns, and automatically move keys to next line if they don't fit (the highlight adjusts automagically). I've also shortened the default label from "unknown function" to "~unlabeled~".

obrazek

@CuriousMike56
Copy link
Collaborator

CuriousMike56 commented Sep 23, 2024

  • Category titles should be hidden if the current actor doesn't feature it (Engine, Traction, Loading etc)
    RoR_2024-09-22_21-30-40

  • It's possible to drag the column with the mouse:

RoR_2024-09-22_21-33-12.mp4

Snaps back to its original position, funny though

@ohlidalp
Copy link
Member Author

ohlidalp commented Sep 23, 2024

I swear UIs are the worst time hog. So many details to tweak.

Removing the empty sections from Basic tab will be a bit laborous (to factor out visibility check logic from the draw funcs) but otherwise straight forward.

The strange column resizing is an imGUI quirk, I've already forced static column width but this remains, there's no option to disable it without killing the tabs and buttons. I guess I'll just ditch the columns as I did with the Commands tab.

@ohlidalp
Copy link
Member Author

ohlidalp commented Sep 24, 2024

It now only displays non-empty categories; also I ditched the columns and right-aligned the keybuttons, like in Commands tab.

obrazek

@ohlidalp ohlidalp force-pushed the ohlidalp_new_T-screen branch from f371028 to 1bdb2e8 Compare September 26, 2024 00:46
@ohlidalp
Copy link
Member Author

ohlidalp commented Sep 26, 2024

Discord feedback: https://discord.com/channels/136544456244461568/189904947649708032/1288325355303731252

I crammed the lines so that the panel doesn't leak out 1366*768 window, and aligned the values to the right with automatic split to 2 lines when the value is too long (like Current speed: on the screenshot)

obrazek

Note the 0.0 engine outputs aren't a bug, I used mousegrab to attain the velocity, engines were off.

UPDATE: Additionally I only display speed in 'mph' or 'km/h' depending on gfx_speedo_imperial cvar.

problem: The starter key doesn't appear until after the engine is running
It looked like this at the beginning, then I had to change the drawing method for technical reasons and for lack of time I made it worse looking. Now it both looks as it should and works.
@ohlidalp
Copy link
Member Author

Visual tweak - the UI highlight of commands looks good again.

obrazek

@ohlidalp ohlidalp merged commit 3a56c42 into RigsOfRods:master Sep 26, 2024
2 checks passed
@ohlidalp ohlidalp deleted the ohlidalp_new_T-screen branch September 26, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants