Mercurial > wow > devian
comparison Devian.lua @ 22:45e1e612df44
Texture and visibility settings applied during frame creation
author | Nenue |
---|---|
date | Wed, 23 Dec 2015 08:19:11 -0500 |
parents | df098747b31d |
children | 2c2a84163606 |
comparison
equal
deleted
inserted
replaced
21:4ce99f995339 | 22:45e1e612df44 |
---|---|
26 backdrop = {1,1,1,0.2}, | 26 backdrop = {1,1,1,0.2}, |
27 backgrad = {'VERTICAL', 0.1, 0.1, 0.1, 0.3, 0, 0, 0, 0.5}, | 27 backgrad = {'VERTICAL', 0.1, 0.1, 0.1, 0.3, 0, 0, 0, 0.5}, |
28 backblend = 'BLEND', | 28 backblend = 'BLEND', |
29 frontdrop = {1,1,1,1}, | 29 frontdrop = {1,1,1,1}, |
30 frontgrad = {'VERTICAL', 0.1, 0.1, 0.1, 0.9, 0, 0, 0, 0.9}, | 30 frontgrad = {'VERTICAL', 0.1, 0.1, 0.1, 0.9, 0, 0, 0, 0.9}, |
31 frontblend = 'BLEND' | 31 frontblend = 'BLEND', |
32 frontborder = {1,0,0,1}, | |
33 backborder = {0,0,1,0.75}, | |
32 } | 34 } |
33 | 35 |
34 | 36 |
35 local function ScanAddOnList(cmd, ...) | 37 local function ScanAddOnList(cmd, ...) |
36 local list_state | 38 local list_state |
235 local function Console_ToFront(c) | 237 local function Console_ToFront(c) |
236 --print(D.raise_ct, 'Raising', c.signature) | 238 --print(D.raise_ct, 'Raising', c.signature) |
237 --print(unpack(db.frontdrop)) | 239 --print(unpack(db.frontdrop)) |
238 --print(unpack(db.frontgrad)) | 240 --print(unpack(db.frontgrad)) |
239 --print(db.frontblend) | 241 --print(db.frontblend) |
240 D.raise_ct = D.raise_ct + 1 | 242 -- D.raise_ct = D.raise_ct + 1 |
241 c:Raise() | 243 c:Raise() |
242 c.out.backdrop:SetTexture(unpack(db.frontdrop)) | 244 c.out.backdrop:SetTexture(unpack(db.frontdrop)) |
243 c.out.backdrop:SetGradientAlpha(unpack(db.frontgrad)) | 245 c.out.backdrop:SetGradientAlpha(unpack(db.frontgrad)) |
244 c.out.backdrop:SetBlendMode(db.frontblend) | 246 c.out.backdrop:SetBlendMode(db.frontblend) |
245 db.current_channel = c.index | 247 db.current_channel = c.index |
246 | 248 |
247 for _, part in pairs(c.border) do | 249 for _, part in pairs(c.border) do |
248 part:SetTexture(1,0,0,1) | 250 part:SetTexture(unpack(db.front_border)) |
249 end | 251 end |
250 | 252 |
251 for id, bc in pairs(D.console) do | 253 for id, bc in pairs(D.console) do |
252 if id ~= c.index then | 254 if id ~= c.index then |
253 --print(D.raise_ct, 'Lowering', bc.signature) | 255 --print(D.raise_ct, 'Lowering', bc.signature) |
257 bc.out.backdrop:SetTexture(unpack(db.backdrop)) | 259 bc.out.backdrop:SetTexture(unpack(db.backdrop)) |
258 bc.out.backdrop:SetGradientAlpha(unpack(db.backgrad)) | 260 bc.out.backdrop:SetGradientAlpha(unpack(db.backgrad)) |
259 bc.out.backdrop:SetBlendMode(db.backblend) | 261 bc.out.backdrop:SetBlendMode(db.backblend) |
260 | 262 |
261 for _, part in pairs(bc.border) do | 263 for _, part in pairs(bc.border) do |
262 part:SetTexture(0,0,0.5,0.6) | 264 part:SetTexture(unpack(db.back_border)) |
263 end | 265 end |
264 end | 266 end |
265 | 267 |
266 end | 268 end |
267 | 269 |
282 local f = CreateFrame('Frame', 'DevianChannelFrame' .. tostring(i), UIParent, DEVIAN_FRAME) | 284 local f = CreateFrame('Frame', 'DevianChannelFrame' .. tostring(i), UIParent, DEVIAN_FRAME) |
283 f:SetPoint('TOPLEFT', UIParent, 'TOPLEFT', vars.x, vars.y) | 285 f:SetPoint('TOPLEFT', UIParent, 'TOPLEFT', vars.x, vars.y) |
284 f:SetSize(vars.width, vars.height) | 286 f:SetSize(vars.width, vars.height) |
285 f:Lower() | 287 f:Lower() |
286 f.out:SetFont(db.font, db.fontsize, db.fontoutline) | 288 f.out:SetFont(db.font, db.fontsize, db.fontoutline) |
289 if (db.current_channel == i) then | |
290 f:out:SetTexture(unpack(db.frontdrop)) | |
291 else | |
292 f:out:SetTexture(unpack(db.backdrop)) | |
293 end | |
294 | |
287 f.Save = Console_Save | 295 f.Save = Console_Save |
288 f.Minimize = Console_Minimize | 296 f.Minimize = Console_Minimize |
289 f.Maximize = Console_Maximize | 297 f.Maximize = Console_Maximize |
290 f.MinMax = Console_MinMax | 298 f.MinMax = Console_MinMax |
291 f.ToFront = Console_ToFront | 299 f.ToFront = Console_ToFront |
305 f:Show() | 313 f:Show() |
306 end | 314 end |
307 end | 315 end |
308 if vars.minimized then | 316 if vars.minimized then |
309 f:Minimize() | 317 f:Minimize() |
318 else | |
319 f:Maximize() | |
310 end | 320 end |
311 | 321 |
312 return f | 322 return f |
313 end | 323 end |
314 | 324 |
551 D.oldprint = getprinthandler() | 561 D.oldprint = getprinthandler() |
552 if not _G.oldprint then | 562 if not _G.oldprint then |
553 _G.oldprint = D.oldprint | 563 _G.oldprint = D.oldprint |
554 end | 564 end |
555 | 565 |
556 self.raise_ct = 0 | 566 --self.raise_ct = 0 |
557 self.last_channel = 0 | 567 self.last_channel = 0 |
558 self.num_channels = 0 | 568 self.num_channels = 0 |
559 self.console = {} | 569 self.console = {} |
560 self.sig = {} | 570 self.sig = {} |
561 self.sigID = {} | 571 self.sigID = {} |