Scalebar fix (framework)
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local dversion = 289
|
||||
local dversion = 290
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
|
||||
+21
-10
@@ -1982,7 +1982,7 @@ local SimplePanel_frame_backdrop_border_color = {0, 0, 0, 1}
|
||||
|
||||
--with_label was making the frame stay in place while its parent moves
|
||||
--the slider was anchoring to with_label and here here were anchoring the slider again
|
||||
function DF:CreateScaleBar(frame, config)
|
||||
function DF:CreateScaleBar(frame, config) --~scale
|
||||
local scaleBar, text = DF:CreateSlider(frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"), DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
|
||||
scaleBar.thumb:SetWidth(24)
|
||||
scaleBar:SetValueStep(0.1)
|
||||
@@ -2056,6 +2056,14 @@ function DF:CreateScaleBar(frame, config)
|
||||
editbox.defaultValue = config.scale
|
||||
editbox:SetFocus(false)
|
||||
editbox:SetAutoFocus(false)
|
||||
editbox:ClearFocus()
|
||||
|
||||
C_Timer.After(1, function()
|
||||
editbox:SetFocus(false)
|
||||
editbox:SetAutoFocus(false)
|
||||
editbox:ClearFocus()
|
||||
end)
|
||||
|
||||
return scaleBar
|
||||
end
|
||||
|
||||
@@ -3975,7 +3983,7 @@ local tab_container_on_show = function (self)
|
||||
self.SelectIndex (self.AllButtons[index], nil, index)
|
||||
end
|
||||
|
||||
function DF:CreateTabContainer (parent, title, frame_name, frame_list, options_table)
|
||||
function DF:CreateTabContainer (parent, title, frame_name, frameList, options_table)
|
||||
|
||||
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
|
||||
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
|
||||
@@ -3984,13 +3992,13 @@ function DF:CreateTabContainer (parent, title, frame_name, frame_list, options_t
|
||||
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
|
||||
|
||||
options_table = options_table or {}
|
||||
local frame_width = parent:GetWidth()
|
||||
local frameWidth = parent:GetWidth()
|
||||
local frame_height = parent:GetHeight()
|
||||
local y_offset = options_table.y_offset or 0
|
||||
local button_width = options_table.button_width or 160
|
||||
local button_height = options_table.button_height or 20
|
||||
local button_anchor_x = options_table.button_x or 230
|
||||
local button_anchor_y = options_table.button_y or -32
|
||||
local buttonAnchorX = options_table.button_x or 230
|
||||
local buttonAnchorY = options_table.button_y or -32
|
||||
local button_text_size = options_table.button_text_size or 10
|
||||
|
||||
local mainFrame = CreateFrame ("frame", frame_name, parent.widget or parent, "BackdropTemplate")
|
||||
@@ -4015,7 +4023,7 @@ function DF:CreateTabContainer (parent, title, frame_name, frame_list, options_t
|
||||
mainFrame.CanCloseWithRightClick = true
|
||||
end
|
||||
|
||||
for i, frame in ipairs (frame_list) do
|
||||
for i, frame in ipairs (frameList) do
|
||||
local f = CreateFrame ("frame", "$parent" .. frame.name, mainFrame, "BackdropTemplate")
|
||||
f:SetAllPoints()
|
||||
f:SetFrameLevel (210)
|
||||
@@ -4059,10 +4067,13 @@ function DF:CreateTabContainer (parent, title, frame_name, frame_list, options_t
|
||||
end
|
||||
|
||||
--order buttons
|
||||
local x = button_anchor_x
|
||||
local y = button_anchor_y
|
||||
local space_for_buttons = frame_width - (#frame_list*3) - button_anchor_x
|
||||
local x = buttonAnchorX
|
||||
local y = buttonAnchorY
|
||||
local spaceBetweenButtons = 3
|
||||
|
||||
local space_for_buttons = frameWidth - (#frameList * spaceBetweenButtons) - buttonAnchorX
|
||||
local amount_buttons_per_row = floor (space_for_buttons / button_width)
|
||||
|
||||
local last_button = mainFrame.AllButtons[1]
|
||||
|
||||
mainFrame.AllButtons[1]:SetPoint ("topleft", mainTitle, "topleft", x, y)
|
||||
@@ -4074,7 +4085,7 @@ function DF:CreateTabContainer (parent, title, frame_name, frame_list, options_t
|
||||
x = x + button_width + 2
|
||||
|
||||
if (i % amount_buttons_per_row == 0) then
|
||||
x = button_anchor_x
|
||||
x = buttonAnchorX
|
||||
y = y - button_height - 1
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
local version, build, date, tocversion = GetBuildInfo()
|
||||
|
||||
_detalhes.build_counter = 9699
|
||||
_detalhes.alpha_build_counter = 9699 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.build_counter = 9700
|
||||
_detalhes.alpha_build_counter = 9700 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.bcc_counter = 31
|
||||
_detalhes.dont_open_news = true
|
||||
_detalhes.game_version = version
|
||||
|
||||
Reference in New Issue
Block a user