version: 1.6.4
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
## Title: Guda
|
||||
## Notes: All-in-one bag and bank addon for World of Warcraft 1.12.1 (Turtle WoW)
|
||||
## Author: Vati
|
||||
## Version: 1.6.3
|
||||
## Version: 1.6.4
|
||||
## SavedVariables: Guda_DB
|
||||
## SavedVariablesPerCharacter: Guda_CharDB
|
||||
|
||||
|
||||
+34
-11
@@ -1479,7 +1479,7 @@ local editorMatchMode = "any"
|
||||
local editorRules = {}
|
||||
local editorRuleFrames = {}
|
||||
local RULE_ROW_HEIGHT = 28
|
||||
local MAX_RULES = 6
|
||||
local MAX_RULES = 22
|
||||
|
||||
-- Rule type options for dropdown
|
||||
local RULE_TYPE_OPTIONS = {
|
||||
@@ -1622,7 +1622,7 @@ local function GetRuleRowFrame(index)
|
||||
local rowName = "Guda_CategoryEditor_RuleRow" .. index
|
||||
local row = CreateFrame("Frame", rowName, container)
|
||||
row:SetHeight(RULE_ROW_HEIGHT)
|
||||
row:SetWidth(360)
|
||||
row:SetWidth(310)
|
||||
row:SetPoint("TOPLEFT", container, "TOPLEFT", 0, -((index - 1) * RULE_ROW_HEIGHT))
|
||||
|
||||
-- Rule type dropdown button
|
||||
@@ -1682,20 +1682,43 @@ local function GetRuleRowFrame(index)
|
||||
return row
|
||||
end
|
||||
|
||||
-- Update rules display
|
||||
-- Number of visible rule rows in the scroll frame
|
||||
local VISIBLE_RULES = 10
|
||||
|
||||
-- Update rules display with scroll support
|
||||
function Guda_CategoryEditor_UpdateRulesDisplay()
|
||||
local numRules = table.getn(editorRules)
|
||||
local scrollFrame = getglobal("Guda_CategoryEditor_RulesScrollFrame")
|
||||
|
||||
for i = 1, MAX_RULES do
|
||||
-- Update rules count label
|
||||
local rulesLabel = getglobal("Guda_CategoryEditor_RulesLabel")
|
||||
if rulesLabel then
|
||||
rulesLabel:SetText("Rules (" .. numRules .. "/" .. MAX_RULES .. "):")
|
||||
end
|
||||
|
||||
-- Update scroll frame
|
||||
if scrollFrame then
|
||||
FauxScrollFrame_Update(scrollFrame, numRules, VISIBLE_RULES, RULE_ROW_HEIGHT)
|
||||
end
|
||||
|
||||
-- Get scroll offset
|
||||
local offset = 0
|
||||
if scrollFrame then
|
||||
offset = FauxScrollFrame_GetOffset(scrollFrame) or 0
|
||||
end
|
||||
|
||||
for i = 1, VISIBLE_RULES do
|
||||
local row = GetRuleRowFrame(i)
|
||||
local ruleIndex = i + offset
|
||||
|
||||
if row then
|
||||
if i <= numRules then
|
||||
local rule = editorRules[i]
|
||||
row.ruleIndex = i
|
||||
row.typeBtn.ruleIndex = i
|
||||
row.valueBox.ruleIndex = i
|
||||
row.valueBtn.ruleIndex = i
|
||||
row.deleteBtn.ruleIndex = i
|
||||
if ruleIndex <= numRules then
|
||||
local rule = editorRules[ruleIndex]
|
||||
row.ruleIndex = ruleIndex
|
||||
row.typeBtn.ruleIndex = ruleIndex
|
||||
row.valueBox.ruleIndex = ruleIndex
|
||||
row.valueBtn.ruleIndex = ruleIndex
|
||||
row.deleteBtn.ruleIndex = ruleIndex
|
||||
|
||||
-- Set type button text
|
||||
local typeName = "Select Type"
|
||||
|
||||
+19
-4
@@ -786,7 +786,7 @@
|
||||
<!-- Category Editor Popup -->
|
||||
<Frame name="Guda_CategoryEditor" toplevel="true" movable="true" enableMouse="true" hidden="true" parent="UIParent" frameStrata="DIALOG">
|
||||
<Size>
|
||||
<AbsDimension x="400" y="380"/>
|
||||
<AbsDimension x="400" y="480"/>
|
||||
</Size>
|
||||
|
||||
<Anchors>
|
||||
@@ -935,10 +935,10 @@
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
|
||||
<!-- Rules Container -->
|
||||
<Frame name="Guda_CategoryEditor_RulesContainer">
|
||||
<!-- Rules ScrollFrame -->
|
||||
<ScrollFrame name="Guda_CategoryEditor_RulesScrollFrame" inherits="FauxScrollFrameTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="360" y="180"/>
|
||||
<AbsDimension x="335" y="280"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
@@ -947,6 +947,21 @@
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnVerticalScroll>
|
||||
FauxScrollFrame_OnVerticalScroll(28, Guda_CategoryEditor_UpdateRulesDisplay)
|
||||
</OnVerticalScroll>
|
||||
</Scripts>
|
||||
</ScrollFrame>
|
||||
|
||||
<!-- Rules Container (child of scroll frame) -->
|
||||
<Frame name="Guda_CategoryEditor_RulesContainer">
|
||||
<Size>
|
||||
<AbsDimension x="310" y="280"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="Guda_CategoryEditor_RulesScrollFrame" relativePoint="TOPLEFT"/>
|
||||
</Anchors>
|
||||
</Frame>
|
||||
|
||||
<!-- Add Rule Button -->
|
||||
|
||||
Reference in New Issue
Block a user