1b9f073 - Add an alt to OmaRF
[wowui.git] / OmaUF / Settings.lua
1 -- Settings.lua
2 local PowerTypeMana = Enum.PowerType.Mana;
3 local PowerTypeRage = Enum.PowerType.Rage;
4 local PowerTypeFocus = Enum.PowerType.Focus;
5 local PowerTypeEnergy = Enum.PowerType.Energy;
6 local PowerTypeRunic = Enum.PowerType.RunicPower;
7 local rawget = rawget;
8
9 -- configurable settings
10 -- character specific settings
11 local charDefaults = {
12     Clickheal = {},
13 };
14 local chars = {
15     ["Stormreaver"] = {
16         ["Vildan"] = {
17             Clickheal = {
18                 ["type1"] = "spell",
19                 ["type2"] = "spell",
20                 ["shift-type1"] = "spell",
21                 ["shift-type2"] = "spell",
22                 ["ctrl-type1"] = "macro",
23                 ["alt-type2"] = "spell",
24                 ["alt-shift-type1"] = "spell",
25                 ["alt-shift-type2"] = "spell",
26                 ["spell1"] = "Holy Light",
27                 ["spell2"] = "Bestow Faith",
28                 ["shift-spell1"] = "Flash of Light",
29                 ["shift-spell2"] = "Light of the Martyr",
30                 ["ctrl-macro1"] = "Cleansing",
31                 ["alt-spell2"] = "Lay on Hands",
32                 ["alt-shift-spell1"] = "Beacon of Light",
33                 ["alt-shift-spell2"] = "Beacon of Faith",
34             },
35         },
36         ["Gedren"] = {
37             Clickheal = {
38                 ["type1"] = "spell",
39                 ["type2"] = "spell",
40                 ["shift-type1"] = "spell",
41                 ["shift-type2"] = "spell",
42                 ["ctrl-type1"] = "spell",
43                 ["alt-type2"] = "spell",
44                 ["spell1"] = "Healing Touch",
45                 ["spell2"] = "Lifebloom",
46                 ["shift-spell1"] = "Regrowth",
47                 ["shift-spell2"] = "Swiftmend",
48                 ["ctrl-spell1"] = "Nature's Cure",
49                 ["alt-spell2"] = "Rebirth",
50             },
51         },
52     },
53 };
54
55 -- account-wide settings
56 local settings = {
57     Player = {
58         Width = 160,
59         Height = 50,
60         AnchorX = -300,
61         AnchorY = -175,
62     },
63     Pet = {
64         Width = 80,
65         Height = 25,
66         AnchorX = -10,
67         AnchorY = 0,
68     },
69     Target = {
70         Width = 160,
71         Height = 50,
72         AnchorX = 300,
73         AnchorY = -175,
74     },
75     Boss = {
76         Width = 140,
77         Height = 30,
78         AnchorX = 550,
79         AnchorY = 300,
80     },
81     BaseColor = {0, 0, 0, 0.5},
82     BgColor = {0.1, 0.1, 0.1, 0.4},
83     HealthColor = {0.5, 0.5, 0.5},
84     ShieldColor = {0.1, 0.8, 1},
85     ShieldhlColor = {0.5, 0.8, 1},
86     HealpredColor = {0.5, 0.6, 0.5},
87     PowerColors = {
88         [PowerTypeMana] = {0, 0.5, 1},
89         [PowerTypeRage] = {1, 0, 0},
90         [PowerTypeFocus] = {1, 0.5, 0},
91         [PowerTypeEnergy] = {1, 0.8, 0},
92         [PowerTypeRunic] = {0.8, 0, 0.2},
93     },
94 };
95 OmaUFSettings = settings;
96 -- watch to not remove mana entry
97 setmetatable(settings.PowerColors, {__index = function(t) return rawget(t, PowerTypeMana) end});
98
99 function OmaUFLoadChar()
100     local name, realm = UnitFullName("player");
101     if chars[realm] and chars[realm][name] then
102         settings.Character = chars[realm][name];
103     else
104         settings.Character = charDefaults;
105     end
106 end