annotate Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua @ 8:1b2d819b4fa8

Now using the global MailAddonBusy to indicate MailOpener is busy, read comments in Core.lua for more info. Default status is now ?enabled without automatic mail opening? to let first time users look around before MailOpener messes up their heads. A StaticPopupDialog will be added later to ask if they want to auto-enable. When ?enabled without automatic mail opening? is on and you toggle the mail opening checkbox on, mail opening will automatically start.
author Zerotorescue
date Thu, 09 Sep 2010 10:53:19 +0200
parents 823e33465b6e
children
rev   line source
Zerotorescue@0 1 --[[ $Id: AceGUIWidget-DropDown-Items.lua 916 2010-03-15 12:24:36Z nevcairiel $ ]]--
Zerotorescue@0 2
Zerotorescue@0 3 local AceGUI = LibStub("AceGUI-3.0")
Zerotorescue@0 4
Zerotorescue@0 5 -- Lua APIs
Zerotorescue@0 6 local select, assert = select, assert
Zerotorescue@0 7
Zerotorescue@0 8 -- WoW APIs
Zerotorescue@0 9 local PlaySound = PlaySound
Zerotorescue@0 10 local CreateFrame = CreateFrame
Zerotorescue@0 11
Zerotorescue@0 12 local function fixlevels(parent,...)
Zerotorescue@0 13 local i = 1
Zerotorescue@0 14 local child = select(i, ...)
Zerotorescue@0 15 while child do
Zerotorescue@0 16 child:SetFrameLevel(parent:GetFrameLevel()+1)
Zerotorescue@0 17 fixlevels(child, child:GetChildren())
Zerotorescue@0 18 i = i + 1
Zerotorescue@0 19 child = select(i, ...)
Zerotorescue@0 20 end
Zerotorescue@0 21 end
Zerotorescue@0 22
Zerotorescue@0 23 local function fixstrata(strata, parent, ...)
Zerotorescue@0 24 local i = 1
Zerotorescue@0 25 local child = select(i, ...)
Zerotorescue@0 26 parent:SetFrameStrata(strata)
Zerotorescue@0 27 while child do
Zerotorescue@0 28 fixstrata(strata, child, child:GetChildren())
Zerotorescue@0 29 i = i + 1
Zerotorescue@0 30 child = select(i, ...)
Zerotorescue@0 31 end
Zerotorescue@0 32 end
Zerotorescue@0 33
Zerotorescue@0 34 -- ItemBase is the base "class" for all dropdown items.
Zerotorescue@0 35 -- Each item has to use ItemBase.Create(widgetType) to
Zerotorescue@0 36 -- create an initial 'self' value.
Zerotorescue@0 37 -- ItemBase will add common functions and ui event handlers.
Zerotorescue@0 38 -- Be sure to keep basic usage when you override functions.
Zerotorescue@0 39
Zerotorescue@0 40 local ItemBase = {
Zerotorescue@0 41 -- NOTE: The ItemBase version is added to each item's version number
Zerotorescue@0 42 -- to ensure proper updates on ItemBase changes.
Zerotorescue@0 43 -- Use at least 1000er steps.
Zerotorescue@0 44 version = 1000,
Zerotorescue@0 45 counter = 0,
Zerotorescue@0 46 }
Zerotorescue@0 47
Zerotorescue@0 48 function ItemBase.Frame_OnEnter(this)
Zerotorescue@0 49 local self = this.obj
Zerotorescue@0 50
Zerotorescue@0 51 if self.useHighlight then
Zerotorescue@0 52 self.highlight:Show()
Zerotorescue@0 53 end
Zerotorescue@0 54 self:Fire("OnEnter")
Zerotorescue@0 55
Zerotorescue@0 56 if self.specialOnEnter then
Zerotorescue@0 57 self.specialOnEnter(self)
Zerotorescue@0 58 end
Zerotorescue@0 59 end
Zerotorescue@0 60
Zerotorescue@0 61 function ItemBase.Frame_OnLeave(this)
Zerotorescue@0 62 local self = this.obj
Zerotorescue@0 63
Zerotorescue@0 64 self.highlight:Hide()
Zerotorescue@0 65 self:Fire("OnLeave")
Zerotorescue@0 66
Zerotorescue@0 67 if self.specialOnLeave then
Zerotorescue@0 68 self.specialOnLeave(self)
Zerotorescue@0 69 end
Zerotorescue@0 70 end
Zerotorescue@0 71
Zerotorescue@0 72 -- exported, AceGUI callback
Zerotorescue@0 73 function ItemBase.OnAcquire(self)
Zerotorescue@0 74 self.frame:SetToplevel(true)
Zerotorescue@0 75 self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
Zerotorescue@0 76 end
Zerotorescue@0 77
Zerotorescue@0 78 -- exported, AceGUI callback
Zerotorescue@0 79 function ItemBase.OnRelease(self)
Zerotorescue@0 80 self:SetDisabled(false)
Zerotorescue@0 81 self.pullout = nil
Zerotorescue@0 82 self.frame:SetParent(nil)
Zerotorescue@0 83 self.frame:ClearAllPoints()
Zerotorescue@0 84 self.frame:Hide()
Zerotorescue@0 85 end
Zerotorescue@0 86
Zerotorescue@0 87 -- exported
Zerotorescue@0 88 -- NOTE: this is called by a Dropdown-Pullout.
Zerotorescue@0 89 -- Do not call this method directly
Zerotorescue@0 90 function ItemBase.SetPullout(self, pullout)
Zerotorescue@0 91 self.pullout = pullout
Zerotorescue@0 92
Zerotorescue@0 93 self.frame:SetParent(nil)
Zerotorescue@0 94 self.frame:SetParent(pullout.itemFrame)
Zerotorescue@0 95 self.parent = pullout.itemFrame
Zerotorescue@0 96 fixlevels(pullout.itemFrame, pullout.itemFrame:GetChildren())
Zerotorescue@0 97 end
Zerotorescue@0 98
Zerotorescue@0 99 -- exported
Zerotorescue@0 100 function ItemBase.SetText(self, text)
Zerotorescue@0 101 self.text:SetText(text or "")
Zerotorescue@0 102 end
Zerotorescue@0 103
Zerotorescue@0 104 -- exported
Zerotorescue@0 105 function ItemBase.GetText(self)
Zerotorescue@0 106 return self.text:GetText()
Zerotorescue@0 107 end
Zerotorescue@0 108
Zerotorescue@0 109 -- exported
Zerotorescue@0 110 function ItemBase.SetPoint(self, ...)
Zerotorescue@0 111 self.frame:SetPoint(...)
Zerotorescue@0 112 end
Zerotorescue@0 113
Zerotorescue@0 114 -- exported
Zerotorescue@0 115 function ItemBase.Show(self)
Zerotorescue@0 116 self.frame:Show()
Zerotorescue@0 117 end
Zerotorescue@0 118
Zerotorescue@0 119 -- exported
Zerotorescue@0 120 function ItemBase.Hide(self)
Zerotorescue@0 121 self.frame:Hide()
Zerotorescue@0 122 end
Zerotorescue@0 123
Zerotorescue@0 124 -- exported
Zerotorescue@0 125 function ItemBase.SetDisabled(self, disabled)
Zerotorescue@0 126 self.disabled = disabled
Zerotorescue@0 127 if disabled then
Zerotorescue@0 128 self.useHighlight = false
Zerotorescue@0 129 self.text:SetTextColor(.5, .5, .5)
Zerotorescue@0 130 else
Zerotorescue@0 131 self.useHighlight = true
Zerotorescue@0 132 self.text:SetTextColor(1, 1, 1)
Zerotorescue@0 133 end
Zerotorescue@0 134 end
Zerotorescue@0 135
Zerotorescue@0 136 -- exported
Zerotorescue@0 137 -- NOTE: this is called by a Dropdown-Pullout.
Zerotorescue@0 138 -- Do not call this method directly
Zerotorescue@0 139 function ItemBase.SetOnLeave(self, func)
Zerotorescue@0 140 self.specialOnLeave = func
Zerotorescue@0 141 end
Zerotorescue@0 142
Zerotorescue@0 143 -- exported
Zerotorescue@0 144 -- NOTE: this is called by a Dropdown-Pullout.
Zerotorescue@0 145 -- Do not call this method directly
Zerotorescue@0 146 function ItemBase.SetOnEnter(self, func)
Zerotorescue@0 147 self.specialOnEnter = func
Zerotorescue@0 148 end
Zerotorescue@0 149
Zerotorescue@0 150 function ItemBase.Create(type)
Zerotorescue@0 151 -- NOTE: Most of the following code is copied from AceGUI-3.0/Dropdown widget
Zerotorescue@0 152 local count = AceGUI:GetNextWidgetNum(type)
Zerotorescue@0 153 local frame = CreateFrame("Button", "AceGUI30DropDownItem"..count)
Zerotorescue@0 154 local self = {}
Zerotorescue@0 155 self.frame = frame
Zerotorescue@0 156 frame.obj = self
Zerotorescue@0 157 self.type = type
Zerotorescue@0 158
Zerotorescue@0 159 self.useHighlight = true
Zerotorescue@0 160
Zerotorescue@0 161 frame:SetHeight(17)
Zerotorescue@0 162 frame:SetFrameStrata("FULLSCREEN_DIALOG")
Zerotorescue@0 163
Zerotorescue@0 164 local text = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
Zerotorescue@0 165 text:SetTextColor(1,1,1)
Zerotorescue@0 166 text:SetJustifyH("LEFT")
Zerotorescue@0 167 text:SetPoint("TOPLEFT",frame,"TOPLEFT",18,0)
Zerotorescue@0 168 text:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-8,0)
Zerotorescue@0 169 self.text = text
Zerotorescue@0 170
Zerotorescue@0 171 local highlight = frame:CreateTexture(nil, "OVERLAY")
Zerotorescue@0 172 highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
Zerotorescue@0 173 highlight:SetBlendMode("ADD")
Zerotorescue@0 174 highlight:SetHeight(14)
Zerotorescue@0 175 highlight:ClearAllPoints()
Zerotorescue@0 176 highlight:SetPoint("RIGHT",frame,"RIGHT",-3,0)
Zerotorescue@0 177 highlight:SetPoint("LEFT",frame,"LEFT",5,0)
Zerotorescue@0 178 highlight:Hide()
Zerotorescue@0 179 self.highlight = highlight
Zerotorescue@0 180
Zerotorescue@0 181 local check = frame:CreateTexture("OVERLAY")
Zerotorescue@0 182 check:SetWidth(16)
Zerotorescue@0 183 check:SetHeight(16)
Zerotorescue@0 184 check:SetPoint("LEFT",frame,"LEFT",3,-1)
Zerotorescue@0 185 check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
Zerotorescue@0 186 check:Hide()
Zerotorescue@0 187 self.check = check
Zerotorescue@0 188
Zerotorescue@0 189 local sub = frame:CreateTexture("OVERLAY")
Zerotorescue@0 190 sub:SetWidth(16)
Zerotorescue@0 191 sub:SetHeight(16)
Zerotorescue@0 192 sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1)
Zerotorescue@0 193 sub:SetTexture("Interface\\ChatFrame\\ChatFrameExpandArrow")
Zerotorescue@0 194 sub:Hide()
Zerotorescue@0 195 self.sub = sub
Zerotorescue@0 196
Zerotorescue@0 197 frame:SetScript("OnEnter", ItemBase.Frame_OnEnter)
Zerotorescue@0 198 frame:SetScript("OnLeave", ItemBase.Frame_OnLeave)
Zerotorescue@0 199
Zerotorescue@0 200 self.OnAcquire = ItemBase.OnAcquire
Zerotorescue@0 201 self.OnRelease = ItemBase.OnRelease
Zerotorescue@0 202
Zerotorescue@0 203 self.SetPullout = ItemBase.SetPullout
Zerotorescue@0 204 self.GetText = ItemBase.GetText
Zerotorescue@0 205 self.SetText = ItemBase.SetText
Zerotorescue@0 206 self.SetDisabled = ItemBase.SetDisabled
Zerotorescue@0 207
Zerotorescue@0 208 self.SetPoint = ItemBase.SetPoint
Zerotorescue@0 209 self.Show = ItemBase.Show
Zerotorescue@0 210 self.Hide = ItemBase.Hide
Zerotorescue@0 211
Zerotorescue@0 212 self.SetOnLeave = ItemBase.SetOnLeave
Zerotorescue@0 213 self.SetOnEnter = ItemBase.SetOnEnter
Zerotorescue@0 214
Zerotorescue@0 215 return self
Zerotorescue@0 216 end
Zerotorescue@0 217
Zerotorescue@0 218 --[[
Zerotorescue@0 219 Template for items:
Zerotorescue@0 220
Zerotorescue@0 221 -- Item:
Zerotorescue@0 222 --
Zerotorescue@0 223 do
Zerotorescue@0 224 local widgetType = "Dropdown-Item-"
Zerotorescue@0 225 local widgetVersion = 1
Zerotorescue@0 226
Zerotorescue@0 227 local function Constructor()
Zerotorescue@0 228 local self = ItemBase.Create(widgetType)
Zerotorescue@0 229
Zerotorescue@0 230 AceGUI:RegisterAsWidget(self)
Zerotorescue@0 231 return self
Zerotorescue@0 232 end
Zerotorescue@0 233
Zerotorescue@0 234 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
Zerotorescue@0 235 end
Zerotorescue@0 236 --]]
Zerotorescue@0 237
Zerotorescue@0 238 -- Item: Header
Zerotorescue@0 239 -- A single text entry.
Zerotorescue@0 240 -- Special: Different text color and no highlight
Zerotorescue@0 241 do
Zerotorescue@0 242 local widgetType = "Dropdown-Item-Header"
Zerotorescue@0 243 local widgetVersion = 1
Zerotorescue@0 244
Zerotorescue@0 245 local function OnEnter(this)
Zerotorescue@0 246 local self = this.obj
Zerotorescue@0 247 self:Fire("OnEnter")
Zerotorescue@0 248
Zerotorescue@0 249 if self.specialOnEnter then
Zerotorescue@0 250 self.specialOnEnter(self)
Zerotorescue@0 251 end
Zerotorescue@0 252 end
Zerotorescue@0 253
Zerotorescue@0 254 local function OnLeave(this)
Zerotorescue@0 255 local self = this.obj
Zerotorescue@0 256 self:Fire("OnLeave")
Zerotorescue@0 257
Zerotorescue@0 258 if self.specialOnLeave then
Zerotorescue@0 259 self.specialOnLeave(self)
Zerotorescue@0 260 end
Zerotorescue@0 261 end
Zerotorescue@0 262
Zerotorescue@0 263 -- exported, override
Zerotorescue@0 264 local function SetDisabled(self, disabled)
Zerotorescue@0 265 ItemBase.SetDisabled(self, disabled)
Zerotorescue@0 266 if not disabled then
Zerotorescue@0 267 self.text:SetTextColor(1, 1, 0)
Zerotorescue@0 268 end
Zerotorescue@0 269 end
Zerotorescue@0 270
Zerotorescue@0 271 local function Constructor()
Zerotorescue@0 272 local self = ItemBase.Create(widgetType)
Zerotorescue@0 273
Zerotorescue@0 274 self.SetDisabled = SetDisabled
Zerotorescue@0 275
Zerotorescue@0 276 self.frame:SetScript("OnEnter", OnEnter)
Zerotorescue@0 277 self.frame:SetScript("OnLeave", OnLeave)
Zerotorescue@0 278
Zerotorescue@0 279 self.text:SetTextColor(1, 1, 0)
Zerotorescue@0 280
Zerotorescue@0 281 AceGUI:RegisterAsWidget(self)
Zerotorescue@0 282 return self
Zerotorescue@0 283 end
Zerotorescue@0 284
Zerotorescue@0 285 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
Zerotorescue@0 286 end
Zerotorescue@0 287
Zerotorescue@0 288 -- Item: Execute
Zerotorescue@0 289 -- A simple button
Zerotorescue@0 290 do
Zerotorescue@0 291 local widgetType = "Dropdown-Item-Execute"
Zerotorescue@0 292 local widgetVersion = 1
Zerotorescue@0 293
Zerotorescue@0 294 local function Frame_OnClick(this, button)
Zerotorescue@0 295 local self = this.obj
Zerotorescue@0 296 if self.disabled then return end
Zerotorescue@0 297 self:Fire("OnClick")
Zerotorescue@0 298 if self.pullout then
Zerotorescue@0 299 self.pullout:Close()
Zerotorescue@0 300 end
Zerotorescue@0 301 end
Zerotorescue@0 302
Zerotorescue@0 303 local function Constructor()
Zerotorescue@0 304 local self = ItemBase.Create(widgetType)
Zerotorescue@0 305
Zerotorescue@0 306 self.frame:SetScript("OnClick", Frame_OnClick)
Zerotorescue@0 307
Zerotorescue@0 308 AceGUI:RegisterAsWidget(self)
Zerotorescue@0 309 return self
Zerotorescue@0 310 end
Zerotorescue@0 311
Zerotorescue@0 312 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
Zerotorescue@0 313 end
Zerotorescue@0 314
Zerotorescue@0 315 -- Item: Toggle
Zerotorescue@0 316 -- Some sort of checkbox for dropdown menus.
Zerotorescue@0 317 -- Does not close the pullout on click.
Zerotorescue@0 318 do
Zerotorescue@0 319 local widgetType = "Dropdown-Item-Toggle"
Zerotorescue@0 320 local widgetVersion = 3
Zerotorescue@0 321
Zerotorescue@0 322 local function UpdateToggle(self)
Zerotorescue@0 323 if self.value then
Zerotorescue@0 324 self.check:Show()
Zerotorescue@0 325 else
Zerotorescue@0 326 self.check:Hide()
Zerotorescue@0 327 end
Zerotorescue@0 328 end
Zerotorescue@0 329
Zerotorescue@0 330 local function OnRelease(self)
Zerotorescue@0 331 ItemBase.OnRelease(self)
Zerotorescue@0 332 self:SetValue(nil)
Zerotorescue@0 333 end
Zerotorescue@0 334
Zerotorescue@0 335 local function Frame_OnClick(this, button)
Zerotorescue@0 336 local self = this.obj
Zerotorescue@0 337 if self.disabled then return end
Zerotorescue@0 338 self.value = not self.value
Zerotorescue@0 339 if self.value then
Zerotorescue@0 340 PlaySound("igMainMenuOptionCheckBoxOn")
Zerotorescue@0 341 else
Zerotorescue@0 342 PlaySound("igMainMenuOptionCheckBoxOff")
Zerotorescue@0 343 end
Zerotorescue@0 344 UpdateToggle(self)
Zerotorescue@0 345 self:Fire("OnValueChanged", self.value)
Zerotorescue@0 346 end
Zerotorescue@0 347
Zerotorescue@0 348 -- exported
Zerotorescue@0 349 local function SetValue(self, value)
Zerotorescue@0 350 self.value = value
Zerotorescue@0 351 UpdateToggle(self)
Zerotorescue@0 352 end
Zerotorescue@0 353
Zerotorescue@0 354 -- exported
Zerotorescue@0 355 local function GetValue(self)
Zerotorescue@0 356 return self.value
Zerotorescue@0 357 end
Zerotorescue@0 358
Zerotorescue@0 359 local function Constructor()
Zerotorescue@0 360 local self = ItemBase.Create(widgetType)
Zerotorescue@0 361
Zerotorescue@0 362 self.frame:SetScript("OnClick", Frame_OnClick)
Zerotorescue@0 363
Zerotorescue@0 364 self.SetValue = SetValue
Zerotorescue@0 365 self.GetValue = GetValue
Zerotorescue@0 366 self.OnRelease = OnRelease
Zerotorescue@0 367
Zerotorescue@0 368 AceGUI:RegisterAsWidget(self)
Zerotorescue@0 369 return self
Zerotorescue@0 370 end
Zerotorescue@0 371
Zerotorescue@0 372 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
Zerotorescue@0 373 end
Zerotorescue@0 374
Zerotorescue@0 375 -- Item: Menu
Zerotorescue@0 376 -- Shows a submenu on mouse over
Zerotorescue@0 377 -- Does not close the pullout on click
Zerotorescue@0 378 do
Zerotorescue@0 379 local widgetType = "Dropdown-Item-Menu"
Zerotorescue@0 380 local widgetVersion = 2
Zerotorescue@0 381
Zerotorescue@0 382 local function OnEnter(this)
Zerotorescue@0 383 local self = this.obj
Zerotorescue@0 384 self:Fire("OnEnter")
Zerotorescue@0 385
Zerotorescue@0 386 if self.specialOnEnter then
Zerotorescue@0 387 self.specialOnEnter(self)
Zerotorescue@0 388 end
Zerotorescue@0 389
Zerotorescue@0 390 self.highlight:Show()
Zerotorescue@0 391
Zerotorescue@0 392 if not self.disabled and self.submenu then
Zerotorescue@0 393 self.submenu:Open("TOPLEFT", self.frame, "TOPRIGHT", self.pullout:GetRightBorderWidth(), 0, self.frame:GetFrameLevel() + 100)
Zerotorescue@0 394 end
Zerotorescue@0 395 end
Zerotorescue@0 396
Zerotorescue@0 397 local function OnHide(this)
Zerotorescue@0 398 local self = this.obj
Zerotorescue@0 399 if self.submenu then
Zerotorescue@0 400 self.submenu:Close()
Zerotorescue@0 401 end
Zerotorescue@0 402 end
Zerotorescue@0 403
Zerotorescue@0 404 -- exported
Zerotorescue@0 405 local function SetMenu(self, menu)
Zerotorescue@0 406 assert(menu.type == "Dropdown-Pullout")
Zerotorescue@0 407 self.submenu = menu
Zerotorescue@0 408 end
Zerotorescue@0 409
Zerotorescue@0 410 -- exported
Zerotorescue@0 411 local function CloseMenu(self)
Zerotorescue@0 412 self.submenu:Close()
Zerotorescue@0 413 end
Zerotorescue@0 414
Zerotorescue@0 415 local function Constructor()
Zerotorescue@0 416 local self = ItemBase.Create(widgetType)
Zerotorescue@0 417
Zerotorescue@0 418 self.sub:Show()
Zerotorescue@0 419
Zerotorescue@0 420 self.frame:SetScript("OnEnter", OnEnter)
Zerotorescue@0 421 self.frame:SetScript("OnHide", OnHide)
Zerotorescue@0 422
Zerotorescue@0 423 self.SetMenu = SetMenu
Zerotorescue@0 424 self.CloseMenu = CloseMenu
Zerotorescue@0 425
Zerotorescue@0 426 AceGUI:RegisterAsWidget(self)
Zerotorescue@0 427 return self
Zerotorescue@0 428 end
Zerotorescue@0 429
Zerotorescue@0 430 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
Zerotorescue@0 431 end
Zerotorescue@0 432
Zerotorescue@0 433 -- Item: Separator
Zerotorescue@0 434 -- A single line to separate items
Zerotorescue@0 435 do
Zerotorescue@0 436 local widgetType = "Dropdown-Item-Separator"
Zerotorescue@0 437 local widgetVersion = 1
Zerotorescue@0 438
Zerotorescue@0 439 -- exported, override
Zerotorescue@0 440 local function SetDisabled(self, disabled)
Zerotorescue@0 441 ItemBase.SetDisabled(self, disabled)
Zerotorescue@0 442 self.useHighlight = false
Zerotorescue@0 443 end
Zerotorescue@0 444
Zerotorescue@0 445 local function Constructor()
Zerotorescue@0 446 local self = ItemBase.Create(widgetType)
Zerotorescue@0 447
Zerotorescue@0 448 self.SetDisabled = SetDisabled
Zerotorescue@0 449
Zerotorescue@0 450 local line = self.frame:CreateTexture(nil, "OVERLAY")
Zerotorescue@0 451 line:SetHeight(1)
Zerotorescue@0 452 line:SetTexture(.5, .5, .5)
Zerotorescue@0 453 line:SetPoint("LEFT", self.frame, "LEFT", 10, 0)
Zerotorescue@0 454 line:SetPoint("RIGHT", self.frame, "RIGHT", -10, 0)
Zerotorescue@0 455
Zerotorescue@0 456 self.text:Hide()
Zerotorescue@0 457
Zerotorescue@0 458 self.useHighlight = false
Zerotorescue@0 459
Zerotorescue@0 460 AceGUI:RegisterAsWidget(self)
Zerotorescue@0 461 return self
Zerotorescue@0 462 end
Zerotorescue@0 463
Zerotorescue@0 464 AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
Zerotorescue@0 465 end