forked from phts/js_marc2003
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathseekbar.txt
46 lines (37 loc) · 1.04 KB
/
seekbar.txt
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
// ==PREPROCESSOR==
// @name "Seekbar"
// @author "marc2003"
// @import "%fb2k_profile_path%js_marc2003\js\lodash.min.js"
// @import "%fb2k_profile_path%js_marc2003\js\helpers.js"
// @import "%fb2k_profile_path%js_marc2003\js\seekbar.js"
// ==/PREPROCESSOR==
var seekbar = new _.seekbar(0, 0, 0, 0);
seekbar.c1 = _.RGB(50, 50, 50);
seekbar.c2 = _.RGB(196, 30, 35);
function on_size() {
seekbar.w = window.Width;
seekbar.h = window.Height;
}
function on_paint(gr) {
gr.FillSolidRect(seekbar.x, seekbar.y, seekbar.w, seekbar.h, seekbar.c1);
if (fb.IsPlaying && fb.PlaybackLength > 0)
gr.FillSolidRect(seekbar.x, seekbar.y, seekbar.pos(), seekbar.h, seekbar.c2);
}
function on_playback_seek() {
seekbar.playback_seek();
}
function on_playback_stop() {
seekbar.playback_stop();
}
function on_mouse_wheel(s) {
seekbar.wheel(s);
}
function on_mouse_move(x, y) {
seekbar.move(x, y);
}
function on_mouse_lbtn_down(x, y) {
seekbar.lbtn_down(x, y);
}
function on_mouse_lbtn_up(x, y) {
seekbar.lbtn_up(x, y);
}