65 - GUI patch allowing a 'newline' parameter for options
This patch on 3 files - AceGUI, AceConfigRegistry and AceConfigDialog - allows for the use of a 'newline' parameter in the options table, resulting in forcible placing of that option in a new row in a GUI.
--- AceGUI-3.0/AceGUI-3.0.lua (revision 828)
+++ AceGUI-3.0/AceGUI-3.0.lua (working copy)
@@ -25,7 +25,7 @@
-- @class file
-- @name AceGUI-3.0
-- @release $Id$
-local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 25
+local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 26
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
if not AceGUI then return end -- No upgrade needed
@@ -751,7 +751,7 @@
else
-- if there isn't available width for the control start a new row
-- if a control is "fill" it will be on a row of its own full width
- if usedwidth == 0 or ((framewidth) + usedwidth > width) or child.width == "fill" then
+ if usedwidth == 0 or ((framewidth) + usedwidth > width) or child.width == "fill" or child.newline then
--anchor the previous row, we will now know its height and offset
rowstart:SetPoint("TOPLEFT",content,"TOPLEFT",0,-(height+(rowoffset-rowstartoffset)+3))
height = height + rowheight + 3
--- AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua (revision 828)
+++ AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua (working copy)
@@ -9,7 +9,7 @@
-- @class file
-- @name AceConfigRegistry-3.0
-- @release $Id$
-local MAJOR, MINOR = "AceConfigRegistry-3.0", 10
+local MAJOR, MINOR = "AceConfigRegistry-3.0", 11
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
if not AceConfigRegistry then return end
@@ -83,6 +83,7 @@
func=optmethodfalse,
arg={["*"]=true},
width=optstring,
+ newline=optbool,
}
local typedkeys={
--- AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua (revision 828)
+++ AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua (working copy)
@@ -4,7 +4,7 @@
-- @release $Id$
local LibStub = LibStub
-local MAJOR, MINOR = "AceConfigDialog-3.0", 34
+local MAJOR, MINOR = "AceConfigDialog-3.0", 35
local AceConfigDialog = LibStub:NewLibrary(MAJOR, MINOR)
if not AceConfigDialog then return end
@@ -1311,6 +1311,9 @@
control:SetWidth(width_multiplier)
end
end
+
+ control.newline = GetOptionsMemberValue("newline",v,options,path,appName) --sinus
+
if control.SetDisabled then
local disabled = CheckOptionDisabled(v, options, path, appName)
control:SetDisabled(disabled)
| User | When | Change |
|---|---|---|
| Nevcairiel | Aug 29, 2009 at 17:50 UTC | Changed status from New to Declined |
| sinepi | Aug 29, 2009 at 17:29 UTC | Create |
- 2 comments
- 2 comments
Facts
- Last updated
- Aug 29, 2009
- Reported
- Aug 29, 2009
- Status
- Declined - We decided not to take action on this ticket.
- Type
- Patch - Source code patch for review
- Priority
- Medium - Normal priority.
- Votes
- 0
- Reply
- #2
mikk Aug 29, 2009 at 18:52 UTC - 0 likesAnd the "empty description" way also works for grouping things in commandline / dropdown.
- Reply
- #1
Nevcairiel Aug 29, 2009 at 17:49 UTC - 0 likesThis can already be done using an empty description field in between.
type="description", name="",