-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathstyleManager.lua
More file actions
77 lines (72 loc) · 1.95 KB
/
styleManager.lua
File metadata and controls
77 lines (72 loc) · 1.95 KB
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
require 'images'
require 'fonts'
local emptyStyle = {}
local oliveStyle = {
outline = false,
cornerRadius = 0.2, -- percent
bgColor = {0, 0.4, 0, 0.5},
fgColor = {0, 0.3, 0},
disableFgColor = {0, 0, 0, 0.3},
font = robotoBold
}
local neonStyle = {
lineWidth = 2,
lineStyle = 'smooth',
cornerRadius = 0.5, -- percent
outline = true,
bgColor = {1, 0, 0.5},
fgColor = {1, 1, 1},
hoverBgColor = {1, 0.9, 0},
disableFgColor = {0.5, 0.5, 0.5},
font = neonClub,
sliderMark = sliderAndToggle,
toggleMark = sliderAndToggle,
}
local metalStyle = {
customLayers = {
bgButton = bgButton,
bgSlider = bgSlider,
bgSliderVertical = bgSliderVertical,
bgText = bgText,
bgProgressbar = bgProgressbar,
fgProgressbar = fgProgressbar,
bgMulti = bgMulti,
bgToggle = bgToggle,
fgSlider = fgSlider,
fgSliderOn = fgSliderOn,
fgSliderVertical = fgSliderVertical,
fgSliderVerticalOn = fgSliderVerticalOn,
fgToggle = fgToggle,
fgToggleOn = fgToggleOn,
},
progressBarGooColor = {0, 1, 0, 0.7},
cornerRadius = 0.2,
fgColor = {love.math.colorFromBytes(67, 78, 108)},
hoverFgColor = {0, 0.8, 0},
pressedFgColor = {0, 1, 0},
disableFgColor = {0.2 , 0.2, 0.2},
}
return {
handleStyleChanges = function (u, evt)
if evt.index == 1 then
u:setStyle(emptyStyle)
-- only this fonts has the Cyrillic alphabet:
u:getByTag('russian').style.font = proggySquare
end
if evt.index == 2 then
u:setStyle(oliveStyle)
end
if evt.index == 3 then
u:setStyle(neonStyle)
u:getByTag('russian').style.font = proggySquare
end
if evt.index == 4 then
u:setStyle(metalStyle)
-- change fgColor fot labels:
metalStyle.fgColor = {love.math.colorFromBytes(212, 222, 248)}
u:setStyle(metalStyle, u.utils.nodeTypes.LABEL)
metalStyle.fgColor = {love.math.colorFromBytes(67, 78, 108)}
u:getByTag('russian').style.font = proggySquare
end
end
}