Fixed an error while trying to move the window by clicking and holding on a window line
This commit is contained in:
@@ -12,7 +12,7 @@ local scrollWidth = 825
|
||||
local panel = Details:CreateWelcomePanel ("DetailsWindowOptionsBarTextEditor", nil, windowWidth, 600, true)
|
||||
panel:SetPoint("center", UIParent, "center")
|
||||
panel:Hide()
|
||||
panel:SetFrameStrata ("FULLSCREEN")
|
||||
panel:SetFrameStrata("FULLSCREEN")
|
||||
DF:ApplyStandardBackdrop (panel)
|
||||
DF:CreateTitleBar (panel, "Details! Custom Line Text Editor")
|
||||
|
||||
@@ -39,9 +39,9 @@ DF:ApplyStandardBackdrop (textentry)
|
||||
DF:SetFontSize (textentry.editbox, 14)
|
||||
DF:ReskinSlider(textentry.scroll)
|
||||
|
||||
local arg1_button = DF:NewButton (panel, nil, "$parentButton1", nil, 80, 20, function() textentry.editbox:Insert ("{data1}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "1"), 1)
|
||||
local arg2_button = DF:NewButton (panel, nil, "$parentButton2", nil, 80, 20, function() textentry.editbox:Insert ("{data2}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "2"), 1)
|
||||
local arg3_button = DF:NewButton (panel, nil, "$parentButton3", nil, 80, 20, function() textentry.editbox:Insert ("{data3}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "3"), 1)
|
||||
local arg1_button = DF:NewButton(panel, nil, "$parentButton1", nil, 80, 20, function() textentry.editbox:Insert ("{data1}") end, nil, nil, nil, string.format(Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "1"), 1)
|
||||
local arg2_button = DF:NewButton(panel, nil, "$parentButton2", nil, 80, 20, function() textentry.editbox:Insert ("{data2}") end, nil, nil, nil, string.format(Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "2"), 1)
|
||||
local arg3_button = DF:NewButton(panel, nil, "$parentButton3", nil, 80, 20, function() textentry.editbox:Insert ("{data3}") end, nil, nil, nil, string.format(Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "3"), 1)
|
||||
arg1_button:SetPoint("topright", panel, "topright", -12, y)
|
||||
arg2_button:SetPoint("topright", panel, "topright", -12, y - (20*1))
|
||||
arg3_button:SetPoint("topright", panel, "topright", -12, y - (20*2))
|
||||
@@ -162,7 +162,7 @@ local color_func = function(_, r, g, b, a)
|
||||
ColorSelection ( textentry.editbox, "|c" .. hex)
|
||||
end
|
||||
|
||||
local func_button = DF:NewButton (panel, nil, "$parentButton4", nil, 80, 20, function() textentry.editbox:Insert ("{func local player, combat = ...; return 0;}") end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_FUNC"], 1)
|
||||
local func_button = DF:NewButton(panel, nil, "$parentButton4", nil, 80, 20, function() textentry.editbox:Insert ("{func local player, combat = ...; return 0;}") end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_FUNC"], 1)
|
||||
local color_button = DF:NewColorPickButton (panel, "$parentButton5", nil, color_func)
|
||||
color_button:SetSize(80, 20)
|
||||
color_button:SetTemplate (buttonTemplate)
|
||||
@@ -178,21 +178,21 @@ local done = function()
|
||||
panel:Hide()
|
||||
end
|
||||
|
||||
local apply_button = DF:NewButton (panel, nil, "$parentApply", nil, 80, 20, function() panel.callback(panel.editbox:GetText()) end, nil, nil, nil, "Apply", 1) --localize-me
|
||||
local apply_button = DF:NewButton(panel, nil, "$parentApply", nil, 80, 20, function() panel.callback(panel.editbox:GetText()) end, nil, nil, nil, "Apply", 1) --localize-me
|
||||
apply_button:SetTemplate (buttonTemplate)
|
||||
apply_button:SetPoint("topright", panel, "topright", -14, -128)
|
||||
|
||||
local ok_button = DF:NewButton (panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1)
|
||||
local ok_button = DF:NewButton(panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1)
|
||||
ok_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DONE_TOOLTIP"]
|
||||
ok_button:SetTemplate (buttonTemplate)
|
||||
ok_button:SetPoint("topright", panel, "topright", -14, -194)
|
||||
|
||||
local reset_button = DF:NewButton (panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText(panel.default); panel.callback(panel.editbox:GetText()) end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_RESET"], 1)
|
||||
local reset_button = DF:NewButton(panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText(panel.default); panel.callback(panel.editbox:GetText()) end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_RESET"], 1)
|
||||
reset_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_RESET_TOOLTIP"]
|
||||
reset_button:SetTemplate (buttonTemplate)
|
||||
reset_button:SetPoint("topright", panel, "topright", -14, -150)
|
||||
|
||||
local cancel_button = DF:NewButton (panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
|
||||
local cancel_button = DF:NewButton(panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1)
|
||||
cancel_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL_TOOLTIP"]
|
||||
cancel_button:SetTemplate (buttonTemplate)
|
||||
cancel_button:SetPoint("topright", panel, "topright", -14, -172)
|
||||
Reference in New Issue
Block a user