[SUG][EDITOR] Show style (and other details) when a piece is selected

Started by WillLem, December 28, 2024, 05:34:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WillLem

For a while now I've thought it would be a good idea to show a piece's metadata (name, style, trigger type, etc) when a single piece is selected (if multiple pieces are selected, this wouldn't apply). The question is, what's the best way to go about this?

The most helpful, but perhaps also most intrusive, is to load a piece's style into the piece browser when it's selected. That immediately puts the piece in context, shows its name (we could focus the piece in the browser), and whether or not it's terrain/object (we'd auto-select the relevant tab). Useful, but doesn't show the trigger type and could perhaps be unwanted behaviour in certain workflow scenarios.

Another idea is to (optionally) display the metadata in the Editor's status bar. There we can show all the info at a glance without disrupting workflow. We can have a button "Show Metadata" to do this on-the-fly (selecting another piece or deselecting the piece then hides the status bar again), or have it be a toggle on/off option in Settings (the status bar would always be visible, and would always show the metadata of whichever piece is selected).

Perhaps even better would be to display it in the "Pieces" tab, either at the top or the bottom. This would probably be non-optional, since it has no effect on workflow or the level area display. It would be necessary to focus the "Pieces" tab to see the metadata, which means it's less immediate than the other options. Even so, this is probably my favourite option; it keeps the feature incidental, makes the most sense in terms of existing UI, and keeps clutter to a minimum.

In either of the last 2 options, the "style" portion of the metadata could also be clickable to load it into the piece browser.

Thoughts/suggestions?

WillLem

I've gone ahead and made some progress with this, here's what we have so far (commit f67805b):



This works nicely, and shows whether a piece is steel, terrain, or what object type it is if it's an object. If the piece's parent style is different to that of the currently-loaded style, the "Load Style" button becomes visible and it's then possible to load that style into the browser.

For example, in the screenshot above, the currently-loaded style is Orig Crystal, and the piece's style is WL Lemminas Teal Kingdom. If the "Load Style" button were to be pressed, WL Lemminas Teal Kingdom would then be loaded into the piece browser.

Between this and the recently-implemented Piece Search, adding pieces and browsing styles should now be much easier and less time-consuming, particularly if you tend to work with lots of different styles.

I wonder if there are any other piece elements that it might be useful to display here. We already have the symbols and text in the level display for showing things like lemming caps and pre-assigned skills, so probably not those things in particular. Is there anything else that anyone can think of?



NOTE: This also works for grouped pieces, showing the name of the group that appears in the level file ("Group" followed by a random string of numbers). It shows whether the group is Terrain or Steel, but the style isn't shown (it's displayed as "(Group)") principally because a group could consist of pieces from several styles.