diff --git a/OCDCollector.lua b/OCDCollector.lua index 15f7a2b..5132243 100644 --- a/OCDCollector.lua +++ b/OCDCollector.lua @@ -147,45 +147,7 @@ function OCDCollectorScan() 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 - - - +--Skills to Max -- Research @@ -285,19 +247,30 @@ 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) + local last = OCDDashLeft + + for i,j in pairs(OCDCollector.SUM) do + local line = WINDOW_MANAGER:CreateControlFromVirtual("DashCat", OCDDashLeft, "LeftCat", i) + line.label = line:GetNamedChild("Label") + line.label:SetText(j.Name) + line.icon = line:GetNamedChild("Icon") + line.icon:SetNormalTexture(j.Icon1) + + if j.Icon2 ~= nil then + line.icon:SetMouseOverTexture(j.Icon2) + end + if j.Icon2 ~= nil then + line.icon:SetPressedTexture(j.Icon3) + end + if i==1 then + line.icon:SetAnchor(TOPLEFT, last, TOPLEFT, 0,0) + line.label:SetAnchor(LEFT, line.icon, RIGHT, 0,0) + else + line.icon:SetAnchor(TOPLEFT, last.icon, BOTTOMLEFT, 0,0) + line.label:SetAnchor(LEFT, line.icon, RIGHT, 0,0) + end + last = line end end @@ -408,7 +381,8 @@ LAM2:RegisterOptionControls("OCDCollectorSettings", optionsData) end function OCDCollector.ShowCollectibles() d("--Show Collectibes--") - OCDDash:SetHidden(false) + OCDDash:SetHidden(true) + OCDCollectorSpanCat() end function OCDCollector.HideCollectibles() @@ -418,10 +392,8 @@ end function OCDCollector.SaveSettings() OCDCollector.savedVariables.Left = -1 * GuiRoot:GetRight() + OCDShort:GetRight() OCDCollector.savedVariables.Top = OCDShort:GetTop() - d("**onExit") - d(OCDCollector.savedVariables.ShortShow) - end + function OCDCollectorLoadSettings() OCDShort:ClearAnchors() OCDShort:SetAnchor(TOPRIGHT, GuiRoot, TOPRIGHT, OCDCollector.savedVariables.Left, OCDCollector.savedVariables.Top) @@ -448,6 +420,7 @@ function OCDCollector.OnAddOnLoaded(event, addonName) OCDCollectorLoadSettings() OCDCollectorScan() OCDCollectorBuildAddonSettingsMenu() + --OCDCollector.ShowCollectibles() d("OCD Collector finished") end diff --git a/OCDDash.xml b/OCDDash.xml index ab5ee07..e70708c 100644 --- a/OCDDash.xml +++ b/OCDDash.xml @@ -8,18 +8,24 @@ </Controls> </Button> - <Button name="OCDMenu" virtual="true"> +<!-- <Button name="LeftCat" virtual="true"> <Dimensions x="60" y="20" /> - <!-- <Anchor point="TOPLEFT" relativeTo="$(parent)TEXTX3" relativePoint="BOTTOMLEFT" /> --> - + <Label name="$(parent)Label" text="Label" font="ZoFontGame"></Label> <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> + </Button> --> + + <Control name="LeftCat" virtual="true"> + <Controls> + <Button name="$(parent)Icon"> + <Dimensions x="40" y="40" /> + <Textures normal="esoui/art/treeicons/achievements_indexicon_champion_up.dds"/> + </Button> + <Label name="$(parent)Label" font="ZoFontChat"></Label> + </Controls> + </Control> @@ -51,99 +57,25 @@ <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> + <Scroll name="$(parent)Ele" mouseEnabled="true"> + <Dimensions x="20" /> + <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="BOTTOMLEFT"/> + <Controls> + <Control name="$(parent)EleContainer" resizeToFitDescendents="true"> + + <Controls> + <Texture name="$(parent)ActiveBg" color="99000000" layer="BACKGROUND"> + </Texture> + </Controls> + </Control> + </Controls> + </Scroll> </Controls> </TopLevelControl> diff --git a/OCDShort.xml b/OCDShort.xml index 2517967..191e0dd 100644 --- a/OCDShort.xml +++ b/OCDShort.xml @@ -29,7 +29,7 @@ <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> + <OnInitialized></OnInitialized> <Dimensions x="60" y="60" /> </Backdrop> <Label name="$(parent)SUMMARY" font="ZoFontChat" text="0 %" excludeFromResizeToFitExtents="true"> diff --git a/dumpcode for later.txt b/dumpcode for later.txt new file mode 100644 index 0000000..99c8a15 --- /dev/null +++ b/dumpcode for later.txt @@ -0,0 +1,91 @@ +-- GetNumSkillTypes() returns 9 but lastis empty and first is class +-- for i=1,GetNumSkillTypes()-1,1 do -- -1 because last Skill type is empty +-- d("Skillline: "..i) +-- local j = 1 +-- local k ="" + +-- for i = 1,8 do +-- local lastRankXP, nextRankXP, currentXP= GetSkillLineXPInfo(i, 2) +-- d(lastRankXP.."/"..currentXP) +-- end + +-- repeat +-- k = GetSkillLineName(i,j) +-- d(k.." "..tostring(i).." "..tostring(j)) +-- j = j + 1 +-- until(tostring(k) == "" or j>30) +-- end + + +-- + +-- local abilityId = 29338 -- anulment +-- local abilityId = 38814 -- dizzying strike +-- GetAbilityIcon(number abilityId) +-- GetAbilityName(number abilityId) +local x = {38814,39980,39976,39984} +for i,j in pairs(x) do + local y,a,b,c,p,q = GetAbilityProgressionXPInfoFromAbilityId(j) + d(i..": "..tostring(y).." "..tostring(a).." "..tostring(b).." "..tostring(c).." "..tostring(p).." "..tostring(q)) +end +-- /script d( GetAbilityProgressionXPInfoFromAbilityId(39984)) +-- -- GetAbilityProgressionXPInfoFromAbilityId +-- -- Returns: boolean hasProgression, number progressionIndex, number lastRankXp, number nextRankXP, number currentXP, boolean atMorph + +-- /script d(GetSkillLineProgressionAbilityRank(3,1,1,2)) + + +-- + -- GetProgressionSkillProgressionId(number SkillType skillType, number skillLineIndex, number skillIndex) + -- Returns: number progressionId + local SkillDataBase = { + { + BaseName = "Skill", + Morph1Name = "Morph 1", + Morph2Name = "Morph 2", + lvl = "1/4" + } + } + local TotalSkillBase = { + {--i = 1, class skills + {--j=1 - Assasination (NB) + {--k=1 Incap + id = 36508 + + } + }, + {--j=2 - Shadow (NB) + + }, + {--j=2 - Siphoning (NB) + + } + + } + } +--local classSkillline = SKILL_TYPE_CLASS -- type = 1 + +-- 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