- Added slash options for enable, disable, new and options.
- Max segments increased to 10 (up from 5).
This commit is contained in:
+42
-3
@@ -16,9 +16,44 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
local command, rest = msg:match("^(%S*)%s*(.-)$")
|
||||
|
||||
if (msg == Loc ["STRING_SLASH_NEW"]) then
|
||||
if (command == Loc ["STRING_SLASH_NEW"]) then
|
||||
|
||||
_detalhes:CriarInstancia()
|
||||
|
||||
elseif (command == Loc ["STRING_SLASH_DISABLE"]) then
|
||||
|
||||
_detalhes:CaptureSet (false, "damage", true)
|
||||
_detalhes:CaptureSet (false, "heal", true)
|
||||
_detalhes:CaptureSet (false, "energy", true)
|
||||
_detalhes:CaptureSet (false, "miscdata", true)
|
||||
_detalhes:CaptureSet (false, "aura", true)
|
||||
print (Loc ["STRING_DETAILS1"] .. Loc ["STRING_SLASH_CAPTUREOFF"])
|
||||
|
||||
elseif (command == Loc ["STRING_SLASH_ENABLE"]) then
|
||||
|
||||
_detalhes:CaptureSet (true, "damage", true)
|
||||
_detalhes:CaptureSet (true, "heal", true)
|
||||
_detalhes:CaptureSet (true, "energy", true)
|
||||
_detalhes:CaptureSet (true, "miscdata", true)
|
||||
_detalhes:CaptureSet (true, "aura", true)
|
||||
print (Loc ["STRING_DETAILS1"] .. Loc ["STRING_SLASH_CAPTUREON"])
|
||||
|
||||
elseif (command == Loc ["STRING_SLASH_OPTIONS"]) then
|
||||
|
||||
if (rest and tonumber (rest)) then
|
||||
local instanceN = tonumber (rest)
|
||||
if (instanceN > 0 and instanceN <= #_detalhes.tabela_instancias) then
|
||||
local instance = _detalhes:GetInstance (instanceN)
|
||||
_detalhes:OpenOptionsWindow (instance)
|
||||
end
|
||||
else
|
||||
local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
print (_detalhes:GetInstance (lower_instance))
|
||||
_detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance))
|
||||
end
|
||||
|
||||
|
||||
-------- debug ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
elseif (msg == "copy") then
|
||||
_G.DetailsCopy:Show()
|
||||
_G.DetailsCopy.MyObject.text:HighlightText()
|
||||
@@ -160,8 +195,12 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
--end
|
||||
|
||||
print (" ")
|
||||
print ("Details! Help")
|
||||
print ("|cffffaeae/details new|r: open or re-open a new window.")
|
||||
print (Loc ["STRING_DETAILS1"] .. Loc ["STRING_COMMAND_LIST"])
|
||||
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_NEW"] .. "|r: " .. Loc ["STRING_SLASH_NEW_DESC"])
|
||||
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_ENABLE"] .. "|r: " .. Loc ["STRING_SLASH_ENABLE_DESC"])
|
||||
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_DISABLE"] .. "|r: " .. Loc ["STRING_SLASH_DISABLE_DESC"])
|
||||
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_OPTIONS"] .. "|r|cfffcffb0 <instance number>|r: " .. Loc ["STRING_SLASH_OPTIONS_DESC"])
|
||||
print (" ")
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -29,7 +29,7 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
g:NewLabel (window, _, "$parentSliderLabel", "segmentsLabel", "max segments")
|
||||
window.segmentsLabel:SetPoint (10, -35)
|
||||
--
|
||||
g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 60, 20, 1, 5, 1, _detalhes.segments_amount) -- min, max, step, defaultv
|
||||
g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 10, 1, _detalhes.segments_amount) -- min, max, step, defaultv
|
||||
window.segmentsSlider:SetPoint ("left", window.segmentsLabel, "right")
|
||||
window.segmentsSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
|
||||
_detalhes.segments_amount = amount
|
||||
|
||||
@@ -3,6 +3,8 @@ if not Loc then return end
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name
|
||||
|
||||
Loc ["STRING_AUTO"] = "auto"
|
||||
Loc ["STRING_LEFT"] = "left"
|
||||
Loc ["STRING_CENTER"] = "center"
|
||||
@@ -10,7 +12,23 @@ if not Loc then return end
|
||||
Loc ["STRING_TOOOLD"] = "could not be installed because your Details! version is too old."
|
||||
|
||||
--> Slash
|
||||
Loc ["STRING_COMMAND_LIST"] = "command list"
|
||||
|
||||
Loc ["STRING_SLASH_DISABLE"] = "disable"
|
||||
Loc ["STRING_SLASH_DISABLE_DESC"] = "turn off all captures of data."
|
||||
Loc ["STRING_SLASH_CAPTUREOFF"] = "all captures has been turned off."
|
||||
|
||||
Loc ["STRING_SLASH_ENABLE"] = "enable"
|
||||
Loc ["STRING_SLASH_ENABLE_DESC"] = "turn on all captures of data."
|
||||
Loc ["STRING_SLASH_CAPTUREON"] = "all captures has been turned on."
|
||||
|
||||
Loc ["STRING_SLASH_OPTIONS"] = "options"
|
||||
Loc ["STRING_SLASH_OPTIONS_DESC"] = "open the options panel."
|
||||
|
||||
Loc ["STRING_SLASH_NEW"] = "new"
|
||||
Loc ["STRING_SLASH_NEW_DESC"] = "open or reopen a instance."
|
||||
|
||||
|
||||
|
||||
--> StatusBar Plugins
|
||||
Loc ["STRING_STATUSBAR_NOOPTIONS"] = "This widget doesn't have options."
|
||||
|
||||
@@ -3,6 +3,8 @@ if not Loc then return end
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name
|
||||
|
||||
Loc ["STRING_AUTO"] = "auto"
|
||||
Loc ["STRING_LEFT"] = "esquerda"
|
||||
Loc ["STRING_CENTER"] = "centro"
|
||||
@@ -10,7 +12,21 @@ if not Loc then return end
|
||||
Loc ["STRING_TOOOLD"] = "nao pode ser instalado pois sua versao do Details! e muito antiga."
|
||||
|
||||
--> Slash
|
||||
Loc ["STRING_COMMAND_LIST"] = "lista de comandos"
|
||||
|
||||
Loc ["STRING_SLASH_DISABLE"] = "desativar"
|
||||
Loc ["STRING_SLASH_DISABLE_DESC"] = "desliga todas as capturas de dados."
|
||||
Loc ["STRING_SLASH_CAPTUREOFF"] = "todas as capturas foram desligadas."
|
||||
|
||||
Loc ["STRING_SLASH_ENABLE"] = "ativa"
|
||||
Loc ["STRING_SLASH_ENABLE_DESC"] = "liga todas as capturas de dados."
|
||||
Loc ["STRING_SLASH_CAPTUREON"] = "todas as capturas foram ligadas."
|
||||
|
||||
Loc ["STRING_SLASH_OPTIONS"] = "opcoes"
|
||||
Loc ["STRING_SLASH_OPTIONS_DESC"] = "abre o painel de opcoes."
|
||||
|
||||
Loc ["STRING_SLASH_NEW"] = "novo"
|
||||
Loc ["STRING_SLASH_NEW_DESC"] = "abre ou reabre uma instancia."
|
||||
|
||||
--> StatusBar Plugins
|
||||
Loc ["STRING_STATUSBAR_NOOPTIONS"] = "Nao ha opcoes para esta ferramenta."
|
||||
|
||||
Reference in New Issue
Block a user