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 294562 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: JScript Panel

Reply #975
JSplaylist in the old version of JSP on fb2k v2 is going to suck but you should be able to hack the rating by browsing the component folder\samples\jsplaylist and opening main.js.

Find...

Code: [Select]
var foo_playcount = utils.CheckComponent("foo_playcount");

replace it with...

Code: [Select]
var foo_playcount = true;

Re: JScript Panel

Reply #976
Thats perfect Marc , thank  you again  for your quick  and consise response, also your patience for us amateur dabblers  :D
Thanks Ken

Re: JScript Panel

Reply #977
3.1.9

https://github.com/marc2k3/jscript-panel/releases

Text Display now supports custom $font title formatting. It takes font name,size,weight,style,underline and strikethrough args. Only the first 2 are required,



Re: JScript Panel

Reply #980
Decent of you to be back-porting for those of us stuck on 1.6.13.  If you can be bothered, the Text Display stuff would be nice!
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: JScript Panel

Reply #981
Thank you very much for the enhanced Text Display. Really great!

Would it be possible to choose from smaller font sizes than 10? I would need 8 to better match my OS font size.

Thank you in advance. :)

Re: JScript Panel

Reply #982
I'll relax restrictions on font size in the next release.

And nope, the text display won't be backported. The webp thing was easy because it was overwriting 2 complete files with no edits. Backporting the new dialogs and $font stuff would be a lot more work so I'm not doing it. And of course fb2k 1.x users can continue using foo_textdisplay- the main motivation for my own text display was creating something for 64bit fb2k v2 under default UI. Columns UI users have always had and still have Item details which supports $rgb and its own $set_font method.

Re: JScript Panel

Reply #983
3.1.11

https://github.com/marc2k3/jscript-panel/releases

This adds simple scroll support for text display using your mouse wheel (no scrollbar).

edit: there was a bug with the default font size being reset on script init. A fixed version has been uploaded.

Re: JScript Panel

Reply #984
Thank you very much for the new release. Smaller font size works using the $font title formatting now. Also the scroll support is very welcome.  :)


Re: JScript Panel

Reply #986
I was too lazy to add an example for utils.CreateTextLayout2 earlier. I've now added a new page

https://marc2k3.github.io/jscript-panel/docs/styling-ranges-text/

and I've updated the fonts page...

https://marc2k3.github.io/jscript-panel/docs/fonts/

At some point I will explain how to use $rgb/$font in your own scripts. If you can't wait, you can pick apart the code in samples\js\text_display.js and helpers.txt.

 

Re: JScript Panel

Reply #987
My wish: Please list JScript Panel 3 on foobar2000.org/components.
Quote
Getting a component listed on foobar2000.org/components
... Contact Peter with info about your component.

Re: JScript Panel

Reply #988
Auto-updates would not be a good fit for me. I often have to ask people to re-import samples to fix bugs or get new functionality. If they don't read the changes and blindly update, that's their problem. But if things break from using the component updater. people will be pointing their fingers at me.  :P

If anyone has a github account (I know you do), you can get notified of new releases by using the watch button. You certainly don't want notifications of all activity but if you select custom, you can get release notifications only.



edit: only just noticed you're already watching in some capacity!

Re: JScript Panel

Reply #989
You can switch off download and auto-download. Example: https://www.foobar2000.org/components/view/foo_spider_monkey_panel
So every user has to visit your GitHub site to download.
I think, your component is worth a larger audience.


Re: JScript Panel

Reply #991
I hadn't noticed before but you can use these additional title format functions inside Text Display because they all return the same code as $rgb

Code: [Select]
$hsl(h,s,l)
$hsl()
$blend(colour1,colour2,part,total)
$transition(string,colour1,colour2)

Full docs for those are here: https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#Historical_and_Columns_UI_color_functions




Re: JScript Panel

Reply #995
Hi :)

can't install.

foobar2000 v1.6.13 Windows 11 Home.
JScript Panel 3 3.0.7 (foo_jscript_panel3):
Failed to load DLL: foo_jscript_panel3.dll
Reason: Wrong version number; this component appears to have been built with a newer version of the foobar2000 SDK, please download latest version of foobar2000 in order to use it.

Deleting "\profile\user-components\foo_jscript_panel3 folder" and installing it again didn't work either.
JScript Panel 3 3.0.6 is fine.

Thanks.
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself)



Re: JScript Panel

Reply #998
Should be fixed now. Sorry for the inconvenience.

Many Thanks marc2k3 :)
SHURE SRH1840, SENNHEISER HD660S2, SENNHEISER HD 490 PRO, DT 1990 PRO, HiFiMAN Edition XS, Bowers & Wilkins P7, FiiO FT5, 水月雨 (MOONDROP) 空鳴 - VOID, Nakamichi Elite FIVE ANC, Bose QuietComfort 45 (made a Upgrade/Balanced Cable by myself)

Re: JScript Panel

Reply #999
Hi Marc,

I've found the time to get back to writing my scripts, and I think I came across a bug.

I'm using FillGradientRectangle and whenever I set an X or Y value other than 0, the gradient does not draw properly, it is cut by the amount of pixels I set X or Y (only the gradient effect, not the shape itself).

Take these 2 examples of vertical gradient and horizontal gradient respectively:

Code: [Select]
gr.FillGradientRectangle(0, 100, window.Width, 100, 0, 0xFF000000, 0xFFFFFFFF);
gr.FillGradientRectangle(100, 0, 100, window.Height, 1, 0xFF000000, 0xFFFFFFFF);

The result from this 2 lines is a box that is the correct size but the black part of the gradient is not visible, only if you set both X and Y to 0 you can actually see the black, as if it is being drawn from x:0 and y:0 no matter what.

I did the same test using FillGradientRectangleAdvanced with the sample in the docs, same behaviour.

Since I haven't yet updated to foobar v2.0 I'm using JScript Panel v3.0.7. I took a look at the changelog and couldn't find anything related to this in newer versions.

As always, thank you for this great component.