IPB

Welcome Guest ( Log In | Register )

125 Pages V  « < 79 80 81 82 83 > »   
Reply to this topicStart new topic
WSH Panel Mod script discussion/help.
ExtremeHunter
post Jan 23 2013, 18:37
Post #2001





Group: Members
Posts: 133
Joined: 5-October 08
From: Estonia
Member No.: 59398



derty2

you can get zoomable/resizable version here (zoom with Shift+mouse wheel or Shift+up/down arrow keys),
but keep in mind that larger your image goes, more CPU it takes.

This post has been edited by ExtremeHunter: Jan 23 2013, 18:44
Go to the top of the page
+Quote Post
derty2
post Jan 23 2013, 23:20
Post #2002





Group: Members
Posts: 581
Joined: 5-June 11
Member No.: 91257



Fantastic work eXtremeHunter, the code works great +++++++

This looks really nice when using a PNG disc image with transparent background and a custom panel background color.

If anybody here wants to edit the script to have custom panel background colors then add these lines to the script:

add this:
QUOTE
function RGB(r,g,b) { return (0xff000000|(r<<16)|(g<<8)|(b)); }
var backgrcolor = RGB(34,28,28) //<<<<<<<<<< color is dark brown

and add this:
QUOTE
function on_paint(gr) {
    gr.FillGradRect(0, 0, window.Width, window.Height, 90, backgrcolor, RGB(50,0,0)); //<<<<<<<<<< color is gradient dark brown-maroon
    gr.DrawImage(resizedVinylImage, vinylX, vinylY, vinylW, vinylH, 0, 0, resizedVinylImage.Width, resizedVinylImage.Height, angle);
}


HOW TO CREATE A 'PNG' DISC IMAGE WITH TRANSPARENT BACKGROUND
QUOTE
For this example I am using Photoshop CS3,

Open image in Photoshop,

At the left-side toolbar select the "Elliptical Marquee Tool",

Place the mouse cursor somewhere in the middle of the image,

Hold down SHIFT+ALT keys, then click-drag the mouse cursor outwards from the middle of the image,

You will see a perfect selection circle radiating out from the middle of the image,

Keep dragging outwards until you reach the edge of the disc,

Let go of the mouse cursor and then let go of the keys,

You should now have a perfect circular selection,

Right click in the selection and choose "Layer Via Copy",

At the right-side layers panel you will now have two Layers named "Layer 1" and "Background",

Click on the "eyeball" of the "Background" layer to de-select it,

You will now see the main image showing in Photoshop will have a checkerboard background pattern,

This checkerboard pattern means the background is transparent,

Save this image as 'PNG' and you are done.

!!! IMPORTANT !!! do not save as 'JPG' because you will lose the transparent background.

Go to the top of the page
+Quote Post
onv
post Jan 24 2013, 01:12
Post #2003





Group: Members
Posts: 48
Joined: 23-March 12
Member No.: 98013



ExtremeHunter

great idea smile.gif

http://www.youtube.com/watch?v=jzaoI8lru4s...eature=youtu.be
Go to the top of the page
+Quote Post
ExtremeHunter
post Jan 24 2013, 09:46
Post #2004





Group: Members
Posts: 133
Joined: 5-October 08
From: Estonia
Member No.: 59398



Mmm, good old times comes to mind biggrin.gif

This post has been edited by ExtremeHunter: Jan 24 2013, 09:47
Go to the top of the page
+Quote Post
marc2003
post Jan 24 2013, 12:23
Post #2005





Group: Members
Posts: 4453
Joined: 27-January 05
From: England
Member No.: 19379



just a post to say if you use the right click>Update script option on my scripts from today, the last.fm charts and autoplaylists script panels will break. you just need to import those again from the full download here. http://db.tt/BInQ3Abm

i've also tidied up a few things and bumped all the version numbers on my scripts but there are no functional changes.
Go to the top of the page
+Quote Post
derty2
post Jan 24 2013, 17:51
Post #2006





Group: Members
Posts: 581
Joined: 5-June 11
Member No.: 91257



eXtremeHunter, I have one more feature request for your "Spinning Disc Image Viewer" script please. . .

I am getting bored looking at the same spinning disc for every track.
Can you modify the code so that the script searches for a disc named "disc.png" at same directory as playing track,
else if "disc.png" is not found then default disc image is displayed.

Thankyou.
Go to the top of the page
+Quote Post
ExtremeHunter
post Jan 24 2013, 21:24
Post #2007





Group: Members
Posts: 133
Joined: 5-October 08
From: Estonia
Member No.: 59398



Updated Spinning disc script here

Added: Display now playing disc first, if not available display default disc image.
(set source in Preferences/Display-Album art Disc)

Added: gradient background.
Added: disc mask. (now you can display non transparent disc images like jpg. just use correctly cropped images (edge to edge)).

screen-shot with jpg disc image

Go to the top of the page
+Quote Post
derty2
post Jan 25 2013, 00:22
Post #2008





Group: Members
Posts: 581
Joined: 5-June 11
Member No.: 91257



Thanks for the new code eXtremeHunter , it works great ++++

Here is a quick 'No Disc' image I made (1000x1000px, PNG):         
Go to the top of the page
+Quote Post
nikolai4ik
post Jan 25 2013, 07:36
Post #2009





Group: Members
Posts: 81
Joined: 8-July 08
Member No.: 55500



Hey guys, my some of my wsh panels flicker on pause/play if I set the panels to pseudo transparency, is it fixable?
Go to the top of the page
+Quote Post
nikolai4ik
post Jan 25 2013, 09:59
Post #2010





Group: Members
Posts: 81
Joined: 8-July 08
Member No.: 55500



Can't edit the post, sorry for the double post
Can anyone please change this function from opening external program to playing/pausing foobar playback?

function on_mouse_lbtn_clk(x, y, mask) {

var path = Image.Items[Image.Index].path;
if (!path || hbtn) return;
if (path.indexOf("file://") >= 0 || path == Properties.Image.DefaultCoverPath) {
return;
}
ShellObj.ShellExecute('"' + path + '"', "", "", "open", 1);
}
Go to the top of the page
+Quote Post
marc2003
post Jan 25 2013, 10:21
Post #2011





Group: Members
Posts: 4453
Joined: 27-January 05
From: England
Member No.: 19379



not sure what callback you're trying to use there??

CODE
function on_mouse_lbtn_up(x, y) {
    fb.PlayOrPause();
}


that's single click. if you want double click then use on_mouse_lbtn_dblclk
Go to the top of the page
+Quote Post
nikolai4ik
post Jan 25 2013, 17:28
Post #2012





Group: Members
Posts: 81
Joined: 8-July 08
Member No.: 55500



QUOTE (marc2003 @ Jan 25 2013, 13:21) *
not sure what callback you're trying to use there??

CODE
function on_mouse_lbtn_up(x, y) {
    fb.PlayOrPause();
}


that's single click. if you want double click then use on_mouse_lbtn_dblclk

That's a script from another config which opens the cover in the external image viewer on double click.

Your script works well, thanks, I was trying this function but with on_mouse_lbtn_clk which doesn't work. But it counts my double clicks too so when I double click on the cover it quickly pauses and then keeps playing, is it possible to make wsh see the difference between a quick double click and a single click?
Go to the top of the page
+Quote Post
kjllmeplz
post Jan 25 2013, 19:34
Post #2013





Group: Members
Posts: 30
Joined: 7-January 13
Member No.: 105671



Hi everyone, i'm starting mod the PlaylistSwitcher in the skin Mizo.

Initially, I made it to show the number of songs in each playlist, but this number didn't change immediately every time I added or deleted some songs in playlist, can someone help me sad.gif

Sorry for my bad English.

This is my script :

https://dl.dropbox.com/u/22999146/FB/playlistsw.txt

This post has been edited by kjllmeplz: Jan 25 2013, 19:40
Go to the top of the page
+Quote Post
ExtremeHunter
post Jan 25 2013, 20:01
Post #2014





Group: Members
Posts: 133
Joined: 5-October 08
From: Estonia
Member No.: 59398



kjllmeplz

add these functions to your script


CODE
function on_playlist_items_removed(){
RefreshPlaylists();
window.Repaint();
}

function on_playlist_items_added(){
RefreshPlaylists();
window.Repaint();
}


Go to the top of the page
+Quote Post
kjllmeplz
post Jan 25 2013, 20:22
Post #2015





Group: Members
Posts: 30
Joined: 7-January 13
Member No.: 105671



so fast biggrin.gif
thanks u very much biggrin.gif

This post has been edited by kjllmeplz: Jan 25 2013, 20:22
Go to the top of the page
+Quote Post
marc2003
post Jan 26 2013, 10:17
Post #2016





Group: Members
Posts: 4453
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE (nikolai4ik @ Jan 25 2013, 16:28) *
is it possible to make wsh see the difference between a quick double click and a single click?


i don't think so. perhaps you should make a pause button rather than have the whole panel respond to a single click.
Go to the top of the page
+Quote Post
nikolai4ik
post Jan 26 2013, 14:22
Post #2017





Group: Members
Posts: 81
Joined: 8-July 08
Member No.: 55500



QUOTE (marc2003 @ Jan 26 2013, 13:17) *
QUOTE (nikolai4ik @ Jan 25 2013, 16:28) *
is it possible to make wsh see the difference between a quick double click and a single click?


i don't think so. perhaps you should make a pause button rather than have the whole panel respond to a single click.

I'm not a great wsh/foobar coder as you may have noticed smile.gif I've been using an old Br3tt's config curacao for four years now and constantly modify it. It has a pause button but it's very small so pausing on clicking album art is an important feature for me (which I added with your help). Does WSH recognize middle mouse clicks then? Maybe I could remap the double click to that. Anyway it's not that big of a deal, it's not like I'll be using double clicks much so it won't bother me.
Go to the top of the page
+Quote Post
WilB
post Jan 26 2013, 16:34
Post #2018





Group: Members
Posts: 303
Joined: 20-July 06
Member No.: 33113



Yes, there are several other mouse functions you could use, e.g.

function on_mouse_mbtn_down
function on_mouse_mbtn_up
function on_mouse_mbtn_dblclk
function on_mouse_rbtn_down
function on_mouse_rbtn_up
function on_mouse_rbtn_dblclk

See the callbacks doc that comes with wsh panel mod for more info.
Go to the top of the page
+Quote Post
nikolai4ik
post Jan 26 2013, 19:55
Post #2019





Group: Members
Posts: 81
Joined: 8-July 08
Member No.: 55500



QUOTE (WilB @ Jan 26 2013, 19:34) *
Yes, there are several other mouse functions you could use, e.g.

function on_mouse_mbtn_down
function on_mouse_mbtn_up
function on_mouse_mbtn_dblclk
function on_mouse_rbtn_down
function on_mouse_rbtn_up
function on_mouse_rbtn_dblclk

See the callbacks doc that comes with wsh panel mod for more info.

Great, thanks a lot!
Go to the top of the page
+Quote Post
antheo
post Jan 27 2013, 10:30
Post #2020





Group: Members
Posts: 8
Joined: 21-January 13
Member No.: 106077



Hello ExtremeHunter,

- Thanks for your great script and the reel-to-reel tape rotated very smooth in CC direction (the blue arrow) but when I made it rotate in CCW direction as in the real (the red arrow) by changing this line: " angle += 10;" to " angle += -10;", the reel-to-reel tape to be shaken sometimes.



- Is there any way to get arrange of reel-to-reel tape images (full to empty) shown sequentially from starting to ending a track time? ( or album time as ONV mention - thank ONV)



If you come over this thread please help me a hand rolleyes.gif

Once again, thank you so much.

This post has been edited by antheo: Jan 27 2013, 11:24
Go to the top of the page
+Quote Post
ExtremeHunter
post Jan 27 2013, 13:49
Post #2021





Group: Members
Posts: 133
Joined: 5-October 08
From: Estonia
Member No.: 59398



antheo

Here's reel-to-reel example.

now you only need some tape reels with transparent holes. wink.gif
Go to the top of the page
+Quote Post
antheo
post Jan 28 2013, 05:09
Post #2022





Group: Members
Posts: 8
Joined: 21-January 13
Member No.: 106077



QUOTE (ExtremeHunter @ Jan 27 2013, 13:49) *
antheo

Here's reel-to-reel example.

now you only need some tape reels with transparent holes. wink.gif


Wow, very quick! smile.gif I'm very excited with your script in my new CUI layout.

Thank you for your kindness and help, I'll try it right now.

This post has been edited by antheo: Jan 28 2013, 05:14
Go to the top of the page
+Quote Post
derty2
post Jan 28 2013, 05:49
Post #2023





Group: Members
Posts: 581
Joined: 5-June 11
Member No.: 91257



eXtremeHunter, your "Spinning Disc Image Viewer" only displays JPG files in path of playing track; it refuses to load other image file types.
Sometimes I want to save as GIF or PNG or BMP or TIF images. Is there any way you can make your code accept all other image files as input?
Even nicer would be a config field in Properties where the user can add a list of file extensions to suit himself.
I tried editing your script, but I can not see any reference to a file extension (except for the default disc image).

That reel-to-reel image above is giving me further questions . . . .
Is it possible to have a picture of a turntable as the background of the "Spinning Disc Image Viewer" panel, and then overlay the spinning disc on top of it?

One more question . . . .
Is it possible to make an animated GIF image from a video clip and make it "play" in a WSH Panel ?
What is on my mind here is this idea: Shooting a video clip of vertical vinyl cover turning around the North-South axis so we get to see all facets of the cover . . . Front-Turning-Spine-Turning-Back-Turning-Spine-Turning-Front . . . we make an animated GIF from the video and it plays inside a WSH Panel Mod panel . . . . . . . . . . . . . . . . . . . . . is this possible?

Thanks +++++

This post has been edited by derty2: Jan 28 2013, 05:56
Go to the top of the page
+Quote Post
onv
post Jan 28 2013, 10:37
Post #2024





Group: Members
Posts: 48
Joined: 23-March 12
Member No.: 98013



eXtremeHunter
now still have to add a different rotational speed for modes (play, rew, ff), two straight lines tangent to the roll with tape... biggrin.gif

This post has been edited by onv: Jan 28 2013, 10:58
Go to the top of the page
+Quote Post
ExtremeHunter
post Jan 28 2013, 11:44
Post #2025





Group: Members
Posts: 133
Joined: 5-October 08
From: Estonia
Member No.: 59398



derty2

1. You can use wildcards to display different file types
example: foobar Preferences/Display-Album art Disc

*disc.*
*cd.*
*dvd.*

2. Yes, just add background image source and then use gr.DrawImage(background... before spinning disc and set spinning disc alpha to see through it.

3. AFAIC no. You can display only still gif images.


onv

just decrease rotationInterval value when rew/ff
Go to the top of the page
+Quote Post

125 Pages V  « < 79 80 81 82 83 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th August 2014 - 10:21