Quantcast

UI cleanup and buttons texture changes

Petr G [06-09-16 - 05:57]
UI cleanup and buttons texture changes
Filename
ViragDevTool.lua
ViragDevTool.xml
diff --git a/ViragDevTool.lua b/ViragDevTool.lua
index ceb57c1..a87dd14 100644
--- a/ViragDevTool.lua
+++ b/ViragDevTool.lua
@@ -897,7 +897,6 @@ end

 function ViragDevTool:SetupForSettings(s)

-
     if s == nil then
         s = self.default_settings
     else
@@ -920,8 +919,6 @@ function ViragDevTool:SetupForSettings(s)
     self.settings = s

     -- refresh gui
-    -- setup selected sidebar tab history/events/ favourites
-    self:EnableSideBarTab(s.sideBarTabSelected)

     -- setup open o closed main wnd
     self:SetVisible(self.wndRef, s.isWndOpen)
@@ -929,6 +926,9 @@ function ViragDevTool:SetupForSettings(s)
     -- setup open o closed sidebar
     self:SetVisible(self.wndRef.sideFrame, s.isSideBarOpen)

+    -- setup selected sidebar tab history/events/ favourites
+    self:EnableSideBarTab(s.sideBarTabSelected)
+
     --setup events part 1 register listeners
     for _, tEvent in pairs(self.settings.events) do
         if tEvent.active then
diff --git a/ViragDevTool.xml b/ViragDevTool.xml
index 9abc2f0..5d4039b 100644
--- a/ViragDevTool.xml
+++ b/ViragDevTool.xml
@@ -251,8 +251,9 @@
                         </Anchors>
                     </CheckButton>

+
                     <CheckButton text="Favourites" name="$parentFavouritesButton" inherits="ViragDevToolTopButton"
-                                 parentKey="favourites">
+                                 parentKey="favourites"  hidden="true"> <!-- TODO implement and make it visible -->
                         <Scripts>
                             <OnClick>
                                 ViragDevTool:EnableSideBarTab("favourites")
@@ -359,15 +360,19 @@
                 </Backdrop>

                 <Frames>
-                    <Button text="+" name="$parentToggleSideBarButton" inherits="ViragDevToolTopButton">
+                    <Button name="$parentToggleSideBarButton">
+                        <Size x="32" y="32"/>
                         <Scripts>
                             <OnClick>
                                 ViragDevTool:ToggleSidebar()
                             </OnClick>
                         </Scripts>
                         <Anchors>
-                            <Anchor point="TOPLEFT"/>
+                            <Anchor point="LEFT"/>
                         </Anchors>
+                        <NormalTexture file="Interface\Buttons\UI-Panel-SmallerButton-Up"/>
+                        <PushedTexture file="Interface\Buttons\UI-Panel-SmallerButton-Down"/>
+                        <HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD"/>
                     </Button>
                     <Button text="CLEAR" name="$parentClearButton" inherits="ViragDevToolTopButton">
                         <Scripts>
@@ -390,23 +395,16 @@
                             <Anchor point="LEFT" relativeTo="$parentClearButton" relativePoint="RIGHT"/>
                         </Anchors>
                     </Button>
-                    <Button text="Mapping" name="$parentAddPlayerInfoButton" inherits="ViragDevToolTopButton">
-                        <Scripts>
-                            <OnClick>
-                                ViragDevTool_AddData(ViragDevTool.mapping, "mapping")
-                            </OnClick>
-                        </Scripts>
-                        <Anchors>
-                            <Anchor point="LEFT" relativeTo="$parentAddGlobalButton" relativePoint="RIGHT"/>
-                        </Anchors>
-                    </Button>
-                    <Button text="x" inherits="ViragDevToolTopButton" virtual="true">
-                        <Size>
-                            <AbsDimension x="25" y="25"/>
-                        </Size>
+
+                    <Button virtual="true">
+                        <Size x="32" y="32"/>
                         <Anchors>
                             <Anchor point="RIGHT"/>
                         </Anchors>
+                        <NormalTexture file="Interface/BUTTONS/UI-Panel-MinimizeButton-Up"/>
+                        <PushedTexture file="Interface/BUTTONS/UI-Panel-MinimizeButton-Down"/>
+                        <DisabledTexture file="Interface/BUTTONS/UI-Panel-MinimizeButton-Disabled"/>
+                        <HighlightTexture file="Interface/BUTTONS/UI-Panel-MinimizeButton-Highlight" alphaMode="ADD"/>
                         <Scripts>
                             <OnClick>
                                 ViragDevTool:ToggleUI()