View Single Post
11-25-14, 07:02 PM   #15
Zireko
An Aku'mai Servant
Join Date: Nov 2014
Posts: 38
I just read over the saved variables information you gave me. However could someone give me an example with just my first frame?

I've added this to my toc
## SavedVariables: QWindowHide, QWindowLock

I've added this to the top of my lua

Lua Code:
  1. local MasterZframe = CreateFrame("FRAME"); -- Need a frame to respond to events
  2. MasterZframe:RegisterEvent("ADDON_LOADED"); -- Fired when saved variables are loaded
  3. MasterZframe:RegisterEvent("PLAYER_LOGOUT"); -- Fired when about to log out

I've added this to the bottom of my lua

Lua Code:
  1. local function MasterZframe:OnEvent(event, arg1)
  2.     if event == "ADDON_LOADED" and arg1 == "ZBar" then
  3.        
  4.    
  5. end

I'm trying to understand what needs to go below (if event == "ADDON_LOADED")

I know it needs to save the hide and lock checkboxes. This is as far as I've gotten I'm just not sure how to save if they've clicked the checkbox or not.
  Reply With Quote