View Single Post
12-02-09, 08:21 PM   #116
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by Ferous View Post
How would I go about adding a script to a panel and having an onclick so i can click it ingame for it to do something
Use the OnClick attribute:
Code:
OnClick = function(self, button)
    if button == "LeftButton" then
        -- do something
    elseif button == "RightButton" then
        -- do something else
    end
end
You can also check for modifiers with IsShiftKeyDown() or IsAltKeyDown().
  Reply With Quote