Opened 13 years ago
Last modified 8 years ago
#942 assigned enhancement
[PATCH] Improve Atlas toolbar
Reported by: | historic_bruno | Owned by: | trompetin17 |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | Atlas editor | Keywords: | patch |
Cc: | joswwa-0ad@… | Patch: |
Description
The Atlas toolbar could be improved in several ways:
- Move the simulation buttons from the map panel to the toolbar and give them "media player" style icons (e.g. play, pause, stop, fast forward).
- We'll want different sections for different types of buttons. This will require modifications of our custom toolbar which treats every button as a tool (e.g. paint, modify elevation, transform object). Do we need all the tool buttons?
- Investigate wxAUIToolbar, it's more complex so more likely to have bugs, but does supposedly offer advanced features. Documentation appears sparse and we need to check compatibility on various platforms and versions of wxWidgets.
Attachments (7)
Change History (29)
comment:1 by , 13 years ago
by , 10 years ago
Attachment: | atlas save button preview.png added |
---|
comment:2 by , 10 years ago
Keywords: | review patch added |
---|---|
Summary: | Improve Atlas toolbar → [PATCH] Improve Atlas toolbar |
comment:3 by , 10 years ago
I think it would be nice to have some visual distinction between the tool types. All types that are currently on the toolbar change your pointer, while this save button is a conceptually different button. Something like avertical bar between the two groups would work I think.
Also, don't forget to include your icon (binary files aren't included in a diff) + mention the source of your icon.
by , 10 years ago
Attachment: | atlas save button.2.diff added |
---|
by , 10 years ago
by , 10 years ago
Attachment: | atlas save button preview 2.png added |
---|
comment:5 by , 10 years ago
Good icon, listed under cc-by, so we only need to mention her devianArt in the commit.
Fit the code, could you revert those strange indentation fixes? It's nicer if the stars of comments are aligned, when ifs are on the same level as endifs, ...
Apart from that, it looks good for now.
comment:6 by , 10 years ago
There are a few minor formatting issues I noticed:
ToolButton.cpp
- Line 74: should have a space in
,m_IdAction(baseID)
- Line 85: should not have a space in
iconPath (
- Line 89: should not have a space in
! fstr.Ok()
- Line 110: should have a space between operator in
1000+m_IdAction
- Line 154: should be a space in
action=evt.GetId()
- Line 155: should be spaces in
if(action>=1000)
- Line 74: should have a space in
ToolButton.h
m_funcion
is misspelled?
ScenarioEditor.cpp
- Line 546: missing spaces between arguments
There are others similar to those, see Coding_Conventions for a guideline.
Is there a reason to use boost::function
? We don't seem to use this anywhere currently, which is why I ask.
I think it's more conventional to use e.g. <boost/bind.hpp>
than "boost/bind.hpp"
assuming that works. Also, boost/bind.hpp
doesn't seem to be needed in ScenarioEditor.h
, so it should be moved to ScenarioEditor.cpp
(headers should be included in the cpp files as much as possible for more efficient compilation).
The new action button being pressed is an event, maybe it would be cleaner if the callback passed a wxCommandEvent
directly to it, instead of having to use a wrapper as with OnToolSave
? I'm not certain, it's just an idea.
comment:7 by , 10 years ago
Keywords: | simple,atlas,ui,review patch → simple atlas ui review patch |
---|---|
Milestone: | Backlog → Alpha 17 |
by , 10 years ago
Attachment: | atlas save button.3.diff added |
---|
comment:8 by , 10 years ago
Hi historic_bruno, thx for your feedback, First I wanna say Im sorry , my main languaje is spanish and i called "m_funcion" no "m_function". Im using boost:function because I wanna introduce some dynamic handlers, for example, some actions come from ScenarioEditor(save), but other come from MapSidebar(Simulations buttons). With boost:function i could use Function pointer(global functions) and member function pointer. So every Sidebar could add a toolbutton without having a EventCommand inside.
If you could join in #oad-dev i could explain more or even know what could do next in atlas.
comment:9 by , 10 years ago
No problem, thank you for working on this! :) Atlas could use some attention in the usability area, as I'm sure Michael (Mythos_Ruler) would agree.
by , 10 years ago
Attachment: | atlas save button.4.diff added |
---|
comment:10 by , 10 years ago
hi historic_bruno, I fixed all you tell me, could you review once again please
"atlas save button.4.diff"
follow-up: 15 comment:11 by , 10 years ago
Keywords: | review removed |
---|
I got the following build warning that should be fixed:
../../../source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.cpp: In member function ‘void ToolButtonBar::AddToolAction(const wxString&, const wxString&, const wxString&, fnAction)’: ../../../source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.cpp:110:65: warning: ‘wxToolBarToolBase* wxToolBarBase::AddTool(int, const wxBitmap&, const wxString&, const wxString&)’ is deprecated (declared at /usr/include/wx-3.0/wx/tbarbase.h:507) [-Wdeprecated-declarations] AddTool(1000 + m_IdAction, wxBitmap(img), shortLabel, longLabel); ^
And when starting Atlas, I also got a window saying
iCCP: Not recognizing known sRGB profile that has been edited
I often see this in the terminal, but having a window pop up is really annoying.
Apart from that, it works well.
comment:12 by , 10 years ago
Milestone: | Alpha 17 → Alpha 18 |
---|
comment:13 by , 10 years ago
Owner: | set to |
---|
comment:14 by , 10 years ago
Cc: | added |
---|---|
Keywords: | patch removed |
Status: | new → assigned |
Summary: | [PATCH] Improve Atlas toolbar → Improve Atlas toolbar |
comment:15 by , 10 years ago
Replying to sanderd17:
I got the following build warning that should be fixed:
../../../source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.cpp: In member function ‘void ToolButtonBar::AddToolAction(const wxString&, const wxString&, const wxString&, fnAction)’: ../../../source/tools/atlas/AtlasUI/CustomControls/Buttons/ToolButton.cpp:110:65: warning: ‘wxToolBarToolBase* wxToolBarBase::AddTool(int, const wxBitmap&, const wxString&, const wxString&)’ is deprecated (declared at /usr/include/wx-3.0/wx/tbarbase.h:507) [-Wdeprecated-declarations] AddTool(1000 + m_IdAction, wxBitmap(img), shortLabel, longLabel); ^
On Stackoverflow someone had the same issue with AddTool and InsertTool, but he only shows a solution for InsertTool. Maybe ask the developers about it.
comment:16 by , 9 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
I'm still on it, but maybe someone is faster than me.
comment:17 by , 9 years ago
Hello njm, we'd like to have some information about whether you're still on it.
Maybe you are facing problems or have questions, in any case you can reach us on IRC (http://webchat.quakenet.org/?channels=0ad-dev).
Looking forward to your answer!
comment:18 by , 9 years ago
Milestone: | Alpha 18 → Alpha 19 |
---|
comment:19 by , 9 years ago
Milestone: | Alpha 19 → Backlog |
---|
comment:20 by , 9 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:22 by , 8 years ago
Keywords: | patch added; simple atlas ui removed |
---|---|
Milestone: | Alpha 20 → Backlog |
Summary: | Improve Atlas toolbar → [PATCH] Improve Atlas toolbar |
Here's an old mockup, containing a few clues for the proposed toolbar: http://i.imgur.com/j9CKh.jpg