Mercurial > wow > devian
diff Devian.lua @ 100:790dca545f1d v3.0
- Configuration structure overheal; clearing 'Devian.lua' from SaveVariables will be necessary
- Removed dependence on embedded libraries.
- Console/dock frames are now implemented as XML mixin structures
- Console dropdown menu option to 'Pin' frames
- Hold SHIFT while clicking dock buttons will cause all but that tab to be closed
author | Nenue |
---|---|
date | Tue, 17 Jan 2017 14:25:18 -0500 |
parents | 7d94df3804a7 |
children | 8dc0c1917890 |
line wrap: on
line diff
--- a/Devian.lua Thu Oct 27 06:11:04 2016 -0400 +++ b/Devian.lua Tue Jan 17 14:25:18 2017 -0500 @@ -5,6 +5,8 @@ --GLOBALS: Devian, DevianLoadMessage, DEVIAN_WORKSPACE, DEVIAN_PNAME, DEVIAN_PID +SLASH_RL1 = "/rl" +SlashCmdList.RL = function() ReloadUI() end DEVIAN_WORKSPACE = false DEVIAN_PNAME = 'Dvn' DEVIAN_PID = 0 @@ -22,6 +24,7 @@ local num_dock_tabs = 0 local charStates ={} +local channels_report = {} local registeredTags = {} @@ -714,10 +717,11 @@ prefix = sub(prefix, 0,2) end channel.out:AddMessage('|cFF'.. pcolor..prefix ..'|r ' .. message, 0.8, 0.8, 0.8) - if channel.Dock and not channel.Dock.newMessage then - channel.Dock.newMessage = true - channel.Dock.caption.pulse:Play() - channel.Dock:Update() + if not channel.newMessage then + channel.newMessage = true + if channel.Dock then + channel.Dock:Update() + end end end wipe(buffer) @@ -765,7 +769,7 @@ function D.ConsoleCommand (cmd) - D:Console_Toggle(cmd) + DevianDock:ToggleAll() end @@ -813,11 +817,10 @@ --- initialize the current profile local id, name = D.Profile(db.current_profile or 1) - D:Print('Using profile |cFFFFFF00'.. id ..'|r: |cFF00FF00'..currentProfile.name..'|r') if currentProfile.workspace then - D:Print('Workspace: '.. (#currentProfile.channels) .. ' channels, ' .. #currentProfile.tags .. ' tags.') + tinsert(channels_report, 'Profile |cFFFFFF00'.. id ..'|r: |cFF00FF00'..currentProfile.name.. '|r') if D.channels[currentProfile.default_channel] then - D:Print('Default channel: |cFFFFFF00'..currentProfile.default_channel..'|r: |cFF00FFFF'.. D.channels[currentProfile.default_channel].signature..'|r') + tinsert(channels_report, 'Primary: |cFFFFFF00#'..currentProfile.default_channel..'|r |cFF00FFFF'.. D.channels[currentProfile.default_channel].signature..'|r') end end @@ -831,6 +834,10 @@ D:GetOrCreateChannel(index) D.num_channels = #D.channels end + if #channels_report >= 1 then + D:Print(concat(channels_report, ', ')) + end + D.primary_channel = D.primary_channel or 1 D.max_channel = max(D.max_channel, currentProfile.max_channel) if currentProfile.max_channel < D.max_channel then @@ -849,8 +856,6 @@ end DevianDock:Update() end - - print('devian') end function D:Print (...) @@ -893,10 +898,11 @@ end local frame = D.console[id] + if not frame then if DEVIAN_WORKSPACE then - D:Print('Adding '.. (info.index) .. ':' .. (info.signature) .. ' (|cFF00FFFF'.. concat(info.tags, '|r; |cFF00FFFF')..'|r)') + tinsert(channels_report, (info.index) .. ':' .. (info.signature) .. ' (|cFF00FFFF'.. concat(info.tags, '|r; |cFF00FFFF')..'|r)') end frame = CreateFrame('Frame', 'DevianConsole'..id, Devian, 'DevianConsoleTemplate') frame:SetID(id)