Quantcast
WoWInterface - View Single Post - Colorpicker?
Thread: Colorpicker?
View Single Post
07-12-20, 08:09 PM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,265
1. The vararg needs to go at th end.
Code:
local function ShowColorPicker(changedCallback, r, g, b, a)
    ....
end
Code:
local myPackedColor = {1, 1, 1, 1};
ShowColorPicker(myColorCallback, unpack(myPackedColor));
2. I'm not sure what you mean by "public"
Code:
local function changedCallback(self)
   if self.WhatEveryYouWantToCheck == xxx then
   end
end
The above is pretty public but you could use either local variables or variables in your addon table if you wanted to set them in a different .lua module

Code:
local addonName, addonTable = ...
local a, b, c
local function changedCallback(self)
   if a == x and b = y and not c then
      ...
   end
   if addonTable.SomeVariable == x then
      ...
   end
end
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 07-12-20 at 08:24 PM.
  Reply With Quote