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

Eraser button on main toolbar #692

Closed
originalfoo opened this issue Feb 11, 2020 · 6 comments · Fixed by #1668
Closed

Eraser button on main toolbar #692

originalfoo opened this issue Feb 11, 2020 · 6 comments · Fixed by #1668
Assignees
Labels
feature A new distinct feature MASS EDIT The mass edit tool Toolbar The main TMPE toolbar UI User interface updates Usability Make mod easier to use

Comments

@originalfoo
Copy link
Member

originalfoo commented Feb 11, 2020

Summary: A new "eraser" button on the TM:PE toolbar which, when selected, allows users to clear their customisations for anything clicked on.

This idea formed some time ago but is strewn across multiple tickets, such as: #84, #77, #42, #41, #40, #38. Thanks to #623 and related issues, most or all tools now have reset features. The eraser tool is just a more visible way for user to call the reset functions.

This would solve two key issues we currently have (treat Delete and Backspace as synonymous):

  1. Discoverability - most users still probably don't know they can Delete customisations from selected thing; a button on toolbar solves that (it can also mention Delete shortcut in tooltip)

    (December 2021): OSD "hints panel" resolves discoverability issues

  2. Speed Limits and Parking Restrictions - unlike other tools, these aren't "select then customise" and as such are currently not suitable for Delete shortcut.

    (December 2021): New speed tool has a reset button (which is comfortable to use), but parking restrictions doesn't, and vehicle restrictions still have issue with backspace backspace does not delete vehicle restrictions as advertised #1126

  3. (December 2021): There is still no way to "delete everything form this node/segment"
  4. (December 2021): There is still no way to "delete everything from entire city" as discussed in Option to nuke (remove / delete) all TM:PE data in the savegame #281 -- if we can erase everything from a node/segment (eraser button), it should be relatively painless to then add a new button to maintenance settings to iterate all segments/nodes calling the eraser function.

Note: I suspect an eraser tool should wait for #656. It would make menu look clunky for a while due to uneven number of buttons, but that can be dealt with at later date (eg. merging of traffic light tools or merging of lane routing tools).

Yeet the 'toggle despawn' button from toolbar, replace with eraser button. Toggle despawn is already available as "Disable despawning" on gameplay tab in settings; we don't need a button for it on toolbar, it's not something people are changing on and off every few minutes

EDIT: Leave this to later iteration: If one of the tools is active, the eraser works for just that tool, otherwise it clears all tool customisations from whatever is clicked.

All tools would likely need to use a state engine, because the eraser tool can either act in its own right (reset all customisations for clicked thing) or as a sub-tool of another tool (reset that tools' customisations for clicked thing).

It is possible to change the mouse cursor image (eg. see NS2's picker tool), so we could set mouse cursor to an eraser (same icon as button on menu bar) for added visual feedback that you are in "eraser mode". Alternatively a mouse-following tooltip (like in new speed limits tool).

@originalfoo originalfoo added feature A new distinct feature Usability Make mod easier to use UI User interface updates PARKING Feature: Parking AI / restrictions / etc JUNCTION RESTRICTIONS Feature: Junction restrictions LANE ROUTING Feature: Lane arrows / connectors TRAFFIC LIGHTS Feature: Traffic lights - toggle, timed, etc SPEED LIMITS Feature: Speed limits VEHICLE RESTRICTIONS Feature: Vehicle restrictions PRIORITY SIGNS Feature: Stop / Yield / Priority signs labels Feb 11, 2020
@kvakvs
Copy link
Collaborator

kvakvs commented Feb 12, 2020

In the new main panel design, where will the button fit?
Is it an exclusive tool mode or available as some other tool is activated?
In the former case will it only be available as an exclusive tool? Or there will be a delete command in each mode?
In the latter case, will it (and why should it) remain visible while no tool is activated?

If we cannot change the mouse cursor, it should be possible to render a small overlay or a 3d model in the world where the cursor will be acting.

@originalfoo
Copy link
Member Author

In the new main panel design, where will the button fit?

No idea. Initially, at least, I imagine it might look clunky as there could be odd number of buttons on the toolbar. But if we eventually start merging some tools (probably a very time consuming task as the user interaction will need very careful consdieration) then that would eventually sort itself out.

Is it an exclusive tool mode or available as some other tool is activated?

Both.

When used on it's own, it clears the customisations of all tools for the clicked thing. Eg. Clicking a junction would reset traffic lights, junction restrictions, lane arrows, lane connectors, etc. When used on it's own we could potentially give user some way to select which tools to clear (like, their icons could light up on the toolbar and user could toggle them or something).

When used while a different tool is selected, it would only clear settings for that specific tool.

will [there] be a delete command in each mode?

The "select and customise" tools (lane connector, lane arrows, junction restrictions, traffic lights, priority signs) would still have the Delete and Backspace shortcuts to clear the tools' customisations from the active selection, regardless of how this "Eraser button" works.

If we cannot change the mouse cursor, it should be possible to render a small overlay or a 3d model in the world where the cursor will be acting.

Yup, Unity provides mouse delta so that is easy to do (same way some mods allow their button to be dragged, they just update position based on delta). I'd suggest looking at Network Skins 2 "picker" tool which appears to have custom cursor.

@krzychu124
Copy link
Member

If we cannot change the mouse cursor, it should be possible to render a small overlay or a 3d model in the world where the cursor will be acting.

We can change cursor to any sprite texture we want and then set offset from center (current OnToolUpdate() code would need a little refactor).
I've seen somewhere in code that attaching tool-tip to cursor is also possible.

@originalfoo
Copy link
Member Author

originalfoo commented Feb 12, 2020

Being able to change mouse cursor would be super-useful for all some tools tbh (will create separate issue).

@originalfoo originalfoo added the Toolbar The main TMPE toolbar label Apr 11, 2020
@originalfoo originalfoo added the wontfix Proposal rejected label Dec 10, 2021
@originalfoo
Copy link
Member Author

Was about to close this issue then noticed #1126 - so keeping open for now just in case.

@originalfoo
Copy link
Member Author

updated OP

@kianzarrin kianzarrin removed PARKING Feature: Parking AI / restrictions / etc JUNCTION RESTRICTIONS Feature: Junction restrictions LANE ROUTING Feature: Lane arrows / connectors TRAFFIC LIGHTS Feature: Traffic lights - toggle, timed, etc SPEED LIMITS Feature: Speed limits VEHICLE RESTRICTIONS Feature: Vehicle restrictions PRIORITY SIGNS Feature: Stop / Yield / Priority signs labels Oct 7, 2022
@kianzarrin kianzarrin added MASS EDIT The mass edit tool and removed wontfix Proposal rejected labels Oct 7, 2022
@kianzarrin kianzarrin self-assigned this Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new distinct feature MASS EDIT The mass edit tool Toolbar The main TMPE toolbar UI User interface updates Usability Make mod easier to use
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants