Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: JScript Panel (Read 303692 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: JScript Panel

Reply #1600
The last value (0.1) on this line can be increased...

https://github.com/jscript-panel/component/blob/c51306cd0807db52bbe79133aa22c89b65e570c4/samples/jsplaylist/main.js#L973

edit: the most sensible thing to do is copy the whole function in to the main configuration window.

Code: [Select]
function DrawWallpaper(gr) {
if (images.wallpaper.Width / images.wallpaper.Height < ww / wh) {
var src_x = 0;
var src_w = images.wallpaper.Width;
var src_h = Math.round(wh * images.wallpaper.Width / ww);
var src_y = Math.round((images.wallpaper.Height - src_h) / 2);
} else {
var src_y = 0;
var src_w = Math.round(ww * images.wallpaper.Height / wh);
var src_h = images.wallpaper.Height;
var src_x = Math.round((images.wallpaper.Width - src_w) / 2);
}
gr.DrawImage(images.wallpaper, 0, p.list.y, ww, p.list.h, src_x, src_y, src_w, src_h, 0.1);
}

Copying/modifying it there means it will survive future component upgrades.

Works almost perfectly! Any way to change the opacity of the custom colors of JSPlaylist?

I don't mind this:



But I prefer the color to be semi-transparent.

Re: JScript Panel

Reply #1601
Hello Mark
Thank you for implementing multiple selection of albums in Smooth Browser in Library mode, I hope you can get it in Play List mode as well. I know it takes a lot of work to do it, and I am very grateful to you for listening to our requests. You have managed to make a great component with many possibilities for fb2 users.
Great work Mark


Re: JScript Panel

Reply #1603
It was a deliberate choice not implementing multi-select in playlist mode. Use your playlist viewer for it.

Next release will have Shift key support though.

I am sad to hear of your decision not to include the multiple selection for Smoth in Play List mode. I do indeed use the playlist to make the multiple selection, but when an artist has a large number of albums, as it is not collapsed like Smooth does, it is not very functional to select multiple albums. That was the reason for asking for multiple selection in the Smooth's Play List mode, the selection would be much faster by showing only the grouped album art.
I hope you will keep this in mind for new versions.
Thanks anyway.

Re: JScript Panel

Reply #1604
what about : FillGradientRectangle ? not supported anymore ? strange ...

 

Re: JScript Panel

Reply #1606
3.4.27

-Smooth Browser now has multi-select with the Shift key in addition to the Ctrl key support that was added in the previous release.
-Various other Smooth fixes

https://jscript-panel.github.io/docs/changes/

https://github.com/jscript-panel/release/releases/tag/latest



Re: JScript Panel

Reply #1608
Any chance of getting the rating sample to work with foo_playcount_2003?

Re: JScript Panel

Reply #1609
I couldn't be bothered with modifying the main script so here's a quick hack that goes straight in the panel. It's for Playcount 2003 only with no options to switch.

Code: [Select]
// ==PREPROCESSOR==
// @name "Rating 2003"
// @author "marc2003"
// @import "%fb2k_component_path%helpers.txt"
// @import "%fb2k_component_path%samples\js\lodash.min.js"
// @import "%fb2k_component_path%samples\js\common.js"
// @import "%fb2k_component_path%samples\js\panel.js"
// @import "%fb2k_component_path%samples\js\rating.js"
// ==/PREPROCESSOR==

var panel = new _panel({ custom_background : true });
var rating = new _rating(0, 0, 24, RGB(255, 128, 0)); // x, y, height, colour
rating.properties.mode.value = 2;

rating.get_max = function () {
var max = 5; // foo_playcount_2003 max supported value is 10
this.w = this.h * max;
return max;
}

rating.get_rating = function () {
return panel.tf('$if2(%2003_rating%,0)');
}

rating.set_rating = function () {
var handles = fb.CreateHandleList(panel.metadb);
handles.RunContextCommand('Playcount 2003/Rating/' + (this.hrating == this.rating ? 'Clear' : 'Set rating to ' + this.hrating));
handles.Dispose();
}

panel.item_focus_change();

function on_colours_changed() {
panel.colours_changed();
window.Repaint();
}

function on_item_focus_change() {
if (panel.selection.value == 0 && fb.IsPlaying) return;
panel.item_focus_change();
}

function on_metadb_changed() {
rating.metadb_changed();
}

function on_mouse_lbtn_up(x, y) {
rating.lbtn_up(x, y);
}

function on_mouse_leave() {
rating.leave();
}

function on_mouse_move(x, y) {
rating.move(x, y);
}

function on_paint(gr) {
panel.paint(gr);
rating.paint(gr);
}

function on_playback_new_track() {
panel.item_focus_change();
}

function on_playback_stop(reason) {
if (reason != 2) {
panel.item_focus_change();
}
}

function on_playlist_switch() {
on_item_focus_change();
}

function on_size() {
panel.size();
}

It uses a default max value of 5 but can be edited to 10 inside the get_max function.

Re: JScript Panel

Reply #1610
Perfect! Thanks so much!