annotate ObjectiveStyle.lua @ 12:8238cddaddb1

ObjectiveUI - fillers for 'Hidden' objective widgets
author Nenue
date Sat, 02 Apr 2016 05:01:54 -0400
parents fb80e365bab3
children 9455693fc290
rev   line source
Nenue@10 1 local B = select(2,...).frame
Nenue@10 2 local mod = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame')
Nenue@10 3 local print = B.print('SetStyle')
Nenue@10 4 -------------------------------------------------------------
Nenue@10 5 --- Deals with swapping between different color palettes
Nenue@10 6 ---
Nenue@10 7
Nenue@10 8 local itemButtonSize, itemButtonSpacing = 36, 1
Nenue@10 9 local wrapperPosition = {'RIGHT', UIParent, 'RIGHT', -84, 0}
Nenue@10 10 local titleFont, textFont = [[Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Bold.ttf]], [[Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Regular.ttf]]
Nenue@10 11 local titleSize, textSize = 15, 15
Nenue@10 12 local titleOutline, textOutline = "OUTLINE", "OUTLINE"
Nenue@10 13 local titleSpacing, textSpacing = 4, 3
Nenue@10 14 local textIndent = 5
Nenue@10 15 local wrapperMaxWidth, wrapperMaxHeight = 280, 490 -- these are the hard bounds, actual *Height variables are changed
Nenue@10 16 local wrapperHeadFont, wrapperHeadSize, wrapperHeadOutline = [[Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Bold.ttf]], 16, 'NONE'
Nenue@10 17 local headerFont, headerSize, headerHeight = [[Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Bold.ttf]], 18, 24
Nenue@10 18 local headerOutline, headerColor, headerSpacing = 'OUTLINE', {1,1,1,1}, 2
Nenue@10 19
Nenue@10 20 mod.defaults.ObjectiveWrapper = {
Nenue@10 21 ObjectiveTrackerFloat = {'BOTTOM', 'RIGHT'},
Nenue@10 22 ObjectiveTrackerParent = 'DebuffButton',
Nenue@10 23 ObjectiveTrackerSize = {250, 600},
Nenue@10 24 ObjectiveWrapperParent = '',
Nenue@10 25 }
Nenue@10 26 mod.defaults.Style = {
Nenue@10 27 FontBank = {
Nenue@10 28 ['Normal'] = _G.VeneerCriteriaFontNormal,
Nenue@10 29 ['Progress'] = _G.VeneerCriteriaFontProgress,
Nenue@10 30 ['Complete'] = _G.VeneerCriteriaFontComplete,
Nenue@10 31 ['Failed'] = _G.VeneerCriteriaFontFailed,
Nenue@10 32 },
Nenue@10 33 Normal = {
Nenue@10 34 title = {
Nenue@10 35 TextColor = {1, 1, 1, 1},
Nenue@10 36 Width = 270,
Nenue@10 37 },
Nenue@10 38 titlebg = {
Nenue@10 39 Background = {0, 0, 0, 1},
Nenue@10 40 Width = 270,
Nenue@10 41 },
Nenue@10 42 status = {
Nenue@10 43 Width = 270,
Nenue@10 44 },
Nenue@10 45 statusbg = {
Nenue@10 46 Width = 270,
Nenue@10 47 },
Nenue@10 48 Frame = {
Nenue@10 49 Width = 270,
Nenue@10 50 }
Nenue@10 51 },
Nenue@10 52 Wrapper = {
Nenue@10 53 Frame = {
Nenue@10 54 Point = {wrapperPosition},
Nenue@10 55 MaxSize = {wrapperMaxWidth, wrapperMaxHeight},
Nenue@10 56 BackgroundComplex = {Left = {'', 0, 0.4, 0,1, 100}, Right={'', 0.6,1,0,1}, Tile = {'', 0.4,.6,0,1, 100}}, },
Nenue@10 57 title = {
Nenue@10 58 Font = {wrapperHeadFont, wrapperHeadSize, wrapperHeadOutline},
Nenue@10 59 Spacing = 4,}
Nenue@10 60 },
Nenue@10 61 Tracker = {
Nenue@10 62 Normal = {
Nenue@10 63 title = {
Nenue@10 64 Font = {headerFont, headerSize, headerOutline}, Spacing = headerSpacing,
Nenue@10 65 },
Nenue@10 66 titlebg = {
Nenue@10 67 Gradient = {MinColor = {0,0,0,0.7}, MaxColor = {0,0,0,.35}},
Nenue@10 68 }
Nenue@10 69 }
Nenue@10 70 },
Nenue@10 71 TrackerBlock = {
Nenue@10 72 Normal = {
Nenue@10 73 titlebg = {
Nenue@10 74 Gradient = { MinColor = {0.2, .4, 1, 0.45}, MaxColor = {.7, 0, 0.9, .19}},
Nenue@10 75 },
Nenue@10 76 title = {
Nenue@10 77 Font = {titleFont, titleSize, titleOutline},
Nenue@10 78 Spacing = titleSpacing,
Nenue@10 79 },
Nenue@10 80 status = {
Nenue@10 81 Font = {textFont, textSize, textOutline}, Spacing = textSpacing,
Nenue@10 82 },
Nenue@10 83 statusbg = {
Nenue@10 84 Gradient = { MinColor = {0.2, .4, 1, 0.25}, MaxColor = {.7, 0, 0.9, .12}},
Nenue@10 85 }
Nenue@10 86 },
Nenue@10 87 Super = {
Nenue@10 88 title = {
Nenue@10 89 Font = {titleFont, titleSize, titleOutline},
Nenue@10 90 Spacing = titleSpacing, BackgroundFullWidth = true
Nenue@10 91 },
Nenue@10 92 titlebg = {
Nenue@10 93 Gradient = { MinColor = {0, .7, .6, .8}, MaxColor = {0, .7, .6, 0.2}},
Nenue@10 94 },
Nenue@10 95 status = {
Nenue@10 96 Font = {textFont, textSize, textOutline}, Spacing = textSpacing,
Nenue@10 97 },
Nenue@10 98 statusbg = {
Nenue@10 99 Gradient = { MinColor = {0, .7, .6, 0.5}, MaxColor = {0, .7, .6, 0.1} },
Nenue@10 100 },
Nenue@10 101 },
Nenue@10 102 MouseDown = {
Nenue@10 103 title = {
Nenue@10 104 Font = {titleFont, titleSize, titleOutline},
Nenue@10 105 Spacing = titleSpacing,
Nenue@10 106 },
Nenue@10 107 titlebg = {
Nenue@10 108 Gradient = { MinColor = {0.2, .4, 1, 1}, MaxColor = {0.2, .4, 1, .4}, },
Nenue@10 109 BackgroundFullWidth = true,
Nenue@10 110 },
Nenue@10 111 status = {
Nenue@10 112 Font = {textFont, textSize, textOutline},
Nenue@10 113 Spacing = textSpacing,
Nenue@10 114 },
Nenue@10 115 statusbg = {
Nenue@10 116 BackgroundFullWidth = true,
Nenue@10 117 Gradient = { MinColor = {0.2, .4, 1, 1}, MaxColor = {0.2, .4, 1, .2}, },
Nenue@10 118 }
Nenue@10 119 },
Nenue@10 120 Complete = {
Nenue@10 121 title = {
Nenue@10 122 Font = {titleFont, titleSize, titleOutline}, Spacing = titleSpacing,
Nenue@10 123 },
Nenue@10 124 titlebg = {
Nenue@10 125 Gradient = { MinColor = {0, 1, 0, 0.34}, MaxColor = {0, 1, 0, .17}, },
Nenue@10 126 BackgroundFullWidth = true
Nenue@10 127 },
Nenue@10 128 status = {
Nenue@10 129 Font = {textFont, textSize, textOutline}, Spacing = textSpacing,
Nenue@10 130 },
Nenue@10 131 statusbg = {
Nenue@10 132 Gradient = { MinColor = {0, 1, 0, .25}, MaxColor = {0, 1, 0, 0.12}, },
Nenue@10 133 BackgroundFullWidth = true
Nenue@10 134 }
Nenue@10 135 },
Nenue@10 136 Cheev = {
Nenue@10 137 Normal = {
Nenue@10 138
Nenue@10 139 title = {
Nenue@10 140 Font = {titleFont, titleSize, titleOutline},
Nenue@10 141 Spacing = titleSpacing,
Nenue@10 142 },
Nenue@10 143 titlebg = {
Nenue@10 144 Gradient = { MinColor = {0.2, .4, 1, 0.45}, MaxColor = {.7, 0, 0.9, .19}},
Nenue@10 145
Nenue@10 146 },
Nenue@10 147 status = {
Nenue@10 148 Font = {textFont, textSize, textOutline},
Nenue@10 149 Spacing = textSpacing,
Nenue@10 150 },
Nenue@10 151 statusbg = {
Nenue@10 152 Gradient = { MinColor = {0.2, .4, 1, 0.25}, MaxColor = {.7, 0, 0.9, .12}},
Nenue@10 153 },
Nenue@10 154 },
Nenue@10 155 Complete = {
Nenue@10 156 title = {
Nenue@10 157 Font = {titleFont, titleSize, titleOutline},
Nenue@10 158 Spacing = titleSpacing,
Nenue@10 159 },
Nenue@10 160 titlebg = {
Nenue@10 161 Gradient = { MinColor = {0.2, .4, 1, 0.45}, MaxColor = {.7, 0, 0.9, .19}},
Nenue@10 162 },
Nenue@10 163 status = {
Nenue@10 164 Font = {textFont, textSize, textOutline},
Nenue@10 165 Spacing = textSpacing,
Nenue@10 166 },
Nenue@10 167 statusbg = {
Nenue@10 168 Gradient = { MinColor = {0.2, .4, 1, 0.25}, MaxColor = {.7, 0, 0.9, .12}},
Nenue@10 169 },
Nenue@10 170 },
Nenue@10 171 }
Nenue@10 172 }
Nenue@10 173 }
Nenue@10 174
Nenue@10 175 local style_cache_func = {}
Nenue@10 176 local block_vars = {
Nenue@10 177 ['titleSize'] = {'titleWidth', 'titleHeight'},
Nenue@10 178 ['FrameSize'] = {'width', 'height'}
Nenue@10 179 }
Nenue@10 180 local attrib_vars = {
Nenue@10 181 ['Font'] = {'height'},
Nenue@10 182 }
Nenue@10 183
Nenue@10 184 mod.BlockStyleCache = {}
Nenue@10 185 local style_cache = mod.BlockStyleCache
Nenue@10 186 mod.regions = {}
Nenue@10 187 mod.regionStyles = {}
Nenue@10 188 mod.SetBlockStyle = function(frame, frameType, ...)
Nenue@10 189 -- var names intended to reflect argument order
Nenue@10 190 --@debug@
Nenue@10 191 local c = mod.defaults.Normal
Nenue@10 192 local style_list = {... }
Nenue@10 193 local styleName = frameType .. '-' .. table.concat(style_list,'')
Nenue@10 194
Nenue@10 195 if not style_cache[styleName] then
Nenue@10 196 local style = {}
Nenue@10 197
Nenue@10 198 if mod.defaults.Style[frameType] then
Nenue@10 199 print(' setting style class |cFF00FFFF'..frameType)
Nenue@10 200 else
Nenue@10 201 print(' resorting to class Normal (missing |cFFFF8800'.. frameType..'|r)')
Nenue@10 202 end
Nenue@10 203 local normal = mod.defaults.Style.Normal
Nenue@10 204 local root = mod.defaults.Style[frameType] or normal
Nenue@10 205 for i, className in ipairs(style_list) do
Nenue@10 206 local class = root[className] or normal[className] or root
Nenue@10 207 if root[className] then
Nenue@10 208
Nenue@10 209 print(' SubClass |cFF0088FF'.. className .. '|r')
Nenue@10 210 elseif normal[className] then
Nenue@10 211 print(' SubClass Normal.|cFFFF0088'..className..'|r')
Nenue@10 212 else
Nenue@10 213 print(' SubClass Normal')
Nenue@10 214 end
Nenue@10 215 for elementName, element in pairs(class) do
Nenue@10 216 if not elementName:match('^%u') then
Nenue@10 217 print(' scanning Element |cFF8800FF'.. elementName ..'|r')
Nenue@10 218 if not style[elementName] then
Nenue@10 219 style[elementName] = {}
Nenue@10 220 end
Nenue@10 221 for key, value in pairs(element) do
Nenue@10 222 if mod.SetBlockAttribute[key] then
Nenue@10 223 print(' |cFF00FF00'..elementName..'|r.|cFF00FFFF'..key..' =', (type(value) == 'table' and ('{'..table.concat(value,', ')..'}') or tostring(value)))
Nenue@10 224 style[elementName][key] = value
Nenue@10 225 end
Nenue@10 226
Nenue@10 227 end
Nenue@10 228 end
Nenue@10 229
Nenue@10 230 end
Nenue@10 231
Nenue@10 232 end
Nenue@10 233
Nenue@10 234 for k, elements in pairs(mod.defaults.Style.Normal) do
Nenue@10 235 if not style[k] and type(elements) ~= 'table' then
Nenue@10 236 style[k] = elements
Nenue@10 237 end
Nenue@10 238 end
Nenue@10 239
Nenue@10 240
Nenue@10 241 print('result for: ', frame:GetName())
Nenue@10 242 for k,v in pairs(style) do
Nenue@10 243 if type(v) == 'table' and not k:match('^%u') then
Nenue@10 244 for kk, vv in pairs(v) do
Nenue@10 245 print(' |cFFFFFF00'..k..'|r.|cFF00FF00'..kk..'|r =', tostring(vv))
Nenue@10 246 end
Nenue@10 247 else
Nenue@10 248 print(' |cFFFFFFFF' .. k ..'|r =', tostring(v))
Nenue@10 249 end
Nenue@10 250 end
Nenue@10 251 style_cache[styleName] = style
Nenue@10 252 else
Nenue@10 253 print('Cache hit: ', styleName)
Nenue@10 254 end
Nenue@10 255
Nenue@10 256 local style = style_cache[styleName]
Nenue@10 257
Nenue@10 258 if not style_cache_func[styleName] then
Nenue@10 259 local code =
Nenue@10 260 "return function (frame)\n"..
Nenue@10 261 " local func = Veneer.ObjectiveTracker.SetBlockAttribute\n"..
Nenue@11 262 " local cache = Veneer.ObjectiveTracker.BlockStyleCache"
Nenue@11 263 --.. " print('CacheFunc', '|cFFFFFF00SET|r "..styleName.." |cFFFFFF00ON|r', frame:GetName()) "
Nenue@10 264
Nenue@10 265 for elementName, styleset in pairs(style) do
Nenue@10 266 code = code ..
Nenue@10 267 "\n if frame['"..elementName.."'] then"
Nenue@10 268
Nenue@10 269 for attributeName, value in pairs(styleset) do
Nenue@10 270 if mod.SetBlockAttribute[attributeName] then
Nenue@10 271 print(' '..elementName..':'.. attributeName ..'(', value, ')')
Nenue@10 272
Nenue@10 273
Nenue@10 274 --mod.SetBlockAttribute[attributeName](region, value)
Nenue@11 275 code = code
Nenue@11 276 --.. "\n print('CacheFunc', ' applying', '|cFF00FFFF" .. attributeName .. "|r to', '|cFF0088FF"..elementName.."|r', cache['"..styleName.."']['"..elementName.."']['".. attributeName .."'])"
Nenue@11 277 .. "\n\n func['" .. attributeName .. "'](frame['"..elementName.."'],"..
Nenue@10 278 " cache['"..styleName.."']['"..elementName.."']['".. attributeName .."'])"
Nenue@10 279
Nenue@10 280 --- Set any frame.blah variables used in Updates
Nenue@10 281 if block_vars[elementName .. attributeName] then
Nenue@10 282 print('|cFF008800BVar|r', elementName..attributeName)
Nenue@10 283 for i, blockKey in ipairs(block_vars[elementName .. attributeName]) do
Nenue@10 284 print(' assigning |cFF008800'..blockKey..'|r')
Nenue@10 285 frame[blockKey] = (type(value) == 'table') and value[i] or value
Nenue@10 286 end
Nenue@10 287 end
Nenue@10 288
Nenue@10 289 end
Nenue@10 290 end
Nenue@10 291 code = code ..
Nenue@10 292 "\n else"..
Nenue@11 293 --"\n print('CacheFunc', ' |cFFFF4400missing', frame:GetName()..'."..elementName.."')"..
Nenue@10 294 "\n end"
Nenue@10 295 end
Nenue@10 296 code = code .. "\nend"
Nenue@10 297 local result = assert(loadstring(code))
Nenue@10 298 print('storing style func', styleName, result())
Nenue@10 299 style_cache_func[styleName] = result()
Nenue@10 300
Nenue@10 301 else
Nenue@10 302 print('Cache function hit:', styleName)
Nenue@10 303 end
Nenue@10 304 style_cache_func[styleName](frame)
Nenue@10 305
Nenue@10 306
Nenue@10 307 --print("Generated func = function()\n",code, "\nend")
Nenue@10 308 --local cache_func[styleName] = loadstring(code)
Nenue@10 309
Nenue@10 310 -- todo: remove hardcode and rely on attribute handler
Nenue@10 311 if frame.status then
Nenue@10 312 frame.status:SetWidth(270)
Nenue@10 313 end
Nenue@10 314 if frame.title then
Nenue@10 315 frame.title:SetWidth(270)
Nenue@10 316 end
Nenue@10 317
Nenue@10 318
Nenue@10 319 frame.titleHeight = frame.title and (frame.title:GetStringHeight() + frame.title.spacing*2) or 0
Nenue@10 320 frame.statusHeight = frame.status and (frame.status:GetStringHeight() + frame.status.spacing*2 + frame.attachmentHeight) or 0
Nenue@10 321 frame.height = frame.titleHeight + frame.statusHeight
Nenue@10 322 frame.width = 270
Nenue@10 323
Nenue@10 324
Nenue@10 325 if frame.status then
Nenue@10 326 print('status ', frame.statusHeight)
Nenue@10 327 frame.status:SetHeight(frame.statusHeight)
Nenue@10 328 if frame.statusbg then
Nenue@10 329
Nenue@10 330 print('statusbg', frame.statusHeight)
Nenue@10 331 frame.statusbg:SetHeight(frame.statusHeight)
Nenue@10 332 frame.statusbg:SetWidth(frame.width)
Nenue@10 333 end
Nenue@10 334 end
Nenue@10 335 if frame.title then
Nenue@10 336 print('title ',frame.titleHeight)
Nenue@10 337 frame.title:SetHeight(frame.titleHeight)
Nenue@10 338 if frame.titlebg then
Nenue@10 339 print('titlebg',frame.titleHeight)
Nenue@10 340 frame.titlebg:SetHeight(frame.titleHeight)
Nenue@10 341 frame.titlebg:SetWidth(frame.width)
Nenue@10 342 end
Nenue@10 343 end
Nenue@10 344 print('sizing frame', frame.width, frame.height)
Nenue@10 345 frame:SetSize(frame.width, frame.height)
Nenue@10 346 print(frame:GetSize())
Nenue@10 347 --[[
Nenue@10 348 local titleSpacing, titleSpacing2 = c.Title.Spacing, (c.Title.Spacing * 2)
Nenue@10 349 local textSpacing, textSpacing2 = c.Text.Spacing, (c.Text.Spacing * 2)
Nenue@10 350
Nenue@10 351 block.title:SetSpacing(titleSpacing)
Nenue@10 352 block.objectives:SetSpacing(textSpacing)
Nenue@10 353 block.objectives:SetWordWrap(true)
Nenue@10 354
Nenue@10 355 local titleHeight, textHeight = block.title:GetStringHeight(), block.objectives:GetStringHeight() + block.attachmentHeight
Nenue@10 356 local blockHeight = titleHeight + titleSpacing2 + textHeight + textSpacing2
Nenue@10 357 local blockWidth = wrapperMaxWidth
Nenue@10 358
Nenue@10 359 block.titlebg:SetSize(min(w1, w2), titleHeight + titleSpacing2)
Nenue@10 360 block.bg:SetSize(w1, textHeight + textSpacing2)
Nenue@10 361 block:SetSize(blockWidth, blockHeight)
Nenue@10 362
Nenue@10 363 block.title:SetPoint('TOPLEFT', block.titlebg, 'TOPLEFT', 0, -titleSpacing)
Nenue@10 364 block.objectives:SetPoint('TOPLEFT', block.titlebg, 'BOTTOMLEFT', textIndent, -textSpacing)
Nenue@10 365
Nenue@10 366 -- store
Nenue@10 367 block.titleHeight = titleHeight
Nenue@10 368 block.textHeight = textHeight
Nenue@10 369 block.width = blockWidth
Nenue@10 370 block.height = blockHeight
Nenue@10 371 --]]
Nenue@10 372 --print(' |cFF00FFFF'..block:GetName()..'|r:|cFF0088FFSetStyle|r(', blockWidth, 'x', blockHeight, '(textH', textHeight,', titleH', titleHeight, ')')
Nenue@10 373 end
Nenue@10 374
Nenue@10 375 --- Argument containers
Nenue@10 376 local o = "" -- text flag
Nenue@10 377 local a1, a2, a3, a4, b1, b2, b3, b4 = 0,0,0,1, 0,0,0,1 -- color1, color2
Nenue@10 378 local f1, f2, f3 = "", 0, "" -- font
Nenue@10 379 local w1, w2 = 0, 0 -- size
Nenue@10 380 local p1, p2, p3, x, y = "", "", "", 0, 0 -- path/point args
Nenue@10 381 mod.SetBlockAttribute = {}
Nenue@10 382 local sb = mod.SetBlockAttribute
Nenue@10 383 local print = B.print('Attribute')
Nenue@10 384 sb.Gradient = function(region, value)
Nenue@10 385 print('|cFF8844FFGradient|r', region:GetName(), unpack(value))
Nenue@10 386 o = 'HORIZONTAL'
Nenue@10 387 a1, a2, a3, a4 = unpack(value.MinColor)
Nenue@10 388 b1, b2, b3, b4 = unpack(value.MaxColor)
Nenue@10 389 region:SetVertexColor(1,1,1)
Nenue@10 390 region:SetTexture(1,1,1,1)
Nenue@10 391 region:SetGradientAlpha(o, a1, a2, a3, a4, b1, b2, b3, b4)
Nenue@10 392 end
Nenue@10 393
Nenue@10 394 sb.Background = function(region, value)
Nenue@10 395 print('|cFF0088FFBackground|r', unpack(value))
Nenue@10 396 region:SetVertexColor(1,1,1) -- reset
Nenue@10 397 region:SetTexture(unpack(value))
Nenue@10 398 end
Nenue@10 399 sb.BackgroundComplex = function (region, value)
Nenue@10 400 local left, tile, right = value.Left, value.Tile, value.Right
Nenue@10 401
Nenue@10 402 end
Nenue@10 403 sb.Font = function(region, value)
Nenue@10 404 f1, f2, f3 = unpack(value)
Nenue@10 405 print('|cFFFFFF00Font|r', f1, f2, f3)
Nenue@10 406 region:SetFont(f1, f2, f3)
Nenue@10 407 end
Nenue@10 408
Nenue@10 409 sb.Spacing = function(region, value)
Nenue@10 410 print('FontSpacing', value)
Nenue@10 411 region:SetSpacing(value)
Nenue@10 412 region.spacing = value
Nenue@10 413 end
Nenue@10 414
Nenue@10 415 sb.TextColor = function(region, value)
Nenue@10 416 a1, a2, a3, a4 = unpack(value)
Nenue@10 417 print('TextColor', a1, a2, a3, a4)
Nenue@10 418 region:SetTextColor(a1, a2, a3, a4)
Nenue@10 419 end
Nenue@10 420 sb.Texture = function(region, value)
Nenue@10 421
Nenue@10 422 p1, a1, a2, a3, a4 = unpack(value)
Nenue@10 423 print('Texture', p1, a1, a2, a3, a4)
Nenue@10 424 region:SetTexture(p1)
Nenue@10 425 if a1 then
Nenue@10 426 region:SetTexCoord(a1, a2, a3, a4)
Nenue@10 427 end
Nenue@10 428 end
Nenue@10 429 sb.Width = function(region, value)
Nenue@10 430 w1 = value
Nenue@10 431 region:SetWidth(w1)
Nenue@10 432 end
Nenue@10 433
Nenue@10 434 sb.Height = function(region, value)
Nenue@10 435 w2 = value
Nenue@10 436 region:SetHeight(w2)
Nenue@10 437 end
Nenue@10 438 sb.Size = function(region, value)
Nenue@10 439 w1, w2 = unpack(value)
Nenue@10 440 region:SetSize(w1, w2)
Nenue@10 441 end