Skip to content

Commit

Permalink
Vacation ended :(
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Jan 13, 2025
1 parent fe84c5f commit a5e45c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 215 deletions.
1 change: 1 addition & 0 deletions Libs/DF/timeline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
214 changes: 1 addition & 213 deletions frames/window_transcriptor.lua
Original file line number Diff line number Diff line change
@@ -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
local _

0 comments on commit a5e45c9

Please sign in to comment.