Skip to content

Commit c690b9e

Browse files
committed
Add more tests
1 parent 9252c2e commit c690b9e

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/color.ts

+7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ function colorTest(script_state: string) {
1717
Purple.get();
1818
Purple.set(0, 0, 0);
1919
Purple.setAt('r', 0);
20+
Purple.setAt(1, 0);
21+
Purple.setAt('g', 0);
22+
Purple.setAt(2, 0);
23+
Purple.setAt('b', 0);
24+
Purple.setAt(3, 0);
25+
Purple.setAt('a', 0);
26+
Purple.setAt(4, 0);
2027

2128
let col:Color = Purple.lerp(Color.new(0, 0, 0, 255), 0.5);
2229

test/objects.ts

+19
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,22 @@ function objectTest(script_state: string) {
66

77
obj2.UI.getXml();
88
}
9+
10+
function buttonFunction(obj: GObject, player_clicker_color: ColorLiteral, alt_click: boolean) {
11+
12+
}
13+
14+
function objectButtonTest(script_state: string) {
15+
let obj = getAllObjects()[0];
16+
obj.createButton({
17+
label: 'Stand',
18+
// TODO
19+
click_function: buttonFunction,
20+
function_owner: undefined,
21+
position: Vector(-1, 0.25, 0),
22+
rotation: Vector(0, 0, 0),
23+
width: 400,
24+
height: 350,
25+
font_size: 130
26+
})
27+
}

0 commit comments

Comments
 (0)