-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProgressBar.scratch
101 lines (99 loc) · 2.45 KB
/
ProgressBar.scratch
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
//----- Broadcast received events -------------------------------------------------------------------------------------
WhenBroadcastReceived(evaluationvaluechanged)
{
If (1 == 1)
{
If (1 == 1)
{
Motion.GoToXY(116, -165);
Pen.SetPenColorToColor(#000000);
Pen.SetPenSizeTo(12);
Pen.Down();
Motion.ChangeYBy(330);
Pen.Clear();
}
Motion.GoToXY(116, -165);
Pen.SetPenColorToColor(#731313);
Pen.SetPenSizeTo(10);
Pen.Down();
Motion.ChangeYBy(330);
Pen.Clear();
}
If (Not ((EvaluationValue == 0)))
{
Pen.SetPenSizeTo(10);
If (EvaluationValue > 0)
{
Motion.GoToXY(116, 5);
If (IsPlayerBlack == 0)
{
Pen.SetPenColorToColor(#828282);
}
Else
{
Pen.SetPenColorToColor(#000000);
}
}
Else
{
Motion.GoToXY(116, -5);
If (IsPlayerBlack == 0)
{
Pen.SetPenColorToColor(#000000);
}
Else
{
Pen.SetPenColorToColor(#828282);
}
}
Pen.Down();
Motion.ChangeYBy((EvaluationValue * (160 / 100)));
Pen.Clear();
Pen.SetPenSizeTo(8);
If (EvaluationValue > 0)
{
Motion.GoToXY(116, 5);
If (IsPlayerBlack == 0)
{
Pen.SetPenColorToColor(#000000);
}
Else
{
Pen.SetPenColorToColor(#f3f3f3);
}
}
Else
{
Motion.GoToXY(116, -5);
If (IsPlayerBlack == 0)
{
Pen.SetPenColorToColor(#f3f3f3);
}
Else
{
Pen.SetPenColorToColor(#000000);
}
}
Pen.Down();
Motion.ChangeYBy((EvaluationValue * (160 / 100)));
Pen.Clear();
}
}
WhenBroadcastReceived(progressvaluechanged)
{
Motion.GoToXY(135, -160);
Pen.SetPenColorToColor(#f5d5ae);
Pen.SetPenSizeTo(20);
Pen.Down();
Motion.ChangeXBy(90);
Pen.Clear();
If (ProgressValue > 0)
{
Motion.GoToXY(135, -160);
Pen.SetPenColorToColor(#731313);
Pen.SetPenSizeTo(15);
Pen.Down();
Motion.ChangeXBy((ProgressValue * (90 / 100)));
Pen.Clear();
}
}