- Small visual improvement on tooltips.

- Fixed an issue when closing solo plugins with the red X button.
This commit is contained in:
Tercioo
2016-01-02 13:27:59 -02:00
parent e13a415d26
commit 05d9b10399
27 changed files with 238 additions and 154 deletions
+12 -12
View File
@@ -18,8 +18,6 @@ local cleanfunction = function() end
local PanelMetaFunctions = {}
local APIFrameFunctions
local simple_panel_counter = 1
------------------------------------------------------------------------------------------------------------
--> metatables
@@ -1456,7 +1454,6 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local simple_panel_counter = 1
local simple_panel_mouse_down = function (self, button)
if (button == "RightButton") then
if (self.IsMoving) then
@@ -1501,8 +1498,8 @@ local no_options = {}
function DF:CreateSimplePanel (parent, w, h, title, name, panel_options)
if (not name) then
name = "DetailsFrameworkSimplePanel" .. simple_panel_counter
simple_panel_counter = simple_panel_counter + 1
name = "DetailsFrameworkSimplePanel" .. DF.SimplePanelCounter
DF.SimplePanelCounter = DF.SimplePanelCounter + 1
end
if (not parent) then
parent = UIParent
@@ -1560,8 +1557,6 @@ function DF:CreateSimplePanel (parent, w, h, title, name, panel_options)
f.SetTitle = simple_panel_settitle
simple_panel_counter = simple_panel_counter + 1
return f
end
@@ -1836,17 +1831,21 @@ function DF:ShowTextPromptPanel (message, callback)
prompt:SetPoint ("top", f, "top", 0, -15)
prompt:SetJustifyH ("center")
f.prompt = prompt
local button_true = DF:CreateButton (f, nil, 60, 20, "Okey")
local button_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local button_true = DF:CreateButton (f, nil, 60, 20, "Okey", nil, nil, nil, nil, nil, nil, options_dropdown_template, button_text_template)
button_true:SetPoint ("bottomleft", f, "bottomleft", 10, 5)
f.button_true = button_true
local button_false = DF:CreateButton (f, function() f.textbox:ClearFocus(); f:Hide() end, 60, 20, "Cancel")
local button_false = DF:CreateButton (f, function() f.textbox:ClearFocus(); f:Hide() end, 60, 20, "Cancel", nil, nil, nil, nil, nil, nil, options_dropdown_template, button_text_template)
button_false:SetPoint ("bottomright", f, "bottomright", -10, 5)
f.button_false = button_false
local textbox = DF:CreateTextEntry (f, function()end, 380, 20, "textbox", nil, nil, nil, nil)
local textbox = DF:CreateTextEntry (f, function()end, 380, 20, "textbox", nil, nil, options_dropdown_template)
textbox:SetPoint ("topleft", f, "topleft", 10, -45)
f.EntryBox = textbox
button_true:SetClickFunction (function()
local my_func = button_true.true_function
@@ -1866,9 +1865,10 @@ function DF:ShowTextPromptPanel (message, callback)
DF.text_prompt_panel:Show()
DetailsFrameworkPrompt.EntryBox:SetText ("")
DF.text_prompt_panel.prompt:SetText (message)
DF.text_prompt_panel.button_true.true_function = callback
DF.text_prompt_panel.textbox:SetText ("")
DF.text_prompt_panel.textbox:SetFocus (true)
end