- Save data on logout now is a separate script and others lua erros do not broke it any more.

- Few improvements on how instances load on logon.
- Slash commands are now more responsible, 'show' shows all windows, 'hide' hide them all, 'new' create a window.
- More Fixes for alpha mods and auto interact.

- New API: instance:InstaceAlpha (alpha) modify the alpha of window textures without saving.
- New API: instance:SetIconAlpha (alpha, hide, no_animations), modify the alpha of buttons without saving.
This commit is contained in:
tercio
2014-06-26 21:56:05 -03:00
parent c92f4e2d1c
commit 4fca65b5f3
8 changed files with 231 additions and 97 deletions
+9 -21
View File
@@ -17,30 +17,17 @@ function SlashCmdList.DETAILS (msg, editbox)
local command, rest = msg:match("^(%S*)%s*(.-)$")
if (command == Loc ["STRING_SLASH_NEW"]) then
_detalhes:CriarInstancia()
_detalhes:CriarInstancia (nil, true)
elseif (command == Loc ["STRING_SLASH_HIDE"] or command == Loc ["STRING_SLASH_HIDE_ALIAS1"]) then
_detalhes:ShutDownAllInstances()
elseif (command == Loc ["STRING_SLASH_SHOW"] or command == Loc ["STRING_SLASH_SHOW_ALIAS1"]) then
_detalhes:ReabrirTodasInstancias()
elseif (command == Loc ["STRING_SLASH_WIPECONFIG"]) then
_detalhes:WipeConfig()
elseif (command == Loc ["STRING_SLASH_SHOW"]) then
if (_detalhes.opened_windows == 0) then
_detalhes:CriarInstancia()
else
-- ter certeza que não bugou a contagem
local have_opened = false
for _, instance in ipairs (_detalhes.tabela_instancias) do
if (instance.baseframe:IsShown()) then
have_opened = true
break
end
end
if (not have_opened) then
_detalhes:CriarInstancia()
end
end
elseif (command == Loc ["STRING_SLASH_DISABLE"]) then
_detalhes:CaptureSet (false, "damage", true)
@@ -87,7 +74,7 @@ function SlashCmdList.DETAILS (msg, editbox)
print (format ("%s: \124cff%s\124r", _table [1], IsQuestFlaggedCompleted (_table [2]) and "ff0000"..Loc ["STRING_KILLED"] or "00ff00"..Loc ["STRING_ALIVE"]))
end
elseif (command == Loc ["STRING_SLASH_CHANGES"]) then
elseif (command == Loc ["STRING_SLASH_CHANGES"] or command == Loc ["STRING_SLASH_CHANGES_ALIAS1"] or command == Loc ["STRING_SLASH_CHANGES_ALIAS2"]) then
_detalhes:OpenNewsWindow()
-------- debug ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -781,6 +768,7 @@ function SlashCmdList.DETAILS (msg, editbox)
print (Loc ["STRING_DETAILS1"] .. "(" .. _detalhes.userversion .. ") " .. Loc ["STRING_COMMAND_LIST"])
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_NEW"] .. "|r: " .. Loc ["STRING_SLASH_NEW_DESC"])
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_SHOW"] .. "|r: " .. Loc ["STRING_SLASH_SHOW_DESC"])
print ("|cffffaeae/details " .. Loc ["STRING_SLASH_HIDE"] .. "|r: " .. Loc ["STRING_SLASH_HIDE_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"])