From a5e45c992462437369e22db4c91b2379d2265a38 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 13 Jan 2025 14:12:44 -0300 Subject: [PATCH] Vacation ended :( --- Libs/DF/timeline.lua | 1 + boot.lua | 4 +- frames/window_transcriptor.lua | 214 +-------------------------------- 3 files changed, 4 insertions(+), 215 deletions(-) diff --git a/Libs/DF/timeline.lua b/Libs/DF/timeline.lua index 0037d75ee..0175bc4f2 100644 --- a/Libs/DF/timeline.lua +++ b/Libs/DF/timeline.lua @@ -1013,6 +1013,7 @@ detailsFramework.TimeLineMixin = { RefreshTimeLine = function(self, bDelayButtonRefresh, bFromScale) --~refresh if (not self.data.lines) then + error("Timeline data for SetData() has no line data.") return end diff --git a/boot.lua b/boot.lua index 5ee3e0e2a..72ccea926 100644 --- a/boot.lua +++ b/boot.lua @@ -17,8 +17,8 @@ end local addonName, Details222 = ... local version, build, date, tvs = GetBuildInfo() - Details.build_counter = 13317 - Details.alpha_build_counter = 13317 --if this is higher than the regular counter, use it instead + Details.build_counter = 13319 + Details.alpha_build_counter = 13319 --if this is higher than the regular counter, use it instead Details.dont_open_news = true Details.game_version = version Details.userversion = version .. " " .. Details.build_counter diff --git a/frames/window_transcriptor.lua b/frames/window_transcriptor.lua index eeab4a35d..f04e2ca7e 100644 --- a/frames/window_transcriptor.lua +++ b/frames/window_transcriptor.lua @@ -1,214 +1,2 @@ -local Details = _G.Details ----@type detailsframework -local detailsFramework = _G.DetailsFramework -local _, Details222 = ... -_ = nil - ----@class transcriptor : table ----@field timeline df_timeline - ----@class simplepanel ----@field RightResizerGrip button - ----@class timeline : df_timeline ----@field OnMainFrameSizeChanged fun(self:timeline) - -local transcriptor = {} - -function Details222.CreateTranscriptorFrame() - local defaultWidth = 1220 - local defaultHeight = 620 - local headerWidth = 150 - local windowTitle = "Details! Transcriptor" - - if (not Details.transcriptor_frame.width) then - Details.transcriptor_frame.width = defaultWidth - Details.transcriptor_frame.height = defaultHeight - else - defaultWidth = Details.transcriptor_frame.width - defaultHeight = Details.transcriptor_frame.height - end - - local transcriptorFrame = detailsFramework:CreateSimplePanel(UIParent, defaultWidth, defaultHeight, windowTitle, "DetailsTranscriptorFame", {UseScaleBar = false, NoScripts = true}) - - detailsFramework:MakeDraggable(transcriptorFrame) - detailsFramework:ApplyStandardBackdrop(transcriptorFrame) - transcriptorFrame:SetPoint("center", UIParent, "center", 0, -150) - transcriptorFrame:SetFrameStrata("HIGH") - transcriptorFrame:SetToplevel(true) - - local LibWindow = LibStub("LibWindow-1.1") - LibWindow.RegisterConfig(transcriptorFrame, Details.transcriptor_frame) - LibWindow.MakeDraggable(transcriptorFrame) - LibWindow.RestorePosition(transcriptorFrame) - - local leftGrip, rightGrip = detailsFramework:CreateResizeGrips(transcriptorFrame, {width = 20, height = 20}) - leftGrip:Hide() - transcriptorFrame.RightResizerGrip = rightGrip - - transcriptorFrame:SetResizable(true) - transcriptorFrame:SetScript("OnSizeChanged", function() - local timeline = transcriptor.timeline - timeline.OnMainFrameSizeChanged(timeline) - Details.transcriptor_frame.width = transcriptorFrame:GetWidth() - Details.transcriptor_frame.height = transcriptorFrame:GetHeight() - end) - - --> timeline - ---@type df_elapsedtime_options - ---@diagnostic disable-next-line: missing-fields - local elapsedTimeOptions = { - draw_line_color = {1, 1, 1, 0.1}, - } - - local onCreateLine = function(line) - - end - - local onRefreshLine = function(line) - - end - - local onEnterLine = function(line) - - end - - local onLeaveLine = function(line) - - end - - local onCreateBlock = function(block) - - end - - local onEnterBlock = function(block) - - end - - local onLeaveBlock = function(block) - - end - - local onClickBlock = function(block, mouseButton) - - end - - local onCreateBlockLengthFrame = function(blockLengthFrame) - - end - - local onEnterBlockLengthFrame = function(blockLengthFrame) - - end - - local onLeaveBlockLengthFrame = function(blockLengthFrame) - - end - - local onClickBlockLengthFrame = function(blockLengthFrame, mouseButton) - - end - - local timelineOptions = { - width = transcriptorFrame:GetWidth() - 24 - headerWidth, - height = transcriptorFrame:GetHeight() - 124, - auto_height = false, - can_resize = false, - line_height = 20, - line_padding = 1, - zoom_out_zero = true, - show_elapsed_timeline = true, - elapsed_timeline_height = 20, - header_width = 150, - header_detached = true, - backdrop_color = {0, 0, 0, 0.2}, - backdrop_color_highlight = {1, 1, 1, .5}, - - header_on_enter = function(lineHeader) - print("mouse entered header") - end, - - header_on_leave = function(lineHeader) - print("mouse left header") - end, - - on_create_line = function(line) - onCreateLine(line) - end, - - on_refresh_line = function(line) - onRefreshLine(line) - end, - - on_enter = function(line) --on enter line - onEnterLine(line) - end, - - on_leave = function(line) --on leave line - onLeaveLine(line) - end, - - block_on_create = function(self) - onCreateBlock(self) - end, - - --on entering a spell icon - block_on_enter = function(self) - onEnterBlock(self) - end, - - block_on_leave = function(self) - onLeaveBlock(self) - end, - - block_on_click = function(blockClicked, mouseButton) - onClickBlock(blockClicked, mouseButton) - end, - - block_on_create_blocklength = function(blockLengthFrame) - onCreateBlockLengthFrame(blockLengthFrame) - end, - - block_on_enter_blocklength = function(blockLengthFrame) - onEnterBlockLengthFrame(blockLengthFrame) - end, - - block_on_leave_blocklength = function(blockLengthFrame) - onLeaveBlockLengthFrame(blockLengthFrame) - end, - - block_on_click_blocklength = function(blockLengthFrame, mouseButton) - onClickBlockLengthFrame(blockLengthFrame, mouseButton) - end, - - scale_min = 0.1, --number - - --block_on_set_data = function(blockFrame, blockData) - --end, - - --pixels_per_second number - --scale_max number - --backdrop backdrop - --backdrop_color number[] - --backdrop_color_highlight number[] - --backdrop_border_color number[] - --slider_backdrop backdrop - --slider_backdrop_color number[] - --slider_backdrop_border_color number[] - --title_template string "ORANGE_FONT_TEMPLATE" - --text_tempate string "OPTIONS_FONT_TEMPLATE" - } - - ---@type timeline - local timelineFrame, timelineHeader = detailsFramework:CreateTimeLineFrame(transcriptorFrame, "$parentTimeLineH", timelineOptions, elapsedTimeOptions) - timelineFrame:SetPoint("topleft", transcriptorFrame, "topleft", headerWidth + 2, -56) - transcriptor.timeline = timelineFrame - - function timelineFrame.OnMainFrameSizeChanged(self) - local width, height = transcriptorFrame:GetSize() - self:SetSize(width - headerWidth - 22, height - 124) - self:OnSizeChanged() - end - -end \ No newline at end of file +local _ \ No newline at end of file