View Single Post
07-08-13, 02:42 PM   #8
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,906
I can show you what I do with Discord Art which might be addaptable to KgPanels.

For displaying money, in on OnUpdate script
Code:
local m = GetMoney()
local gold = floor(m/10000)
local silver = floor((m - (10000*gold))/100)
self.text:SetText(gold .. "g " .. silver .. "s " .. m - (10000*gold) - (100*silver) .. "c")
For coords:
Code:
In an OnLoad Script:
self:RegisterEvent("MINIMAP_ZONE_CHANGED")
In an OnEvent script:
Code:
if event == "MINIMAP_ZONE_CHANGED" then
    self.needZoneUpdate = true
end
In an OnUpdated script:
Code:
if self.needZoneUpdate and not WorldMapFrame:IsVisible() then
    self.needZoneUpdate = false
    SetMapToCurrentZone()
end
local x,y = GetPlayerMapPosition("player")
x = format("%.1f", x*100)
y = format("%.1f", y*100)
self.text:SetText(25, x .. " " .. y)
Opening bags, in an OnClick script:
Code:
OpenAllBags()
To show/Hide the calendar: in an OnClick script:
Code:
if CalendarFrame:IsVisible() then
    CalendarFrame:Hide()
else
    CalendarFrame:Show()
end
See also reply in other thread. I think that covers them all

Last edited by Fizzlemizz : 07-08-13 at 02:58 PM.
  Reply With Quote