Hello Github!

Beacri [06-04-19 - 22:28]
Hello Github!
Filename
OCDCollector.lua
OCDCollector.txt
OCDDash.xml
OCDDashboard.lua
OCDShort.xml
diff --git a/OCDCollector.lua b/OCDCollector.lua
new file mode 100644
index 0000000..3f25c57
--- /dev/null
+++ b/OCDCollector.lua
@@ -0,0 +1,404 @@
+if OCDCollector == nil then OCDCollector = {} end
+OCDCollector.name = "OCDCollector"
+
+function OCDCollectorScan()
+	OCDCollector.SUM = {}
+	local TotalmaxCollectibles = 0
+	local OwnedCollectibles = 0
+
+	local CollectibleiconPack = {
+	{Icon1="esoui/art/treeicons/store_indexicon_dlc_up.dds", Icon2="esoui/art/treeicons/store_indexicon_dlc_over.dds", Icon3="esoui/art/treeicons/store_indexicon_dlc_down.dds"},-- 1 Stories
+	{Icon1="esoui/art/treeicons/store_indexicon_dlc_up.dds", Icon2="esoui/art/treeicons/store_indexicon_dlc_over.dds", Icon3="esoui/art/treeicons/store_indexicon_dlc_down.dds"},-- 2 Upgrade
+	{Icon1="esoui/art/tutorial/store_indexicon_costumes_up.dds", Icon2="", Icon3=""},-- 3 Appearance
+	{Icon1="esoui/art/guild/tabicon_home_up.dds", Icon2="esoui/art/guild/tabicon_home_over.dds", Icon3="esoui/art/guild/tabicon_home_down.dds"},-- 4 Housing
+	{Icon1="esoui/art/treeicons/collection_indexicon_furnishings_up.dds", Icon2="esoui/art/treeicons/collection_indexicon_furnishings_over.dds", Icon3="esoui/art/treeicons/collection_indexicon_furnishings_down.dds"},-- 5 Furnishings
+	{Icon1="esoui/art/treeicons/collection_indexicon_assistants_up.dds", Icon2="esoui/art/treeicons/collection_indexicon_assistants_over.dds", Icon3="esoui/art/treeicons/collection_indexicon_assistants_down.dds"},-- 6 Assistants
+	{Icon1="esoui/art/treeicons/store_indexicon_trophy_up.dds", Icon2="esoui/art/treeicons/store_indexicon_trophy_over.dds", Icon3="esoui/art/treeicons/store_indexicon_trophy_down.dds"},-- 7 Mementos
+	{Icon1="esoui/art/treeicons/store_indexicon_mounts_up.dds", Icon2="esoui/art/treeicons/store_indexicon_mounts_over.dds", Icon3="esoui/art/treeicons/store_indexicon_mounts_down.dds"},-- 8 Mounts
+	{Icon1="/esoui/art/treeicons/store_indexicon_vanitypets_up.dds", Icon2="/esoui/art/treeicons/store_indexicon_vanitypets_over.dds", Icon3="/esoui/art/treeicons/store_indexicon_vanitypets_down.dds"},-- 9 Non-Combat Pets
+	{Icon1="esoui/art/tutorial/tutorial_idexicon_emotes_up.dds", Icon2="esoui/art/tutorial/tutorial_idexicon_emotes_over.dds", Icon3="esoui/art/tutorial/tutorial_idexicon_emotes_down.dds"},-- 10 Emotes
+	{Icon1="esoui/art/treeicons/collection_indexicon_abilityskins_up.dds", Icon2="esoui/art/treeicons/collection_indexicon_abilityskins_over.dds", Icon3="esoui/art/treeicons/collection_indexicon_abilityskins_down.dds"},-- 11 Special
+	{Icon1="esoui/art/tutorial/progression_indexicon_armor_up.dds", Icon2="esoui/art/tutorial/progression_indexicon_armor_over.dds", Icon3="esoui/art/tutorial/progression_indexicon_armor_down.dds"},-- 12 Armor Styles
+	{Icon1="esoui/art/progression/progression_indexicon_weapons_up.dds", Icon2="esoui/art/progression/progression_indexicon_weapons_over.dds", Icon3="esoui/art/progression/progression_indexicon_weapons_down.dds"}-- 13 Weapon Styles
+}
+	for categoryIndex = 1,GetNumCollectibleCategories(),1 do
+			local name, numSubCatgories, numCollectibles, unlockedCollectibles, totalCollectibles = GetCollectibleCategoryInfo(categoryIndex)
+			--Returns: string name, number numSubCatgories, number numCollectibles, number unlockedCollectibles, number totalCollectibles, boolean hidesLocked
+			local mainCatN = 0
+			local mainCatMax = 0
+			--d("|cFF1010#"..categoryIndex.." ".. name.." - owned ".. numCollectibles.."/".. unlockedCollectibles.." / ".. totalCollectibles.."|r")
+			--d(zo_strformat("<<Z:1>>", "i have 10, blue colored item"))
+
+			--d("|cFF1010#"..categoryIndex.." ".. zo_strformat("<<Z:1>>", name).."|r")
+
+			if numSubCatgories == 0 then
+				for NoSubCatIndex=1, totalCollectibles,1 do
+					Name, _, _, _, unlocked, _, _, categoryType = GetCollectibleInfo(GetCollectibleId(categoryIndex, nil, NoSubCatIndex))
+					if unlocked then
+						mainCatN = mainCatN + 1
+					end
+					--TotalmaxCollectibles = TotalmaxCollectibles + totalCollectibles
+					-- if categoryIndex==6 then
+					-- 	d("#".. NoSubCatIndex .." "..Name.." / "..tostring(unlocked))
+					-- end
+					--
+				end
+			else
+				for subCategoryIndex=1, numSubCatgories do
+					local subCategoryName, subCategoryNumCollectibles, subCategoryUnlockedCollectibles = GetCollectibleSubCategoryInfo(categoryIndex, subCategoryIndex)
+					mainCatMax = mainCatMax + subCategoryNumCollectibles
+					unlockedN = 0 -- unlocked N i subcategory
+					unlockedMax = 0 -- Max N in subcategory
+					for collectibleIndex=1, subCategoryNumCollectibles do
+						local collectibleId = GetCollectibleId(categoryIndex, subCategoryIndex, collectibleIndex)
+						local collectibleName, collectibleDesc, icon1, icon2, unlocked, _, _, categoryType = GetCollectibleInfo(collectibleId)
+						if unlocked then
+							unlockedN = unlockedN + 1
+							mainCatN = mainCatN + 1 --band name, should be removed
+						end
+				 	end --end for iteration of collectibles
+				 	--d("    $".. subCategoryIndex..": "..subCategoryName.." "..unlockedN.."/".. subCategoryNumCollectibles)
+				 		--d(unlockedN)
+				end --end for iteration of subcategory
+			end
+			TotalmaxCollectibles = TotalmaxCollectibles + math.max(mainCatMax, totalCollectibles)
+
+			OwnedCollectibles = OwnedCollectibles + mainCatN
+			--table.insert(OCDCollector.SUM, {Name = "", Icon1 = "", Icon2 = "", Icon3 = "", Val = "", Max = "" })
+
+			--d(OCDCollector["SUM"])
+
+			table.insert(OCDCollector.SUM, {Name = name, Icon1 = CollectibleiconPack[categoryIndex]["Icon1"], Icon2 = CollectibleiconPack[categoryIndex]["Icon2"], Icon3 = CollectibleiconPack[categoryIndex]["Icon3"], Val = mainCatN, Max = math.max(mainCatMax, totalCollectibles) })
+			--d("|c10FF10#"..categoryIndex.." ".. name.." - All: "..mainCatN .. "/" .. math.max(mainCatMax, totalCollectibles).."|r")
+
+	end --end for iteration of categories
+	table.insert(OCDCollector.SUM, {Name = "Collectibles", Icon1 = "esoui/art/collections/collections_tabicon_collectibles_up.dds", Icon2 = "esoui/art/collections/collections_tabicon_collectibles_over.dds", Icon3 = "esoui/art/collections/collections_tabicon_collectibles_down.dds", Val = OwnedCollectibles, Max = TotalmaxCollectibles })
+	--d("Collectibles: ".. OwnedCollectibles.."/" ..TotalmaxCollectibles)
+	--d("-- OFF Collections stuff:")
+
+
+--  Off Collection Stuff to get:
+--**  Achievements
+	table.insert(OCDCollector.SUM, {Name = "Achievements", Icon1 = "esoui/art/journal/journal_tabicon_achievements_up.dds", Icon2 = "esoui/art/journal/journal_tabicon_achievements_over.dds", Icon3 = "", Val = GetEarnedAchievementPoints(), Max = GetTotalAchievementPoints() })
+
+	--d("Achievements: "..GetEarnedAchievementPoints().." / "..GetTotalAchievementPoints())
+--** Recipes
+	-- /script local c = 0 for i=1,GetNumRecipeLists() ,1 do local a,b = GetRecipeListInfo(i) c=c+b d(a.."-"..b)end d(c)
+	-- difference of 60 due to mrl
+
+	-- GetRecipeListInfo(number recipeListIndex)
+	-- Returns: string name, number numRecipes, textureName upIcon, textureName downIcon, textureName overIcon, textureName disabledIcon, string createSound
+
+	-- GetRecipeInfo(number recipeListIndex, number recipeIndex)
+	-- Returns: boolean known, string name, number numIngredients, number provisionerLevelReq, number qualityReq, number ProvisionerSpecialIngredientType specialIngredientType, number TradeskillType requiredCraftingStationType
+
+	local MaxRecipes = 0
+	local KnownRecipes = 0
+	for i=1,GetNumRecipeLists() ,1 do
+		local a,b = GetRecipeListInfo(i)
+		MaxRecipes=MaxRecipes+b
+		--d("#"..i.." "..a.."-"..b)
+		for j=1,b do
+			local x, y = GetRecipeInfo(i,j)
+			--d("#"..y.." "..tostring(x))
+			if x then
+				KnownRecipes = KnownRecipes + 1
+			end
+		end
+	end
+	table.insert(OCDCollector.SUM, {Name = "Recipes", Icon1 = "esoui/art/icons/poi/poi_crafting_incomplete.dds", Icon2 = "esoui/art/tutorial/poi_crafting_complete.dds", Icon3 = "", Val = KnownRecipes, Max = MaxRecipes })
+	--d("Recipes: "..KnownRecipes.." / "..MaxRecipes)
+
+--** CPs
+	local _, _, lvl= GetCharacterInfo()
+	table.insert(OCDCollector.SUM, {Name = "Level", Icon1 = "esoui/art/charactercreate/charactercreate_faceicon_up.dds", Icon2 = "", Icon3 = "", Val = lvl, Max = 50 })
+	table.insert(OCDCollector.SUM, {Name = "CP", Icon1 = "esoui/art/treeicons/achievements_indexicon_champion_up.dds", Icon2 = "esoui/art/treeicons/achievements_indexicon_champion_up.dds", Icon3 = "", Val = GetPlayerChampionPointsEarned(), Max = 3600 })
+
+--** Lorebooks
+	--1 - shalidor
+	--2- crafting
+	--3 - Eidetic
+	local TotalKnownLore = 0
+	local TotalLore = 0
+	for i=1,3,1 do
+		local name, CatNum, categoryId = GetLoreCategoryInfo(i)
+		--d(name.." - "..CatNum.."/"..categoryId)
+		for j=1,CatNum,1 do
+			local LoreName,desc, LoreKnown, LoreTotal= GetLoreCollectionInfo(i,j)
+			TotalKnownLore = TotalKnownLore + LoreKnown
+			TotalLore = TotalLore + LoreTotal
+		end
+	end
+	table.insert(OCDCollector.SUM, {Name = "Lorebooks", Icon1 = "esoui/art/journal/journal_tabicon_lorelibrary_up.dds", Icon2 = "esoui/art/journal/journal_tabicon_lorelibrary_down.dds", Icon3 = "", Val = TotalKnownLore, Max = TotalLore })
+	--d("Lorebooks: "..TotalKnownLore.." / "..TotalLore)
+
+	-- GetLoreCategoryInfo(number categoryIndex)
+	-- Returns: string name, number numCollections, number categoryId
+
+	-- GetLoreCollectionInfo(number categoryIndex, number collectionIndex)
+	-- Returns: string name, string description, number numKnownBooks, number totalBooks, boolean hidden, textureName gamepadIcon, number collectionId
+
+--** MountTraining
+     --Returns: number inventoryBonus, number maxInventoryBonus, number staminaBonus, number maxStaminaBonus, number speedBonus, number maxSpeedBonus
+	local a,b,c,dd,e,f = GetRidingStats()
+	local MountStats = a + c + e
+	local MountStatsMax = b + dd + f
+	--d("MountTraining: ".. MountStats .. " / " .. MountStatsMax)
+	table.insert(OCDCollector.SUM, {Name = "Mount Training", Icon1 = "esoui/art/treeicons/store_indexicon_mounts_up.dds", Icon2 = "", Icon3 = "", Val = MountStats, Max = MountStatsMax })
+
+
+-- Skills to Max
+-- for i=1,GetNumSkillTypes(),1 do
+-- 	d("Skillline: "..i)
+-- 	for j=1,30,1 do --TODO: hwo to get skilllines
+-- 		local X = GetSkillLineName(i,j)
+-- 		if X then
+-- 			d("   "..GetSkillLineName(i,j))
+-- 		end
+
+-- 	end
+-- end
+
+-- GetNumSkillAbilities(number SkillType skillType, number skillLineIndex)
+-- Returns: number numAbilities
+-- SKILL_TYPE_ARMOR	3
+-- SKILL_TYPE_AVA	6
+-- SKILL_TYPE_CHAMPION	9
+-- SKILL_TYPE_CLASS	1
+-- SKILL_TYPE_GUILD	5
+-- SKILL_TYPE_NONE	0
+-- SKILL_TYPE_RACIAL	7
+-- SKILL_TYPE_TRADESKILL	8
+-- SKILL_TYPE_WEAPON	2
+-- SKILL_TYPE_WORLD	4
+
+-- for a=0,30,1 do
+-- 	d(GetNumSkillAbilities(0,a))
+-- end
+
+-- GetNumSkillAbilities(number SkillType skillType, number skillLineIndex)
+-- Returns: number numAbilities
+-- GetNumSkillLines(number SkillType skillType)
+-- Returns: number numSkillLines
+
+-- Search on ESOUI Source Code GetNumSkillTypes()
+-- Returns: number numSkillTypes
+
+
+
+
+-- Research
+
+--++--++--++--++--++--++--
+-- Partial Helpers:
+-- Dungeons
+-- dungeons Skills
+-- original fishes / Fishing zones done
+-- Cyro Ranks
+-- skyshards  GetNumSkyShards()
+
+
+	OCDShortBG:SetEdgeColor(0.4,0.2,0.2, 0)
+	OCDShortBG:SetCenterColor(0.1,0.1,0.1)
+	OCDShortBG:SetAlpha(0.8)
+	OCDShortBG:SetDrawLayer(0)
+	OCDShortBG:SetResizeToFitDescendents(true)
+	OCDShortBG:SetMovable(true)
+
+	OCDShort:SetResizeToFitDescendents(true)
+	OCDShort:SetMovable(true)
+
+	local last = OCDShortBG
+	local OCDShortWidth = 10
+	local i = 1
+	local ShortShowOrder = OCDShortPrepareArray()
+	-- {Name = "", Icon1 = "", Icon2 = "", Icon3 = "", Val = "", Max = "" }
+	for k,v in pairs(ShortShowOrder) do
+
+		local line = WINDOW_MANAGER:CreateControlFromVirtual("ShortDIVNode", OCDShortBG, "ShortDIV", i)
+		line.icon   = line:GetNamedChild("Icon")
+		line.texture = line.icon:GetNamedChild("Texture")
+		--d(line.icon)
+		line.text   = line:GetNamedChild("TXT")
+		line.tooltip   = line:GetNamedChild("TOOLTIP")
+
+		line.text:SetText(v.Val.."/"..v.Max.." ")--use margin instead
+		line.icon:SetNormalTexture(v.Icon1)
+
+		if v.Icon2 ~= nil then
+			line.icon:SetMouseOverTexture(v.Icon2)
+		end
+		if v.Icon2 ~= nil then
+			line.icon:SetPressedTexture(v.Icon3)
+		end
+		line.tooltip:SetText(v.Name)
+
+		OCDShortWidth = OCDShortWidth + line.icon:GetWidth()
+		OCDShortWidth = OCDShortWidth + line.text:GetWidth()
+
+		if i==1 then
+			line.icon:SetAnchor(TOPLEFT, OCDShortBG, TOPLEFT, 0,0)
+			line.text:SetAnchor(LEFT, line.icon, RIGHT, 0,0)
+		else
+			line.icon:SetAnchor(LEFT, last, RIGHT, 0,0)
+			line.text:SetAnchor(LEFT, line.icon, RIGHT, 0,0)
+		end
+		last = line.text
+		i = i+1
+	end
+	OCDShortBG:SetDimensionConstraints(OCDShortWidth, 40, 2000, 2000)
+	OCDShort:SetDimensionConstraints(OCDShortWidth, 40, 2000, 2000)
+	OCDShortSUMMARY:SetText(string.format("%.2f", OCDShortCalculatePercent()).."%")
+
+end
+
+function OCDShortPrepareArray()
+	local tmp = {}
+	local ShortOrder = {3,4,5,6,7,8,9,10,12,13,14,15,16,18,19}
+	for k,v in pairs(ShortOrder) do
+		--d(tostring(v).." "..OCDCollector["SUM"][v]["Name"])
+		table.insert(tmp, OCDCollector["SUM"][v])
+	end
+	return tmp
+end
+
+function OCDShortCalculatePercent()
+--mode standard
+	local i = 0
+	local PartialPercent = 0
+	for k,v in pairs(OCDCollector["SUM"]) do
+		PartialPercent = PartialPercent + v.Val / v.Max
+		i = i + 1
+	end
+	PartialPercent = PartialPercent / i*100
+	return PartialPercent
+end
+--TODO Weighted arithmetic mean based on Settings
+
+function OCDTooltipShow(id)
+	id:GetParent():GetNamedChild("TOOLTIP"):SetHidden(false)
+end
+
+function OCDTooltipHide(id)
+	id:GetParent():GetNamedChild("TOOLTIP"):SetHidden(true)
+end
+function OCDCollectorSpanCat()
+	for i = 1, 3 do
+		d(i)
+		local last = last or OCDDashLeft
+		local dynC = WINDOW_MANAGER:CreateControlFromVirtual("ABCDE", OCDDashLeft, "OCDMenu", i)
+		d(dynC)
+		dynC:SetAnchor(TOPLEFT, last, BOTTOMLEFT, 0, 0)
+		local label = dynC:GetNamedChild("_Label")
+		d(label)
+		dynC:SetAnchor(TOPLEFT, label, TOPLEFT, 0, 0)
+		local tmp = "ABCDE2Label"
+		local tmp2 = "TEST string #"..tostring(i)
+		label:SetText(tmp2)
+
+	end
+end
+
+function OCDCollectorBuildAddonSettingsMenu()
+local LAM2 = LibStub("LibAddonMenu-2.0")
+
+local panelData = {
+         type = "panel",
+         name = "OCD Collector",
+    }
+
+local optionsData = {
+	{
+		type ="divider",
+		width = "full"
+	},
+	{
+		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,
+	},
+	{
+		type ="divider",
+		width = "full"
+	},
+	{
+		type = "header",
+		name = "Show/Hide Progression Icon",
+	}}
+
+	for j=1,20,1 do
+		table.insert(optionsData, {
+			type = "checkbox",
+			name = "Type "..j,
+			tooltip = "Type "..j,
+			getFunc = function() return true end,
+			setFunc = function(value) d(value) end,
+		})
+	end
+
+
+
+optionsData2={
+	{
+		type ="divider",
+		width = "full"
+	},
+	{
+		type = "dropdown",
+		name = "My Dropdown",
+		tooltip = "Dropdown's tooltip text.",
+		choices = {"table", "of", "choices"},
+		getFunc = function() return "of" end,
+		setFunc = function(var) print(var) end,
+	},
+	{
+		type = "slider",
+		name = "My Slider",
+		tooltip = "Slider's tooltip text.",
+		min = 0,
+		max = 20,
+		getFunc = function() return 3 end,
+		setFunc = function(value) d(value) end,
+	},
+	{
+		type ="divider",
+		width = "full"
+	},
+	{
+		type = "description",
+		text = "My description text to display.",
+		title = "My Title",
+		width = "full",
+	}
+}
+	--little hack for merginga tables
+	for i in pairs(optionsData2) do
+	table.insert(optionsData, optionsData2[i])
+	end
+LAM2:RegisterAddonPanel("OCDCollectorSettings", panelData)
+LAM2:RegisterOptionControls("OCDCollectorSettings", optionsData)
+
+end
+function OCDCollector.ShowCollectibles()
+	d("--Show Collectibes--")
+	OCDDash:SetHidden(false)
+end
+
+function OCDCollector.HideCollectibles()
+	OCDDash:SetHidden(true)
+end
+
+
+function OCDCollector.OnAddOnLoaded(event, addonName)
+	if (addonName ~= "OCDCollector") then return end
+		d("OCD Collector started")
+		OCDCollectorScan()
+		OCDCollectorBuildAddonSettingsMenu()
+		d("OCD Collector finished")
+end
+
+EVENT_MANAGER:RegisterForEvent(OCDCollector.name, EVENT_ADD_ON_LOADED, OCDCollector.OnAddOnLoaded)
+SLASH_COMMANDS["/ocd"] = OCDCollector.ShowCollectibles
+SLASH_COMMANDS["/oscan"] = OCDCollectorScan
\ No newline at end of file
diff --git a/OCDCollector.txt b/OCDCollector.txt
new file mode 100644
index 0000000..486478b
--- /dev/null
+++ b/OCDCollector.txt
@@ -0,0 +1,12 @@
+## APIVersion: 100026
+## Title: OCD Collector
+## Author: Beacri
+## Version: 1
+## Description: Addon for Peaople who wants to collect every Mount, Pet or Memento in ESO
+## SavedVariables: OCDCollector
+## DependsOn: LibAddonMenu-2.0
+
+OCDCollector.lua
+OCDDashboard.lua
+OCDDash.xml
+OCDShort.xml
\ No newline at end of file
diff --git a/OCDDash.xml b/OCDDash.xml
new file mode 100644
index 0000000..ab5ee07
--- /dev/null
+++ b/OCDDash.xml
@@ -0,0 +1,151 @@
+<GuiXml>
+  <Controls>
+
+  <Button name="DynamicButton" virtual="true" text="Click">
+    <Controls>
+      <Label name="$(parent)InnerLabel" text="Label" font="ZoFontGame">
+      </Label>
+    </Controls>
+  </Button>
+
+  <Button name="OCDMenu" virtual="true">
+    <Dimensions x="60" y="20" />
+    <!-- <Anchor point="TOPLEFT" relativeTo="$(parent)TEXTX3" relativePoint="BOTTOMLEFT" /> -->
+
+    <Controls>
+      <Label name="$(parent)_Label" font="ZoFontGame" text="Click me #4">
+        <!-- <Anchor point="TOPLEFT" relativeTo="$(parent)TEXTX3" relativePoint="TOPLEFT" /> -->
+      </Label>
+    </Controls>
+    <!-- Textures - mouseOverColor?-->
+    <OnClicked>d("x")</OnClicked><!-- Work if You dont click exactly -->
+  </Button>
+
+
+
+    <TopLevelControl name="OCDDash" clampedToScreen="true" movable="true" mouseEnabled="true" hidden="true" resizeHandleSize="10">
+      <Dimensions x="750" y="800" />
+      <Anchor point="CENTER" />
+      <Controls>
+
+        <Backdrop name="$(parent)BG" inherits="ZO_DefaultBackdrop"><DimensionConstraints minX="400" /></Backdrop>
+        <Label name="$(parent)WindowTitle" font="ZoFontAnnounceMedium" text="|cffd700OCD Collector|r">
+          <Anchor point="TOPLEFT" relativeTo="$(parent)BG" relativePoint="TOPLEFT" offsetX="15" offsetY="15"/>
+        </Label>
+
+        <Texture name="$(parent)TopDivider" textureFile="/esoui/art/miscellaneous/horizontaldivider.dds" tier="HIGH">
+          <Dimensions x="800" y="4"/><!-- How to set 100%? -->
+          <Anchor point="TOP" relativeTo="$(parent)BG" offsetY="38" />
+        </Texture>
+
+        <Button name="$(parent)ButtonCloseAddon" inherits="ZO_ButtonBehaviorClickSound">
+          <Dimensions x="40" y="40" />
+          <Anchor point="TOPRIGHT" relativeTo="$(parent)BG" relativePoint="TOPRIGHT" offsetX="5" offsetY="10"/>
+          <Textures normal="EsoUI/Art/Buttons/closebutton_up.dds" pressed="EsoUI/Art/Buttons/closebutton_down.dds" mouseOver="EsoUI/Art/Buttons/closebutton_mouseover.dds" disabled="EsoUI/Art/Buttons/closebutton_disabled.dds"/>
+          <OnClicked>OCDDash:SetHidden(true)</OnClicked>
+        </Button>
+
+        <Backdrop name="$(parent)Left" edgeColor="FF0000" centerColor="6495ED" alpha="0.6" inherits="ZO_DefaultBackdrop">
+          <DimensionConstraints minX="200" maxX="250" />
+          <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetY="45"/>
+          <Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="BOTTOM" />
+        </Backdrop>
+
+        <!-- <Label name="$(parent)TestA" font="ZoFontAnnounceMedium" text="TESTA1"><Anchor point="TOPLEFT" relativeTo="$(parent)Left" relativePoint="TOPLEFT" /></Label> -->
+        <!--<Label name="$(parent)TestB" font="ZoFontAnnounceMedium" text="TESTB1"><Anchor point="TOPLEFT" relativeTo="$(parent)A" relativePoint="BOTTOMLEFT" /></Label><!-- Not proper positioning -->
+        <!--<Label name="$(parent)TestC" font="ZoFontAnnounceMedium" text="TESTC1"><Anchor point="TOPLEFT" relativeTo="$(parent)B" relativePoint="BOTTOMLEFT" /></Label><!-- Not proper positioning -->
+
+
+
+        <Button name="$(parent)TEXTX">
+          <Dimensions x="20" y="20" />
+          <Anchor point="TOPLEFT" relativeTo="$(parent)Left" relativePoint="TOPLEFT" />
+
+          <Controls>
+            <Label name="TESTXY" font="ZoFontGame" text="Click me.">
+              <Anchor point="TOPLEFT" relativeTo="$(parent)Left" relativePoint="TOPLEFT" />
+            </Label>
+          </Controls>
+          <!-- Textures - mouseOverColor?-->
+          <OnClicked>
+
+            d('Clicked')
+            OCDCollectorSpanCat()
+
+
+          </OnClicked><!-- Work if You dont click exactly -->
+<!--
+
+ local last = "OCDDashLeft"
+   for i = 1, 3 do
+    d(i)
+    d(last)
+    local dynC = CreateControlFromVirtual("ABCDE", OCDDashLeft, "DynamicButton", i)
+    dynC:SetText("TEST string #"..i)
+
+    d(dynC)
+      last = dynC
+    dynC:SetText("TEST string #"..i)
+  end
+
+
+ if i==1 then
+        dynC:SetAnchor(TOPLEFT, last, TOPLEFT, 0, 0)
+        dynC:SetAnchor(TOPRIGHT, last, TOPRIGHT, 0, 0)
+      else
+        dynC:SetAnchor(TOPLEFT, last, BOTTOMLEFT, 0, 0)
+        dynC:SetAnchor(TOPRIGHT, last, BOTTOMRIGHT, 0, 0)
+      end -->
+
+        </Button>
+
+        <Button name="$(parent)TEXTX2">
+          <Dimensions x="20" y="20" />
+          <Anchor point="TOPLEFT" relativeTo="$(parent)TEXTX" relativePoint="BOTTOMLEFT" />
+
+          <Controls>
+            <Label name="TESTXY2" font="ZoFontGame" text="Click me #2">
+              <Anchor point="TOPLEFT" relativeTo="$(parent)TEXTX" relativePoint="TOPLEFT" />
+            </Label>
+          </Controls>
+          <!-- Textures - mouseOverColor?-->
+          <OnClicked>d('Clicked2222')</OnClicked><!-- Work if You dont click exactly -->
+        </Button>
+
+         <Button name="$(parent)TEXTX3">
+          <Dimensions x="20" y="20" />
+          <Anchor point="TOPLEFT" relativeTo="$(parent)TEXTX2" relativePoint="BOTTOMLEFT" />
+
+          <Controls>
+            <Label name="TESTXY3" font="ZoFontGame" text="Click me #3">
+              <Anchor point="TOPLEFT" relativeTo="$(parent)TEXTX2" relativePoint="TOPLEFT" />
+            </Label>
+          </Controls>
+          <!-- Textures - mouseOverColor?-->
+          <OnClicked>d('Clicked333')</OnClicked><!-- Work if You dont click exactly -->
+        </Button>
+
+         <Button name="$(parent)TEXTX4">
+          <Dimensions x="20" y="20" />
+          <Anchor point="TOPLEFT" relativeTo="$(parent)TEXTX3" relativePoint="BOTTOMLEFT" />
+
+          <Controls>
+            <Label name="TESTXY4" font="ZoFontGame" text="Click me #4">
+              <Anchor point="TOPLEFT" relativeTo="$(parent)TEXTX3" relativePoint="TOPLEFT" />
+            </Label>
+          </Controls>
+          <!-- Textures - mouseOverColor?-->
+          <OnClicked>d('Clicked444')</OnClicked><!-- Work if You dont click exactly -->
+        </Button>
+
+        <Backdrop name="$(parent)Right" edgeColor="00FF00" centerColor="95ED64" alpha="0.6" inherits="ZO_DefaultBackdrop">
+          <DimensionConstraints minX="200" />
+          <Anchor point="TOPLEFT" relativeTo="$(parent)Left" relativePoint="TOPRIGHT" />
+          <Anchor point="BOTTOMRIGHT" relativeTo="$(parent)" relativePoint="BOTTOMRIGHT" />
+        </Backdrop>
+
+
+      </Controls>
+    </TopLevelControl>
+  </Controls>
+</GuiXml>
\ No newline at end of file
diff --git a/OCDDashboard.lua b/OCDDashboard.lua
new file mode 100644
index 0000000..e69de29
diff --git a/OCDShort.xml b/OCDShort.xml
new file mode 100644
index 0000000..5c7347f
--- /dev/null
+++ b/OCDShort.xml
@@ -0,0 +1,58 @@
+<GuiXml>
+  <Controls>
+    <Control name="ShortDIV" virtual="true">
+      <Controls  resizeToFitDescendents="true">
+        <Button name="$(parent)Icon">
+          <Dimensions x="40" y="40" />
+          <Textures normal="esoui/art/treeicons/achievements_indexicon_champion_up.dds"/>
+          <OnMouseEnter>OCDTooltipShow(self)</OnMouseEnter>
+          <OnMouseExit>OCDTooltipHide(self)</OnMouseExit>
+        </Button>
+        <Label name="$(parent)TXT" font="ZoFontChat"></Label>
+        <Label name="$(parent)TOOLTIP" font="ZoFontChat" text="Tooltip Test" hidden="true">
+           <Anchor point="TOP" relativeTo="$(parent)Icon" relativePoint="BOTTOM"/>
+
+        </Label>
+
+      </Controls>
+    </Control>
+
+    <TopLevelControl name="OCDShort" clampedToScreen="true" movable="true" mouseEnabled="true" hidden="false" resizeHandleSize="0">
+
+      <Anchor point="TOPRIGHT" />
+      <Controls>
+        <Backdrop name="$(parent)BG">
+          <Anchor point="CENTER" relativeTo="$(parent)" relativePoint="CENTER"/>
+        </Backdrop>
+      </Controls>
+
+      <Controls>
+        <Backdrop name="$(parent)BGBIG" centerColor="171717" mouseEnabled="true" edgeColor="00FFFF00" alpha="1" excludeFromResizeToFitExtents="true">
+          <Anchor point="TOPRIGHT" relativeTo="$(parent)BG" relativePoint="TOPLEFT"/>
+          <Dimensions x="60" y="60" />
+        </Backdrop>
+        <Label name="$(parent)SUMMARY" font="ZoFontChat" text="20.3%" excludeFromResizeToFitExtents="true">
+          <Anchor point="CENTER" relativeTo="$(parent)BGBIG" relativePoint="CENTER"/>
+        </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
+esoui/art/treeicons/store_indexicon_dlc_over.dds - DLC
+esoui/art/treeicons/store_indexicon_costumes_over.dds - costumes
+esoui/art/worldmap/map_indexicon_housing_over.dds - houses
+esoui/art/lfg/lfg_indexicon_homeshow_over.dds - home
+esoui/art/lfg/lfg_indexicon_trial_over.dds - trial
+esoui/art/icons/achievements_indexicon_skyshards_over.dds - skyshards
+esoui/art/icons/achievements_indexicon_crafting_over.dds - crafting
+esoui/art/menubar/gamepad/gp_playermenu_icon_skills.dds - skills
+
+up/over/down
+GetMaxSpendableChampionPointsInAttribute() - 1/3 CP
+GetPlayerChampionPointsEarned() - actual CP
+-->
\ No newline at end of file