forked from Tercioo/Details-Damage-Meter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
window_custom_scripts.lua
84 lines (59 loc) · 2.82 KB
/
window_custom_scripts.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
local Details = _G.Details
local DF = _G.DetailsFramework
local _
--local AceComm = LibStub("AceComm-3.0")
--local AceSerializer = LibStub("AceSerializer-3.0")
local Loc = LibStub("AceLocale-3.0"):GetLocale("Details")
local CONST_MENU_X_POSITION = 10
local CONST_MENU_Y_POSITION = -40
local CONST_MENU_WIDTH = 160
local CONST_MENU_HEIGHT = 20
local CONST_INFOBOX_X_POSITION = 220
local CONST_EDITBUTTONS_X_POSITION = 560
local CONST_EDITBOX_Y_POSITION = -200
local CONST_EDITBOX_WIDTH = 900
local CONST_EDITBOX_HEIGHT = 370
local CONST_EDITBOX_BUTTON_WIDTH = 80
local CONST_EDITBOX_BUTTON_HEIGHT = 20
local CONST_BUTTON_TEMPLATE = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
local CONST_TEXTENTRY_TEMPLATE = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
DF:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS",
{
icon = {texture = [[Interface\BUTTONS\UI-GuildButton-PublicNote-Up]]},
width = 160,
},
"DETAILS_PLUGIN_BUTTON_TEMPLATE"
)
DF:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_REGULAR_BUTTON",
{
width = 130,
},
"DETAILS_PLUGIN_BUTTON_TEMPLATE"
)
DF:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX", {
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdropcolor = {.2, .2, .2, 0.6},
backdropbordercolor = {0, 0, 0, 1},
})
DF:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED", {
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdropcolor = {.2, .2, .2, 1},
backdropbordercolor = {0, 0, 0, 1},
})
DF:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON", {
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdropcolor = {.2, .2, .2, 1},
backdropbordercolor = {0, 0, 0, 1},
})
DF:NewColor("DETAILS_CUSTOMDISPLAY_ICON", .7, .6, .5, 1)
local CONST_CODETEXTENTRY_TEMPLATE = DF:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX")
local CONST_CODETEXTENTRYEXPANDED_TEMPLATE = DF:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED")
local CONST_CODETEXTENTRYBUTTON_TEMPLATE = DF:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON")
local CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE = DF:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS")
local CONST_REGULAR_BUTTON_TEMPLATE = DF:GetTemplate("button", "DETAILS_CUSTOMDISPLAY_REGULAR_BUTTON")
--new script button
--search script box
--control buttons like import, export, delete, restore
--build the left menu, this menu has all scripts to edit
--build the script properties panel with name, icon, etc
--