From 091e1bf25d7aaad86e7ffc38580960e3f89d6f59 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 23 Apr 2016 13:54:19 +0200 Subject: [PATCH] improved scene element visibility buttons --- .../opencs/view/render/pagedworldspacewidget.cpp | 15 +++++++-------- .../opencs/view/render/pagedworldspacewidget.hpp | 5 +++-- apps/opencs/view/world/scenesubview.cpp | 2 +- files/opencs/grid-view-small.png | Bin 472 -> 0 bytes files/opencs/grid-view.png | Bin 210 -> 0 bytes files/opencs/resources.qrc | 13 +++++++++++-- 6 files changed, 22 insertions(+), 13 deletions(-) delete mode 100644 files/opencs/grid-view-small.png delete mode 100644 files/opencs/grid-view.png diff --git a/apps/opencs/view/render/pagedworldspacewidget.cpp b/apps/opencs/view/render/pagedworldspacewidget.cpp index 8b20d22ba..22b0e3805 100644 --- a/apps/opencs/view/render/pagedworldspacewidget.cpp +++ b/apps/opencs/view/render/pagedworldspacewidget.cpp @@ -11,7 +11,7 @@ #include "../../model/world/tablemimedata.hpp" #include "../../model/world/idtable.hpp" -#include "../widget/scenetooltoggle.hpp" +#include "../widget/scenetooltoggle2.hpp" #include "../widget/scenetoolmode.hpp" #include "../widget/scenetooltoggle2.hpp" @@ -581,16 +581,15 @@ void CSVRender::PagedWorldspaceWidget::reset (unsigned int elementMask) iter->second->reset (elementMask); } -CSVWidget::SceneToolToggle *CSVRender::PagedWorldspaceWidget::makeControlVisibilitySelector ( +CSVWidget::SceneToolToggle2 *CSVRender::PagedWorldspaceWidget::makeControlVisibilitySelector ( CSVWidget::SceneToolbar *parent) { - mControlElements = new CSVWidget::SceneToolToggle (parent, - "Controls & Guides Visibility", ":placeholder"); + mControlElements = new CSVWidget::SceneToolToggle2 (parent, + "Controls & Guides Visibility", ":scenetoolbar/scene-view-marker-c", ":scenetoolbar/scene-view-marker-"); - mControlElements->addButton (":placeholder", Mask_CellMarker, ":placeholder", - "Cell marker"); - mControlElements->addButton (":placeholder", Mask_CellArrow, ":placeholder", "Cell arrows"); - mControlElements->addButton (":scenetoolbar/grid", Mask_CellBorder, ":scenetoolbar/grid-small", "Cell border"); + mControlElements->addButton (1, Mask_CellMarker, "Cell Marker"); + mControlElements->addButton (2, Mask_CellArrow, "Cell Arrows"); + mControlElements->addButton (4, Mask_CellBorder, "Cell Border"); mControlElements->setSelectionMask (0xffffffff); diff --git a/apps/opencs/view/render/pagedworldspacewidget.hpp b/apps/opencs/view/render/pagedworldspacewidget.hpp index fe533be2d..4bdaa3820 100644 --- a/apps/opencs/view/render/pagedworldspacewidget.hpp +++ b/apps/opencs/view/render/pagedworldspacewidget.hpp @@ -11,6 +11,7 @@ namespace CSVWidget { class SceneToolToggle; + class SceneToolToggle2; } namespace CSVRender @@ -26,7 +27,7 @@ namespace CSVRender CSMWorld::CellSelection mSelection; std::map mCells; std::string mWorldspace; - CSVWidget::SceneToolToggle *mControlElements; + CSVWidget::SceneToolToggle2 *mControlElements; bool mDisplayCellCoord; private: @@ -90,7 +91,7 @@ namespace CSVRender /// \attention The created tool is not added to the toolbar (via addTool). Doing /// that is the responsibility of the calling function. - virtual CSVWidget::SceneToolToggle *makeControlVisibilitySelector ( + virtual CSVWidget::SceneToolToggle2 *makeControlVisibilitySelector ( CSVWidget::SceneToolbar *parent); virtual unsigned int getVisibilityMask() const; diff --git a/apps/opencs/view/world/scenesubview.cpp b/apps/opencs/view/world/scenesubview.cpp index 7014b1486..624029353 100644 --- a/apps/opencs/view/world/scenesubview.cpp +++ b/apps/opencs/view/world/scenesubview.cpp @@ -112,7 +112,7 @@ CSVWidget::SceneToolbar* CSVWorld::SceneSubView::makeToolbar (CSVRender::Worldsp if (type==widget_Paged) { - CSVWidget::SceneToolToggle *controlVisibilityTool = + CSVWidget::SceneToolToggle2 *controlVisibilityTool = dynamic_cast (*widget). makeControlVisibilitySelector (toolbar); diff --git a/files/opencs/grid-view-small.png b/files/opencs/grid-view-small.png deleted file mode 100644 index 6a874f21b0601285bdb1834f5362f74f97f8974e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 472 zcmV;}0Vn>6P)LD;)H7tqmU*2g2SKQ&-84189VR>Aez_PF; zke>;oev0!FXf^85q0xA&?ca| z21&wq%tFOrg8Z>M?PlcbimFjaOy@_OG-zA$9o2lIC1LTXD#)3{p+z6P&Hat~Qvmsn z1fK{H-gf$Lr%M!cTXEq{cdIUMAF(X@vr+evd|j~!yU!oEy8DS5l!rvRXoQW^-hX{J z)UM`sG(+9|AGbu!`|7T`>cB5*&%5}S+J&_4SRRtA{Ug8(yjFWjPA`7rbl%n-(?wf- zj@wSip0K0ZBROICc$%=V5vo2hs?=jAgCp@r@M O0000PcU;ZX% ze0bRW|ETJ6A+~cOZ2SkV&%DilyRKA!&he_(cW(bTbpqMaFZ9-FR)jD!keQLB%#t9! tiJK9~zR_y3QOyjbV%80AhCe(3jGNC{Y^xHSFbOEc;OXk;vd$@?2>|IcL5lzY diff --git a/files/opencs/resources.qrc b/files/opencs/resources.qrc index 973f414fb..e9fb12cbe 100644 --- a/files/opencs/resources.qrc +++ b/files/opencs/resources.qrc @@ -80,8 +80,6 @@ flying eye.png orbit2.png scene-play.png - grid-view.png - grid-view-small.png scene-view-references.png scene-view-terrain.png scene-view-water.png @@ -119,5 +117,16 @@ scene-view-status-29.png scene-view-status-30.png scene-view-status-31.png + scene-exterior-arrows.png + scene-exterior-borders.png + scene-exterior-marker.png + scene-exterior-status-0.png + scene-exterior-status-1.png + scene-exterior-status-2.png + scene-exterior-status-3.png + scene-exterior-status-4.png + scene-exterior-status-5.png + scene-exterior-status-6.png + scene-exterior-status-7.png