Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function RGB(r,g,b){ return (0xff000000|(r<<16)|(g<<8)|(b)); }
- var ww = 0;
- var wh = 0;
- var images = [
- gdi.Image("D:\\Users\\w²\\AppData\\Roaming\\foobar2000\\images\\0.png"),
- gdi.Image("D:\\Users\\w²\\AppData\\Roaming\\foobar2000\\images\\1.png"),
- gdi.Image("D:\\Users\\w²\\AppData\\Roaming\\foobar2000\\images\\2.png"),
- gdi.Image("D:\\Users\\w²\\AppData\\Roaming\\foobar2000\\images\\3.png"),
- gdi.Image("D:\\Users\\w²\\AppData\\Roaming\\foobar2000\\images\\4.png"),
- gdi.Image("D:\\Users\\w²\\AppData\\Roaming\\foobar2000\\images\\5.png"),
- gdi.Image("D:\\Users\\w²\\AppData\\Roaming\\foobar2000\\images\\6.png")
- ];
- var hover = false;
- function on_size()
- {
- ww = window.width;
- wh = window.height;
- on_playback_order_changed(fb.PlaybackOrder);
- }
- function on_paint(e)
- {
- e.DrawImage(images[fb.PlaybackOrder],0,0,ww,wh,0,0,ww,wh,0,hover?128:255);
- }
- function on_mouse_lbtn_up(x, y)
- {
- if (x > 0 && x < ww && y > 0 && y< wh) {
- fb.PlaybackOrder = (fb.PlaybackOrder+1) % 7;
- window.Repaint();
- }
- return true;
- }
- function on_mouse_rbtn_up(x, y) {
- if (x > 0 && x < ww && y > 0 && y< wh) {
- fb.PlaybackOrder = ((fb.PlaybackOrder-1) % 7 + 7) % 7;
- window.Repaint();
- }
- return true;
- }
- function on_mouse_move(x, y) {
- if (x > 0 && x < ww && y > 0 && y< wh) {
- hover = true;
- } else {
- hover = false;
- }
- window.Repaint();
- }
- function on_mouse_leave() { hover = false; window.Repaint(); }
- function on_playback_order_changed(new_order) { window.Repaint(); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement