-
Notifications
You must be signed in to change notification settings - Fork 0
/
9key.skin.lua
145 lines (131 loc) · 4.21 KB
/
9key.skin.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
local NoteSkinVsrg = require("sphere.models.NoteSkinModel.NoteSkinVsrg")
local BasePlayfield = require("sphere.models.NoteSkinModel.BasePlayfield")
local JustConfig = require("sphere.JustConfig")
local root = (...):match("(.+)/.-")
local config = JustConfig:fromFile(root .. "/configs/9key.config.lua")
local sphereElements = require(root .. "/Modules/SphereElements")
local noteskin = NoteSkinVsrg({
path = ...,
name = "Kori's Pick",
inputMode = "9key",
range = {-1, 1},
unit = 1080,
config = config,
hitposition = 1059,
})
local playfield = BasePlayfield(noteskin)
noteskin:setInput({"key1","key2","key3","key4","key5","key6","key7","key8","key9"})
noteskin:setColumns({
offset = 0,
align = "center",
width = {114, 114, 114, 114, 114, 114, 114, 114, 114},
space = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
})
noteskin:setTextures({
{pixel = "pixel.png"},
{nwhite = "note/NOTwhite.png"},
{nblue = "note/NOTblue.png"},
{nyellow = "note/NOTyellow.png"},
{ngreen = "note/NOTgreen.png"},
{nred = "note/NOTred.png"},
{bwhite = "note/LNBwhite.png"},
{bblue = "note/LNBblue.png"},
{byellow = "note/LNByellow.png"},
{bgreen = "note/LNBgreen.png"},
{bred = "note/LNBred.png"},
})
noteskin:setImagesAuto()
local imlazy = config:get("pms") == true
noteskin:setShortNote({h = 97,
image = {
imlazy and "nwhite" or "ngreen",
imlazy and "nyellow" or "nwhite",
imlazy and "ngreen" or "nblue",
imlazy and "nblue" or "nwhite",
imlazy and "nred" or "nyellow",
imlazy and "nblue" or "nwhite",
imlazy and "ngreen" or "nblue",
imlazy and "nyellow" or "nwhite",
imlazy and "nwhite" or "ngreen",
},
})
noteskin:setLongNote({h = 97,
head = {
imlazy and "nwhite" or "ngreen",
imlazy and "nyellow" or "nwhite",
imlazy and "ngreen" or "nblue",
imlazy and "nblue" or "nwhite",
imlazy and "nred" or "nyellow",
imlazy and "nblue" or "nwhite",
imlazy and "ngreen" or "nblue",
imlazy and "nyellow" or "nwhite",
imlazy and "nwhite" or "ngreen",
},
body = {
imlazy and "bwhite" or "bgreen",
imlazy and "byellow" or "bwhite",
imlazy and "bgreen" or "bblue",
imlazy and "bblue" or "bwhite",
imlazy and "bred" or "byellow",
imlazy and "bblue" or "bwhite",
imlazy and "bgreen" or "bblue",
imlazy and "byellow" or "bwhite",
imlazy and "bwhite" or "bgreen",
},
tail = {
imlazy and "nwhite" or "ngreen",
imlazy and "nyellow" or "nwhite",
imlazy and "ngreen" or "nblue",
imlazy and "nblue" or "nwhite",
imlazy and "nred" or "nyellow",
imlazy and "nblue" or "nwhite",
imlazy and "ngreen" or "nblue",
imlazy and "nyellow" or "nwhite",
imlazy and "nwhite" or "ngreen",
},
})
if config:get("barline") == true then
noteskin:addMeasureLine({h = 2,
color = {1, 1, 1, 0.2},
image = "pixel",
})
end
noteskin:addBga({x = 0, y = 0, w = 1, h = 1,
color = {0.25, 0.25, 0.25, 1},
})
playfield:addBga({
transform = {{1 / 2, -16 / 9 / 2}, {0, -7 / 9 / 2}, 0, {0, 16 / 9}, {0, 16 / 9}, 0, 0, 0, 0},
})
playfield:addColumnsBackground({
color = {0, 0, 0, 1},
})
playfield:enableCamera()
playfield:addKeyImages({h = 115,
padding = 0,
pressed = {
config:get("receptorlight") and "key/scale4lit.png" or "key/scale4.png",
config:get("receptorlight") and "key/scale4lit.png" or "key/scale4.png",
config:get("receptorlight") and "key/scale4lit.png" or "key/scale4.png",
config:get("receptorlight") and "key/scale4lit.png" or "key/scale4.png",
config:get("receptorlight") and "key/scale4lit.png" or "key/scale4.png",
config:get("receptorlight") and "key/scale4lit.png" or "key/scale4.png",
config:get("receptorlight") and "key/scale4lit.png" or "key/scale4.png",
config:get("receptorlight") and "key/scale4lit.png" or "key/scale4.png",
config:get("receptorlight") and "key/scale4lit.png" or "key/scale4.png",
},
released = {
"key/scale4.png",
"key/scale4.png",
"key/scale4.png",
"key/scale4.png",
"key/scale4.png",
"key/scale4.png",
"key/scale4.png",
"key/scale4.png",
"key/scale4.png",
},
})
playfield:addNotes()
playfield:disableCamera()
sphereElements.theThing(noteskin, playfield, noteskin.inputMode, noteskin.columnsCount)
return noteskin