view modules/ReAction_State/ReAction_State.lua @ 27:f1e838841ce1

Rearranged file tree, removed unused code for 1.x start-point
author Flick <flickerstreak@gmail.com>
date Tue, 11 Mar 2008 21:39:34 +0000
parents bf997ea151ca
children 21bcaf8215ff
line wrap: on
line source
--[[
  ReAction bar state machine

--]]

-- local imports
local ReAction = ReAction
local L = ReAction.L
local _G = _G
local InCombatLockdown = InCombatLockdown

-- module declaration
local moduleID = "State"
local module = ReAction:NewModule( moduleID )

-- module methods
function module:OnInitialize()
  self.db = ReAction:AcquireDBNamespace(moduleID)
  ReAction:RegisterDefaults(moduleID,"profile", 
    {

    }
  )
end

function module:OnEnable()

end

function module:OnDisable()

end

function module:OnProfileEnable()

end

function module:OnProfileDisable()

end

--function module:GetGlobalOptions( configModule )
--  return {}
--end

--function module:GetGlobalBarOptions( configModule )
--
--end

--function module:GetModuleOptions( configModule )
--
--end

function module:GetBarConfigOptions( bar, configModule )
  if not bar.modConfigOpts[moduleID] then
    local IsEnabled = function() 
      return false
    end

    bar.modConfigOpts[moduleID] = {
      state = {
        type = "group",
        name = L["Dynamic Behavior"],
        desc = L["Dynamic Behavior"],
        args = {
          enable = {
            type = "toggle",
            name = L["Enable dynamic behavior"],
            desc = L["Toggles dynamic behavior for this bar"],
            get  = function() return false end,
            set  = function(x) end,
            disabled = InCombatLockdown,
            order = 1
          },

          default = {
            type = "text",
            name = L["Default State"],
            desc = L["State when no conditions apply"],
            get  = function() return false end,
            set  = function(x) end,
            disabled = IsEnabled,
            order = 2
          },

          stealth = {
            type = "text",
            name = L["Behavior when Stealthed"],
            desc = L["Change bar state when stealthed"],
            get  = function() return false end,
            set  = function(x) end,
            disabled = IsEnabled,
            validate = { },
          },

        }
      }
    }
  end
  return bar.modConfigOpts[moduleID]
end

function module:GetBarMenuOptions( bar, configModule )

end