Language:
Lua     Change language:
Pastebin: 38695
Author: Saeris
Subject: MultiBarBottomLeft page changer
Created: 2007-05-23 06:17:43
Download and save
Toggle line numbers
1do 
2    local header = CreateFrame("Frame", "MultiBarBottomLeft_PageChanger", UIParent, "SecureStateDriverTemplate"); 
3 
4    header:SetAttribute("statemap-actionbar", "$input"); 
5    header:SetAttribute("statebutton", "0-1:P1;2:P2"); -- P1 = page 1, P2 = page 2 
6end 
7 
8 
9CreateFrame("Frame", "MultiBarBottomLeft_PageChanger_Initializer", UIParent):RegisterEvent("PLAYER_LOGIN"); 
10 
11 
12 
13MultiBarBottomLeft_PageChanger_Initializer:SetScript("OnEvent", function(self) 
14    local getglobal = getglobal
15    local setBindingClick = SetBindingClick; 
16    local getBindingKey = GetBindingKey
17 
18    local header = MultiBarBottomLeft_PageChanger; 
19 
20    local button, key; 
21 
22 
23    for index = 1, 12 do 
24        button = getglobal("MultiBarBottomLeftButton"..index); 
25 
26        header:SetAttribute("addchild", button); 
27        button:SetAttribute("useparent-statebutton", true); 
28        button:SetAttribute("useparent-statemap", true); 
29 
30        key = getBindingKey("MULTIACTIONBAR1BUTTON"..index); 
31        if (key) then 
32            setBindingClick(key, "MultiBarBottomLeftButton"..index); 
33        end 
34 
35        button:SetID(0); 
36        button:SetAttribute("*action-P1", index + 60); 
37        button:SetAttribute("*action-P2", index + 72); 
38 
39        button:SetScript("OnAttributeChanged", ActionButton_Update); 
40    end 
41 
42 
43    self:SetScript("OnEvent", nil); 
44end); 
Thread:
[38695] MultiBarBottomLeft page changer by Saeris at 2007-05-23 06:17:43
  [77376] eyhairwx zubcexl by clwd fokvdczr at 2007-11-15 22:37:39 (diff)
  [77377] eyhairwx zubcexl by clwd fokvdczr at 2007-11-15 22:38:34 (diff)
Tip: Click the line numbers to toggle highliting on that line.

Paste followup:

Language:
Author:
Subject:


    Tabstop:     bigger biggest
Note: You can prefix a line with "@@@" to highlight it.