Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==PREPROCESSOR==
- // @import "%fb2k_path%scripts\marc2003\v2\common.js"
- // @import "%fb2k_path%scripts\marc2003\v2\tooltip_buttons.js"
- // ==/PREPROCESSOR==
- var bw = 32;
- var bh = 32;
- var top_margin = 0;
- var left_margin = 0;
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- var panel_id = window.GetProperty("panel_id", window.id);
- var custom_background_file = settings_path + panel_id + "buttons_background";
- var custom_background = read(custom_background_file);
- on_item_focus_change();
- function on_size() {
- ww = window.Width;
- wh = window.Height;
- }
- function on_metadb_changed() {
- if(!g_metadb) return;
- title = fb.TitleFormat("%title%").EvalWithMetadb(g_metadb)
- loved = fb.TitleFormat("%love%").EvalWithMetadb(g_metadb) == 1 ? 1 : 0;
- if(loved) {
- func = function() { fb.RunContextCommandWithMetadb("Unlove", g_metadb); }
- tooltip = "Unlove '" + title + "'";
- normal = images_path + "love_h.png";
- hover = images_path + "love.png";
- } else {
- func = function() { fb.RunContextCommandWithMetadb("Love", g_metadb); }
- tooltip = "Love '" + title + "'";
- normal = images_path + "love.png";
- hover = images_path + "love_h.png";
- }
- Buttons = {
- but1: new Button(left_margin,top_margin,bw,bh, {normal: normal, hover: hover}, func, tooltip)
- }
- window.Repaint();
- }
- function on_playback_new_track() {
- on_item_focus_change();
- }
- function on_mouse_rbtn_up(x, y) {
- buttons_menu(x,y);
- return true;
- }
- function on_paint(gr) {
- buttons_background(gr);
- buttonsDraw(gr);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement