|
1 | | - |
2 | 1 | local _, addon = ... |
3 | 2 |
|
4 | 3 | -- Constants |
5 | 4 | local THIRD_WIDTH = 1.25 |
6 | 5 |
|
7 | | - |
8 | 6 | ------------------------------------------------------------------------- |
9 | 7 | ------------------------------------------------------------------------- |
10 | 8 |
|
11 | 9 | function addon:CreateCombatOptions() |
12 | | - local combatOptions = { |
13 | | - type = "group", |
14 | | - childGroups = "tree", |
15 | | - name = "Combat", |
16 | | - args = { |
17 | | - instructions = { |
18 | | - type = "description", |
19 | | - name = "These options allow you to modify Combat Options.", |
20 | | - fontSize = "medium", |
21 | | - order = 1, |
22 | | - }, |
23 | | - header = { |
24 | | - type = "header", |
25 | | - name = "", |
26 | | - order = 10, |
27 | | - }, |
28 | | - ------------------------------------------------- |
29 | | - stopAutoAttackOnTargetChange = { |
30 | | - type = "toggle", |
31 | | - name = STOP_AUTO_ATTACK, |
32 | | - desc = OPTION_TOOLTIP_STOP_AUTO_ATTACK, |
33 | | - get = function() |
34 | | - return C_CVar.GetCVarBool("stopAutoAttackOnTargetChange") |
35 | | - end, |
36 | | - set = function(_, value) |
37 | | - self:SetCVar("stopAutoAttackOnTargetChange", value) |
38 | | - end, |
39 | | - width="full", |
40 | | - order = 11, |
41 | | - }, |
42 | | - assistAttack = { |
43 | | - type = "toggle", |
44 | | - name = ASSIST_ATTACK, |
45 | | - desc = OPTION_TOOLTIP_ASSIST_ATTACK, |
46 | | - get = function() |
47 | | - return C_CVar.GetCVarBool("assistAttack") |
48 | | - end, |
49 | | - set = function(_, value) |
50 | | - self:SetCVar("assistAttack", value) |
51 | | - end, |
52 | | - width="full", |
53 | | - order = 12, |
54 | | - }, |
55 | | - ActionButtonUseKeyDown = { |
56 | | - type = "toggle", |
57 | | - name = ACTION_BUTTON_USE_KEY_DOWN, |
58 | | - desc = OPTION_TOOLTIP_ACTION_BUTTON_USE_KEY_DOWN, |
59 | | - get = function() |
60 | | - return C_CVar.GetCVarBool("ActionButtonUseKeyDown") |
61 | | - end, |
62 | | - set = function(_, value) |
63 | | - self:SetCVar("ActionButtonUseKeyDown", value) |
64 | | - end, |
65 | | - width="full", |
66 | | - order = 13, |
67 | | - }, |
68 | | - SpellQueueWindow = { |
69 | | - type = "range", |
70 | | - name = LAG_TOLERANCE, |
71 | | - desc = "Determines how far ahead of the \'end of a spell\' start-recovery spell system can be, before allowing spell request to be sent to the server. Ie this controls the built-in lag for the ability queuing system. Ideally, you\'ll want to set this to your in-game latency.", |
72 | | - min = 0, |
73 | | - max = 400, |
74 | | - step = 1, |
75 | | - get = function() |
76 | | - return tonumber(C_CVar.GetCVar("SpellQueueWindow")) |
77 | | - end, |
78 | | - set = function(_, value) |
79 | | - self:SetCVar("SpellQueueWindow", value) |
80 | | - end, |
81 | | - width = THIRD_WIDTH, |
82 | | - order = 14, |
83 | | - }, |
84 | | - } |
85 | | - } |
| 10 | + local combatOptions = { |
| 11 | + type = "group", |
| 12 | + childGroups = "tree", |
| 13 | + name = "Combat", |
| 14 | + args = { |
| 15 | + instructions = { |
| 16 | + type = "description", |
| 17 | + name = "These options allow you to modify Combat Options.", |
| 18 | + fontSize = "medium", |
| 19 | + order = 1, |
| 20 | + }, |
| 21 | + header = { |
| 22 | + type = "header", |
| 23 | + name = "", |
| 24 | + order = 10, |
| 25 | + }, |
| 26 | + ------------------------------------------------- |
| 27 | + stopAutoAttackOnTargetChange = { |
| 28 | + type = "toggle", |
| 29 | + name = STOP_AUTO_ATTACK, |
| 30 | + desc = OPTION_TOOLTIP_STOP_AUTO_ATTACK, |
| 31 | + get = function() |
| 32 | + return C_CVar.GetCVarBool("stopAutoAttackOnTargetChange") |
| 33 | + end, |
| 34 | + set = function(_, value) |
| 35 | + self:SetCVar("stopAutoAttackOnTargetChange", value) |
| 36 | + end, |
| 37 | + width = "full", |
| 38 | + order = 11, |
| 39 | + }, |
| 40 | + assistAttack = { |
| 41 | + type = "toggle", |
| 42 | + name = ASSIST_ATTACK, |
| 43 | + desc = OPTION_TOOLTIP_ASSIST_ATTACK, |
| 44 | + get = function() |
| 45 | + return C_CVar.GetCVarBool("assistAttack") |
| 46 | + end, |
| 47 | + set = function(_, value) |
| 48 | + self:SetCVar("assistAttack", value) |
| 49 | + end, |
| 50 | + width = "full", |
| 51 | + order = 12, |
| 52 | + }, |
| 53 | + ActionButtonUseKeyDown = { |
| 54 | + type = "toggle", |
| 55 | + name = ACTION_BUTTON_USE_KEY_DOWN, |
| 56 | + desc = OPTION_TOOLTIP_ACTION_BUTTON_USE_KEY_DOWN, |
| 57 | + get = function() |
| 58 | + return C_CVar.GetCVarBool("ActionButtonUseKeyDown") |
| 59 | + end, |
| 60 | + set = function(_, value) |
| 61 | + self:SetCVar("ActionButtonUseKeyDown", value) |
| 62 | + end, |
| 63 | + width = "full", |
| 64 | + order = 13, |
| 65 | + }, |
| 66 | + SpellQueueWindow = { |
| 67 | + type = "range", |
| 68 | + name = LAG_TOLERANCE, |
| 69 | + desc = "Determines how far ahead of the 'end of a spell' start-recovery spell system can be, before allowing spell request to be sent to the server. Ie this controls the built-in lag for the ability queuing system. Ideally, you'll want to set this to your in-game latency.", |
| 70 | + min = 0, |
| 71 | + max = 400, |
| 72 | + step = 1, |
| 73 | + get = function() |
| 74 | + return tonumber(C_CVar.GetCVar("SpellQueueWindow")) |
| 75 | + end, |
| 76 | + set = function(_, value) |
| 77 | + self:SetCVar("SpellQueueWindow", value) |
| 78 | + end, |
| 79 | + width = THIRD_WIDTH, |
| 80 | + order = 14, |
| 81 | + }, |
| 82 | + }, |
| 83 | + } |
86 | 84 |
|
87 | | - return combatOptions |
| 85 | + return combatOptions |
88 | 86 | end |
0 commit comments