WoWInterface SVN hebChat

[/] [trunk/] [Options.lua] - Rev 2

Go to most recent revision | Compare with Previous | Blame | View Log

----------------------------------------
-- Addon name   : Animor's hebChat
-- Author       : Animor
-- Create Date  : 17/10/2012
-- File                 : Options.lua
----------------------------------------

----------------------------------------
-- Libs
----------------------------------------
local hebChat   = LibStub("AceAddon-3.0"):GetAddon("hebChat")

----------------------------------------
-- Configuration panel options
----------------------------------------
local options = { 
    name = "Animor's hebChat ".. GetAddOnMetadata("hebChat", "Version"),        
    handler = hebChat,
    type = "group",
        -- get = function(i) return hebChat.db.profile[i[#i]] end,
    -- set = function(i, v) hebChat.db.profile[i[#i]] = v end,
        -- childGroups = "tab",
    args = {
                desc0 = {
                        order = 0,
            type = "description",
            name = "|cffffff00Support Hebrew in WoW chat|r",
                        fontSize = "medium",
        },
                desc1 = {
                        order = 1,
            type = "description",
            name = " ",
        },              
                
                headerGlobal = {
                        order   = 1.5,
                        type    = "header",
                        name    = "Global settings",
                },

                globalEn = {
                        order   = 2,
                        type    = "toggle",
                        name    = "Enable hebChat",
                        desc    = "Global enable for hebChat addon",
                        width   = "double",
                        get     = function() return hebChatDB.globalEn end, 
                        set     = function(info, value)
                                                hebChat:globalEn_OnClick(value)
                                        end,
                },      
                
                graphicButtonEN = {
                        order   = 3,
                        type    = "toggle",
                        name    = "Enable language toggle button (recommended)",
                        -- desc         = "Click to enable or disable language toggle button",
                        desc    = "1. It's recommended to enable this button for more functionality, like slash commands support in Hebrew mode, improved mixed hebrew-english handling and more.\n\n2. When enabled, hit ctrl-tab while chatting or click the movable graphic button to toggle language.\n\n3. This button can be also keybinded using the default keybinding menu (this keybind toggles language when not chatting). We recommend binding it to ctrl-tab, for ease of use.\n\n4. When disabled, use alt-shift to toggle language, just like in Windows.",
                        width   = "double",
                        get     = function() return hebChatDB.graphicButtonEN end, 
                        set     = function(info, value)
                                                hebChat:graphicButtonEN_OnClick(value)
                                        end,
                        disabled = function(info) return not hebChatDB.globalEn end,
                },
                
                hebChatLangButtonSize = {
                        order   = 4,
                        type    = "range",
                        name    = "Language toggle button size",
                        min     = 15,
                        max             = 60,
                        step    = 1,
                        get     = function() return hebChatDB.langButtonSize end, 
                        set     = function(info, value)
                                                hebChatDB.langButtonSize = value
                                                hebChatLangButton:SetSize(value, value)
                                                hebChat:langButtonSetFont()
                                        end,
                        width   = "double",
                        disabled = function(info) return not (hebChatDB.globalEn and hebChatDB.graphicButtonEN) end,
                },              
                
                desc2 = {
                        order = 5,
            type = "description",
            name = " ",
        },
                        
                headerFont = {
                        order   = 6,
                        type    = "header",
                        name    = "Font settings",
                },
                
                fontDropDownList = {
                        order   = 7,
                        type = "select",
                        name = "Font:",
                        desc = "Set a font for the chat frame.",
                        get     = function() return hebChatDB.currentFont end, 
                        set     = function(info, value)
                                                hebChat:hebChatDropDownList_OnClick(value)
                                        end,
                        values = hebChat.fontsName,
                        style = "radio",
                },
                
                desc6 = {
                        order = 8,
            type = "description",
            name = " ",
        },              
                
                fontSizeSlider = {
                        order   = 9,
                        type    = "range",
                        name    = "Font Size",
                        desc    = "Set a font size for the chat frame",
                        min     = 5,
                        max             = 32,
                        step    = 1,
                        get     = function() return hebChatDB.currentFontSize end, 
                        set     = function(info, value)
                                                hebChat:hebChatFontSizeSlider_OnValueChanged(value)
                                        end,
                        width   = "double",
                },
                
    }, -- main args
} -- options

hebChat.options = options

Go to most recent revision | Compare with Previous | Blame