Opened 12 years ago

Closed 9 years ago

Last modified 9 years ago

#1392 closed enhancement (fixed)

[PATCH] [ATLAS] Display template name for selected units

Reported by: vts Owned by: trompetin17
Priority: Nice to Have Milestone: Alpha 18
Component: Atlas editor Keywords:
Cc: Patch:

Description

In Atlas, there does not currently appear to be any indication a selected unit's template name. This is useful for people who can't tell on sight what kind of unit they have selected.

I figure a sensible place to display it would be in the bottom panel of the Object tab, somewhere next to the Player dropdown perhaps, but suggestions are welcome.

Attachments (9)

Atlas - Scenario Editor - (untitled)_002.png (1.2 MB ) - added by Michael Roussel 10 years ago.
I will try to do something like that (Selected templates)
template_name_for_selected_entities.diff (9.2 KB ) - added by Adi 10 years ago.
template_name_for_selected_entities.2.diff (8.8 KB ) - added by Adi 10 years ago.
template_name_for_selected_entities.3.diff (8.8 KB ) - added by Adi 10 years ago.
template_name_for_selected_entities.4.diff (9.1 KB ) - added by Adi 10 years ago.
1392.diff (4.1 KB ) - added by trompetin17 9 years ago.
1392.2.diff (4.8 KB ) - added by trompetin17 9 years ago.
1392 evidence.png (30.2 KB ) - added by trompetin17 9 years ago.
1392.3.diff (4.8 KB ) - added by trompetin17 9 years ago.

Download all attachments as: .zip

Change History (31)

by Michael Roussel, 10 years ago

I will try to do something like that (Selected templates)

comment:1 by Michael Roussel, 10 years ago

This is the screenshot in the attachment "Atlas - Scenario Editor - (untitled)_002.png" It's only a visual. Tell me if you have any suggestions. I will try to do something like that (Selected templates)

comment:2 by leper, 10 years ago

Any progress?

comment:3 by Adi, 10 years ago

Keywords: review patch added
Milestone: BacklogAlpha 17
Summary: [ATLAS] Display template name for selected units[PATCH] [ATLAS] Display template name for selected units

This patch works on displaying the selected entities (eg. units, animals, buildings etc) but not with "non-interactive" actors (eg. trees). Should I add a new panel for those actors OR display the template names in the same panel as the entities?

The only issue I found right now with this patch is that the horizontal scroll bar doesn't show on long template names. I'm not experienced with this wxWidgets stuff so any hint is welcomed :)

One issue I found with selecting the "non-interactive actors": on my instance I can't select them right now, only the entities, but this might be a OS issue (Ubuntu, Alt key is assigned to "move" window...).

comment:4 by Josh, 10 years ago

Keywords: review removed

Not an in-depth review, but there's some commented code that should be removed if it's not used anymore in source/tools/atlas/AtlasUI/ScenarioEditor/Tools/Common/ObjectSettings.cpp.

comment:5 by Adi, 10 years ago

I unbinded my Alt key in the OS so I managed to test this better. Selecting non-interactive actors works fine also, they are shown in the same panel as the entities. (maybe we could use different colors?)

The only issue remains with the horizontal scrollbars on long template names. I will work on this bug and I'll re-factor the code a bit (as sanderd17 suggested on irc) then I'll send a new patch.

comment:6 by Adi, 10 years ago

In the new patch I re-factored the code a bit and, as sanderd17 suggested, I added tooltips for long template names as horizontal scrollbars are not always best for ux. I think this task should be completed now.

comment:7 by Josh, 10 years ago

From a purely stylistic point of view it looks good. Functionally, I'm not familiar with how atlas works so I can't accurately comment on that. However, nothing stands out as looking particularly wrong.

comment:8 by Adi, 10 years ago

Thanks for the review, Josh. I added a quick update to my previous patch, I removed RefreshObjectSettings, a method which was declared but not used/implemented

comment:9 by Adi, 10 years ago

Keywords: review added

Added some small changes based on leper's review.

comment:10 by Stan, 10 years ago

Hey Adrian fatol did you think of adding itas an excel window with columns like position variation rotation name script name. For each item selected ? Do you think you could do that ?

comment:11 by Adi, 10 years ago

Hey stanislas69, I don't understand what you mean by "adding itas an excel window with columns", could you be more specific?

comment:13 by Adi, 10 years ago

It should be possible. I don't know where I could get all that info from, but I'll look into it.

comment:14 by Stan, 10 years ago

I think it´s written in the xml and with th cmp stuff in ccmpmanager.cpp

comment:15 by leper, 10 years ago

Why do you remove the

if (selection.empty())
    return;

? The line after that accesses selection[0], so if selection.empty() == true you have undefined behaviour.

comment:16 by Itms, 10 years ago

Keywords: review removed
Milestone: Alpha 17Alpha 18

Hello Adrian, I don't know if you plan to continue working on 0 A.D.

I'm marking this patch as reviewed since leper pointed out a fault in it. However we'd be glad if you decided to finish it! :)

Otherwise, there is no problem, just drop by and tell us so we can know someone else can take care of this.

Thanks for your work so far!

by trompetin17, 9 years ago

Attachment: 1392.diff added

comment:17 by trompetin17, 9 years ago

I added my fix, could you review please :).

Here is the video about how is going to work http://youtu.be/tGeQKPcwF8s

comment:18 by trompetin17, 9 years ago

Owner: set to trompetin17
Status: newassigned

comment:19 by Stan, 9 years ago

Keywords: review added

by trompetin17, 9 years ago

Attachment: 1392.2.diff added

by trompetin17, 9 years ago

Attachment: 1392 evidence.png added

comment:20 by trompetin17, 9 years ago

I added the counter template names

by trompetin17, 9 years ago

Attachment: 1392.3.diff added

comment:21 by Itms, 9 years ago

Resolution: fixed
Status: assignedclosed

In 16255:

Add a list of selected entities, grouped by template.

Patch by trompetin17, fixes #1392

comment:22 by Itms, 9 years ago

Keywords: atlas simple patch review removed

Thanks for the patch!

Note: See TracTickets for help on using tickets.