modified: OCDCollector.lua

Beacri [06-11-19 - 04:03]
	modified:   OCDCollector.lua
	modified:   OCDShort.xml
	new file:   TODO.txt
Filename
OCDCollector.lua
OCDShort.xml
TODO.txt
diff --git a/OCDCollector.lua b/OCDCollector.lua
index 315704b..15f7a2b 100644
--- a/OCDCollector.lua
+++ b/OCDCollector.lua
@@ -312,13 +312,6 @@ function SetShortIcons(str)
 			table.insert(tmp, tonumber(i))
 		end
 	end
-	d("+++++++++++++++")
-	d(tmp)
-	d("----")
-	d(OCDCollector.savedVariables.ShortShow)
-	OCDCollector.savedVariables.ShortShow = tmp
-	d("----")
-	d(OCDCollector.savedVariables.ShortShow)
 	return tmp
 end

@@ -334,10 +327,11 @@ local optionsData = {
 	},
 	{
 		type = "checkbox",
-		name = "Merge Collectibles",
-		tooltip = "If ON it will show only Sum of collected collectibles",
-		getFunc = function() return true end,
-		setFunc = function(value) d(value) end,
+		name = "Show % of total progression",
+		tooltip = "If ON it will show % of total progression",
+		getFunc = function() return OCDCollector.savedVariables.ShowTotalProcent end,
+
+		setFunc = function(value) d(value) OCDCollector.savedVariables.ShowTotalProcent=value OCDShortBGBIG:SetHidden(not value) OCDShortSUMMARY:SetHidden(not value) end,
 	},
 	{
 		type ="divider",
@@ -372,12 +366,6 @@ optionsData2={
 	requiresReload = true,
 	},
 	{
-    type = "button",
-    name = "Reload UI",
-    func = function() ReloadUI() end,
-    tooltip = "Button's tooltip text.", -- string id or function returning a string (optional)
-	},
-	{
 		type ="divider",
 		width = "full"
 	},
@@ -437,6 +425,8 @@ end
 function OCDCollectorLoadSettings()
 	OCDShort:ClearAnchors()
 	OCDShort:SetAnchor(TOPRIGHT, GuiRoot, TOPRIGHT, OCDCollector.savedVariables.Left, OCDCollector.savedVariables.Top)
+	OCDShortBGBIG:SetHidden(not ShowTotalProcent)
+	OCDShortSUMMARY:SetHidden(not ShowTotalProcent)

 end

@@ -448,6 +438,7 @@ function OCDCollector.OnAddOnLoaded(event, addonName)
 			{
 			Left = 0,
 			Top = 0,
+			ShowTotalProcent = true
 			--ShortShow = {3,4,5,6,7,8,9,10,12,13,14,15,16,18,19} --idk why it doesnt work
 			})
 		if OCDCollector.savedVariables.ShortShow == nil then
diff --git a/OCDShort.xml b/OCDShort.xml
index 5c7347f..2517967 100644
--- a/OCDShort.xml
+++ b/OCDShort.xml
@@ -29,17 +29,19 @@
       <Controls>
         <Backdrop name="$(parent)BGBIG" centerColor="171717" mouseEnabled="true" edgeColor="00FFFF00" alpha="1" excludeFromResizeToFitExtents="true">
           <Anchor point="TOPRIGHT" relativeTo="$(parent)BG" relativePoint="TOPLEFT"/>
+          <OnInitialized>d(OCDCollector.savedVariables)</OnInitialized>
           <Dimensions x="60" y="60" />
         </Backdrop>
-        <Label name="$(parent)SUMMARY" font="ZoFontChat" text="20.3%" excludeFromResizeToFitExtents="true">
+        <Label name="$(parent)SUMMARY" font="ZoFontChat" text="0 %" excludeFromResizeToFitExtents="true">
           <Anchor point="CENTER" relativeTo="$(parent)BGBIG" relativePoint="CENTER"/>
+          <OnInitialized></OnInitialized>
         </Label>
       </Controls>

     </TopLevelControl>
   </Controls>
 </GuiXml>
-<!--
+<!--
 esoui/art/journal/journal_tabicon_achievements_over.dds - achievements
 esoui/art/tradinghouse/tradinghouse_browse_tabicon_over.dds - lupa
 esoui/art/treeicons/store_indexicon_mounts_over.dds - mounty
diff --git a/TODO.txt b/TODO.txt
new file mode 100644
index 0000000..5fc2be7
--- /dev/null
+++ b/TODO.txt
@@ -0,0 +1,9 @@
+Add Toggle (Total % / Selected %) on Click on %
+change % bg color
+change % bg color depends on Total / Selected
+
+allow hothey /ocd
+Generate categories on /ocd
+/generate subcats on /ocd
+
+add font control to menu
\ No newline at end of file