diff --git a/Display.lua b/Display.lua index ac4a629..9320370 100644 --- a/Display.lua +++ b/Display.lua @@ -2,18 +2,18 @@ local mod = LCD4WoW:NewModule("LCD4WoW") mod.name = "LCD Display" mod.toggled = true mod.defaultOff = true -local Evaluator = LibStub("LibScriptableDisplayEvaluator-1.0") -local LibCore = LibStub("LibScriptableDisplayCore-1.0") -local LibLCDText = LibStub("LibScriptableDisplayLCDText-1.0") -local LibDriverQTip = LibStub("LibScriptableDisplayDriverQTip-1.0") -local LibDriverCharacter = LibStub("LibScriptableDisplayDriverCharacter-1.0") -local WidgetText = LibStub("LibScriptableDisplayWidgetText-1.0") -local WidgetBar = LibStub("LibScriptableDisplayWidgetBar-1.0") -local WidgetHistogram = LibStub("LibScriptableDisplayWidgetHistogram-1.0") -local WidgetKey = LibStub("LibScriptableDisplayWidgetKey-1.0") -local WidgetTimer = LibStub("LibScriptableDisplayWidgetTimer-1.0") -local LayoutOptions = LibStub("LibScriptableDisplayLayoutOptions-1.0") -local Resources = LibStub("LibScriptableDisplayPluginResourceTools-1.0") +local Evaluator = LibStub("StarLibEvaluator-1.0") +local LibCore = LibStub("LibScriptableLCDCore-1.0") +local LibLCDText = LibStub("LibScriptableLCDText-1.0") +local LibDriverQTip = LibStub("LibScriptableLCDDriverQTip-1.0") +local LibDriverCharacter = LibStub("LibScriptableLCDDriverCharacter-1.0") +local WidgetText = LibStub("LibScriptableWidgetText-1.0") +local WidgetBar = LibStub("LibScriptableWidgetBar-1.0") +local WidgetHistogram = LibStub("LibScriptableWidgetHistogram-1.0") +local WidgetKey = LibStub("LibScriptableWidgetKey-1.0") +local WidgetTimer = LibStub("LibScriptableWidgetTimer-1.0") +local LayoutOptions = LibStub("LibScriptableLCDLayoutOptions-1.0") +local Resources = LibStub("LibScriptablePluginResourceTools-1.0") local resources = {} Resources:New(resources) @@ -51,10 +51,13 @@ for i, v in ipairs(anchors) do end local function copy(tbl) - if type(tbl) ~= "table" then return tbl end local new = {} for k, v in pairs(tbl) do - new[k] = copy(v) + if type(v) == "table" then + new[k] = copy(v) + else + new[k] = v + end end return new end @@ -405,7 +408,7 @@ function mod:RebuildOpts() options.widgets.args.text.args[k:gsub(" ", "_")] = { name = k:gsub("widget_", ""), type = "group", - args = WidgetText:GetOptions(v, LCD4WoW.RebuildOpts, LCD4WOW), + args = WidgetText:GetOptions(LCD4WoW, v, k), order = 1 } options.widgets.args.text.args[k:gsub(" ", "_")].args.delete = { @@ -437,7 +440,7 @@ function mod:RebuildOpts() options.widgets.args.histogram.args[k:gsub(" ", "_")] = { name = k, type = "group", - args = WidgetHistogram:GetOptions(v, LCD4WoW.RebuildOpts, LCD4WoW), + args = WidgetHistogram:GetOptions(LCD4WoW, v, k), order = 1 } options.widgets.args.histogram.args[k:gsub(" ", "_")].args.delete = { @@ -469,7 +472,7 @@ function mod:RebuildOpts() options.widgets.args.key.args[k:gsub(" ", "_")] = { name = k, type = "group", - args = WidgetKey:GetOptions(v, LCD4WoW.RebuildOpts, LCD4WoW), + args = WidgetKey:GetOptions(LCD4WoW, v, k), order = 3 } options.widgets.args.key.args[k:gsub(" ", "_")].args.delete = { @@ -485,7 +488,7 @@ function mod:RebuildOpts() options.widgets.args.timers.args[k:gsub(" ", "_")] = { name = k, type = "group", - args = WidgetTimer:GetOptions(v, LCD4WoW.RebuildOpts, LCD4WoW), + args = WidgetTimer:GetOptions(LCD4WoW, v, k), order = 3 } options.widgets.args.timers.args[k:gsub(" ", "_")].args.delete = { @@ -602,4 +605,4 @@ function mod:MODIFIER_STATE_CHANGED(ev, modifier, up, ...) display:KeyEvent(modifier, up) end end -end \ No newline at end of file +end diff --git a/LCD4WoW.lua b/LCD4WoW.lua index 3ab5220..2e9f324 100644 --- a/LCD4WoW.lua +++ b/LCD4WoW.lua @@ -1,11 +1,11 @@ -LCD4WoW = StarTip or LibStub("AceAddon-3.0"):NewAddon("LCD4WoW: @project-version@", "AceConsole-3.0", "AceHook-3.0", "AceEvent-3.0", "AceComm-3.0", "AceSerializer-3.0") +LCD4WoW = StarTip or LibStub("AceAddon-3.0"):NewAddon("LCD4WoW: 1.1.15b", "AceConsole-3.0", "AceHook-3.0", "AceEvent-3.0", "AceComm-3.0", "AceSerializer-3.0") LCD4WoW.version = GetAddOnMetadata("LCD4WoW", "X-LCD4WoW-Version") or "" if StarTip then return end local LibDBIcon = LibStub("LibDBIcon-1.0") local LSM = _G.LibStub("LibSharedMedia-3.0") local LDB = LibStub:GetLibrary("LibDataBroker-1.1") local AceConfigDialog = LibStub("AceConfigDialog-3.0") -local LibError = LibStub("LibScriptableDisplayError-1.0") +local LibError = LibStub("LibScriptableUtilsError-1.0") local LibQTip = LibStub("LibQTip-1.0") local _G = _G diff --git a/LCD4WoW.toc b/LCD4WoW.toc index 4d46df8..31d46ee 100644 --- a/LCD4WoW.toc +++ b/LCD4WoW.toc @@ -1,10 +1,11 @@ -## Interface: 40000 +## Interface: 30300 +## X-Compatible-With: 40000 ## Title: LCD4WoW ## Notes: LCDs for WoW ## Author: Starlon ## Version: 1.0 -## X-LCD4WoW-Version: @project-version@ -## OptionalDeps: Ace3, LibTalentQuery-1.0, LibMobHealth-4.0, DBM-Core, BigWigs, LibScriptableDisplay-1.0, StarTip, ResourceServer +## X-LCD4WoW-Version: 1.1.15b +## OptionalDeps: Ace3, DBM-Core, BigWigs, StarTip, LibScriptable-1.0 ## SavedVariables: LCD4WoWDB Localization\enUS.lua diff --git a/config.lua b/config.lua index c1914a4..90d2228 100644 --- a/config.lua +++ b/config.lua @@ -51,48 +51,29 @@ LCD4WoW.config = { ["transition_speed"] = 50, ["widgets"] = {"widget_key_up", "widget_key_down", "widget_resources_timer"}, ["layouts"] = {"layout_lcd4wow", "layout_histogram_cpu", "layout_histogram_mem"}, - ["font"] = {normal="Interface\\AddOns\\LCD4WoW\\Fonts\\sfd\\FreeMonoBold.ttf", bold="Interface\\AddOns\\LCD4WoW\\Fonts\\ttf-bitstream-vera-1.10\\VeraMoBd.ttf", size=10}, - ["points"] = {{"CENTER", "UIParent", "CENTER", 0, 200}} + ["font"] = {normal="Interface\\AddOns\\LCD4WoW\\Fonts\\ttf-bitstream-vera-1.10\\VeraMo.ttf", bold="Interface\\AddOns\\LCD4WoW\\Fonts\\ttf-bitstream-vera-1.10\\VeraMoBd.ttf", size=12}, + ["point"] = {"CENTER", "UIParent", "CENTER", 0, 200} }, ["display_character"] = { ["addon"] = "LCD4WoW", ["enabled"] = true, ["driver"] = "character", - ["layers"] = 2, - ["background"] = "d9ccf16f", - ["pixel"] = 2, - ["row"] = -50, - ["col"] = 0, - ["rows"] = 6, - ["cols"] = 30, - ["update"] = 0, - ["timeout"] = 7000, - ["transition_speed"] = 50, - ["widgets"] = {"widget_key_up", "widget_key_down", "widget_resources_timer"}, - ["layouts"] = {"layout_lcd4wow", "layout_histogram_cpu", "layout_histogram_mem"}, - ["points"] = {{"CENTER", "UIParent", "CENTER"}}, - ["parent"] = "UIParent", - ["strata"] = 1 - }, - ["display_character_tiny"] = { - ["addon"] = "LCD4WoW", - ["enabled"] = true, - ["driver"] = "character", ["layers"] = 1, ["background"] = "d9ccf16f", - ["pixel"] = 2, - ["row"] = 0, + ["pixel"] = 3, + ["row"] = -50, ["col"] = 0, ["rows"] = 2, ["cols"] = 20, ["update"] = 0, - ["timeout"] = 0, + ["timeout"] = 7000, ["transition_speed"] = 50, + ["widgets"] = {"widget_key_up", "widget_key_down", "widget_resources_timer"}, ["layouts"] = {"layout_tiny"}, - ["points"] = {{"CENTER", "UIParent", "CENTER"}}, + ["point"] = {"CENTER"}, ["parent"] = "UIParent", ["strata"] = 1 - }, + }, ["display_icon"] = { ["addon"] = "LCD4WoW", ["enabled"] = false, @@ -105,7 +86,7 @@ LCD4WoW.config = { ["layouts"] = {"layout_icon"}, ["widgets"] = {}, ["font"] = {normal="Interface\\AddOns\\LCD4WoW\\Fonts\\ttf-bitstream-vera-1.10\\VeraMo.ttf", size=1}, - ["points"] = {{"TOPLEFT", "GameTooltip", "BOTTOMLEFT", 0, -100}}, + ["point"] = {"TOPLEFT", "GameTooltip", "BOTTOMLEFT", 0, -100}, ["parent"] = "GameTooltip" }, ["display_health"] = { @@ -118,7 +99,7 @@ LCD4WoW.config = { ["cols"] = 12, ["layouts"] = {"layout_health"}, ["widgets"] = {}, - ["points"] = {{"TOPLEFT", "GameTooltip", "BOTTOMLEFT", 0, -130}}, + ["point"] = {"TOPLEFT", "GameTooltip", "BOTTOMLEFT", 0, -130}, ["parent"] = "GameTooltip", ["strata"] = #stratas, }, @@ -132,14 +113,14 @@ LCD4WoW.config = { ["cols"] = 12, ["layouts"] = {"layout_mana"}, ["widgets"] = {}, - ["points"] = {{"TOPRIGHT", "GameTooltip", "BOTTOMRIGHT", 0, -130}}, + ["point"] = {"TOPRIGHT", "GameTooltip", "BOTTOMRIGHT", 0, -130}, ["parent"] = "GameTooltip", ["strata"] = #stratas }, ["widget_resources_timer"] = { type = "timer", update = 1000, - repeating = true, + repeating = false, expression = [[ if ResourceServer then self.timer:Stop(); return end Update() @@ -607,4 +588,4 @@ end ["expression"] = "'%'", ["type"] = "text" } -} \ No newline at end of file +} diff --git a/embeds.xml b/embeds.xml index e174c0d..e56271e 100644 --- a/embeds.xml +++ b/embeds.xml @@ -1,7 +1,7 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> -<Include file = "Libs\LibScriptableDisplay-1.0\LibScriptableDisplay-1.0.xml"/> +<Include file = "Libs\StarLibs-1.0\StarLibs-1.0.xml"/> <Include file = "Libs\AceAddon-3.0\AceAddon-3.0.xml"/> <Include file = "Libs\AceEvent-3.0\AceEvent-3.0.xml"/>