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

UI: In-game UI to toggle persistent overlays #21

Open
originalfoo opened this issue Feb 3, 2019 · 7 comments
Open

UI: In-game UI to toggle persistent overlays #21

originalfoo opened this issue Feb 3, 2019 · 7 comments
Labels
enhancement Improve existing feature Overlays Overlays, data vis, etc. Pedestiran Crossing Toolbar The main TMPE toolbar UI User interface updates Usability Make mod easier to use

Comments

@originalfoo
Copy link
Member

Most off the overlays listed in Mod settings > Overlays tab correspond to buttons on the in-game toolbar.

Would it be possible to right click or shift+click (or whatever) a button on the in-game toolbar to toggle its associated overlay?

Furthermore, is it possible to overlay a border image round the tools that have persistent overlays enabled?

Extending that, would it be worth changing background colour of active toolbar buttons?

Each button would have the following sprites:

  • Inactive
  • Active
  • Inactive + Overlay
  • Active + Overlay

Code changes required:

  • Handing a click modifier (or right click) on the button to toggle persistent overlay
  • Displaying/changing sprites on the in-game toolbar

I could do some quick image mockups this week to illustrate what it might look like?

@krzychu124
Copy link
Member

krzychu124 commented Feb 3, 2019

Yesterday I've spent few hours trying to figure out how to disable default Escape key action and how whole keyboard/mouse input event system is working.

I think I found a way how to do it but I have to do some tests(create simple proof of concept) and later a bit of code refactoring [technical stuff ahead] due to required changes in class structures and inheritance.

These changes could help with blocking mouse/keyboard clicks and other default key assigned actions

@krzychu124 krzychu124 added enhancement Improve existing feature Usability Make mod easier to use labels Feb 3, 2019
@originalfoo
Copy link
Member Author

It looks like the buttons on the toolbar also have a 'hover' state, am I correct?

Also, I read that there are plans to add some extra despawn tools to the toolbar - do you have a list of what those might be?

@krzychu124
Copy link
Member

Yup, these buttons have hover state and they are created from atlas texture "Resources\mainmenu-btns.png"

Yes I've had a plan to add extra despawn buttons (Reset stuck cims and vehicles and Remove parked vehicles) because currently these tools are available only from TMPE Options screen. I have to do some tests to check if its possible.
Btw I have no idea how those icons should look like 😃

@originalfoo
Copy link
Member Author

originalfoo commented Feb 6, 2019

Ok, I'll see if I can find suitable icons tomorrow.

For the texture atlas, it looks like it's using 50x50px tiles, is that correct? And I assume the icons within those tiles are something like 48x48px?

I would like to attempt doing better icons for everything in that atlas, as currently some of them are a bit confusing.

With regards to the various despawning things (there will be 4 despawn-related buttons in total) I was wondering if it would be worth adding an option in settings to hide them all? I rarely if ever use them, so I wouldn't want them cluttering the toolbar.

Also, it might be worth providing a quick way to the mod settings from the main TMPE button (eg. right-click the crown button). The mod total autobudget (github) could be investigated as an example of how in-game UI (budget screen in its case) buttons could directly open the mod settings screen without having to go through "pause menu".

@krzychu124
Copy link
Member

krzychu124 commented Feb 6, 2019

I will check that mod maybe there is something that could help.
With regards to the despawn-related buttons I've been thinking about something like we have one general button 'despawn' then after clicking we will see all 4 in row, column or in the other layout. This would be usable and compact. I will have to search is there any mod which has similar feature implemented but if not I will try to extend functionality of standard menu to be able display icons(buttons) instead of text. Quick example:

With regards to icons size I believe there is small margin added 😉

@originalfoo
Copy link
Member Author

I think some of the existing buttons could be merged too, For example, Junction Restrictions, Priority Signs and Toggle Traffic Lights could feasibly be grouped under a single button. While the three features would remain individually activatable in mod settings, the end-user visualisation could depict them as a single feature. So you go in to junction mode and in that one interface you get:

From 'junction restrictions':

  • Enter blocked lanes
  • U-turns
  • Pedestrian crossings
  • Straight-on lane changes

From 'priority signs':

  • Stop / yield / priority

From 'toggle traffic lights':

  • Toggle traffic lights

It would require better UI for all three features, but much of that could be achieved by looking at how the vanilla junction editor (stop signs and lights toggle) works and extending that UI to include the other features/icons.

@originalfoo originalfoo changed the title Buttons: State visualisation and overlay toggling UI: Right-click toolbar buttons to toggle associated overlay Feb 7, 2019
@krzychu124 krzychu124 added this to the UI improvements milestone Feb 7, 2019
This was referenced Feb 8, 2019
@originalfoo originalfoo changed the title UI: Right-click toolbar buttons to toggle associated overlay UI: In-game UI to toggle persistent overlays Feb 14, 2019
@originalfoo
Copy link
Member Author

If we go down the "build bar" route (see: #51), we could have dedicated tab to toggle overlays.

@VictorPhilipp VictorPhilipp added the UI User interface updates label Mar 14, 2019
@originalfoo originalfoo added the Overlays Overlays, data vis, etc. label Aug 12, 2019
@originalfoo originalfoo added the Toolbar The main TMPE toolbar label Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing feature Overlays Overlays, data vis, etc. Pedestiran Crossing Toolbar The main TMPE toolbar UI User interface updates Usability Make mod easier to use
Projects
None yet
Development

No branches or pull requests

4 participants