Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: DOSCab/WinCab Skins  (Read 23794 times)

0 Members and 1 Guest are viewing this topic.

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
DOSCab/WinCab Skins
« on: May 18, 2005, 01:28:35 pm »
I just sent this to someone in a PM who was asking about making a skin, but it seems I should post this for public consumption.  This was fired off quickly and obviously needs to be fleshed out and expanded...

At this point, I have put my time into trying to finish the jukebox, so I have not written a skin builder.  Fortunately, building a skin is not that hard.  Things to remember:

- All coordinates and measurements are relative to the background image, not the actual resolution.
- Pixels in the background image are always assumed to be square; they will be corrected for the aspect ratio of the monitor, resolution and orientation at runtime to stay square. 

Basic skins are very easy.  Here, for example, is the classic.skn with the comments stripped out to make it shorter:
Code: [Select]
[skin]
background=bgclassc.jpg

[Selection]
SelectionMethod=Alphanumeric
UseZero=False
HighLetter=D
HighNumber=4

[Display1]
# Now Playing display
enabled=True
x=157
y=202
w=282
h=80
lines=4
color=palegreen
bgcolor=black

[Display2]
# Song List display
enabled=True
x=595
y=202
w=282
h=80
lines=4
color=palegreen
bgcolor=black

[Display3]
# Selection display
enabled=True
x=496
y=258
w=42
h=25
color=palegreen
bgcolor=black

[Display4]
# Credit Display
enabled=True
x=496
y=214
w=42
h=25
color=palegreen
bgcolor=black

[TitleStrips]
Background=jb45lb01.jpg
AddQuotes=True
ForceUpperCaseTitles=True
ForceUpperCaseArtists=True
SongsPerStrip=Double
Font=bluehigh.ttf
FontSize=26
FontColor=black
SmallFont=bluecond.ttf
SmallFontSize=26
Width=320
Height=108
StripCount=8
FontSmoothing=true

[StripGrid]
x=162
y=308
rows=4
cols=2
rowspace=2
colspace=60
order=Horizontal

That's it.  It comes down to:

- Pick the background
- Set the selection method and range of selection keys
- Set the location, size, color, and number of lines of the displays (or disable them)
- Define the appearance of the titlestrips
- Define the size and location of one or more grid(s) of titlestrips

That is all there is to a basic skin.  Where it gets more complicated is when you start adding icons that create or react to jukebox events; these icons are of course critical for touchscreen use.  For this, we shift gears and look at default.skn.  I'll skip all of the stuff covered above and go right to the icons:

Code: [Select]
[Icon1]
x=464
y=193
w=93
h=94
OnImage=instron.bmp
OffImage=instroff.bmp
Clickable=False
Action=MSG_CREDITS

[Icon2]
x=624
y=281
w=11
h=11
OnImage=r-ledoff.bmp
OffImage=r-ledon.bmp
Clickable=False
Action=MSG_POPULAR

[Icon3]
x=738
y=281
w=11
h=11
OnImage=r-ledon.bmp
OffImage=r-ledoff.bmp
Clickable=False
Action=MSG_POPULAR

[Icon4]
x=477
y=413
w=33
h=33
FocusColor=yellow
ShadowColor=Black
Clickable=True
Action=BTN_A

[Icon5]
x=514
y=413
w=33
h=33
FocusColor=yellow
ShadowColor=Black
Clickable=True
Action=BTN_1
(This is just a subset of the 17 icons in default.skn, but the rest are like Icon4 and Icon5.)

Here we see the two different kinds of icons: non-clickable icons, which simply react to events, and clickable icons, which both create and react to events.  Correspondingly, there are two kinds of events an icon can send or receive: BTN_ events, which act as if one of the buttons were pressed when sent, and MSG_ events, which report on the state of the jukebox.  Clickable icons should always send BTN_ events; non-clickable icons can react to either BTN_ or MSG_ events.   The BTN_ events are listed in controls.ini; the MSG_ events are listed in readme.txt.

BTN_ events always un-set themselves after 1/10th of a second, and MSG_ events un-set themselves when the condition is no longer true.  A perfect example is to compare BTN_PAUSE vs. MSG_SONGPAUSED.  When BTN_PAUSE is pressed, either on the keyboard or by clicking a clickable icon assigned to it, the BTN_PAUSE message is processed, which pauses the current song and pushes BTN_PAUSE and MSG_SONGPAUSED onto the message queue, and a -BTN_PAUSE (unset BTN_PAUSE) onto the timer queue.  The user interface sees the BTN_PAUSE and causes whatever icons are assigned to it to display their OnImage, or if no OnImage is assigned it makes the OffImage (or the background if no OffImage is assigned) appear to be "pressed".  The same thing happens with MSG_SONGPAUSED, so if you have an OffImage that looks like an unlit LED and an OnImage that looks like a lit LED, the LED for that icon will appear to "light" in response to MSG_SONGPAUSED.  A tenth of a second later, -BTN_PAUSE is sent to the user interface, reverting any icons assigned to it back to their OffImage (or the background if no OffImage is assigned), but the song is still paused.  When BTN_PAUSE is pressed again, the process repeats, except this time processing the message results in starting the song and sending BTN_PAUSE and -MSG_SONGPAUSED to the interface, and again -BTN_PAUSE to the timer queue.  If the clickable icon instead was set to MSG_SONGPAUSED, nothing would happen, as the jukebox engine doesn't react to MSG_ messages, only BTN_ messages.

Hopefully that makes some sense!

--Chris

--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

gabypotter

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 39
  • Last login:February 28, 2020, 04:04:27 pm
  • I want to finish my Jukebox!!!
Re: DOSCab/WinCab Skins
« Reply #1 on: February 06, 2006, 03:41:07 pm »
this is a little harder for me ???,
is there a software to make wincab skins?,
like dragging and dropping buttons?

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: DOSCab/WinCab Skins
« Reply #2 on: February 06, 2006, 03:43:21 pm »
Unfortunately, there is not; until I get a "final" version finished and the skin options stop changing, it's not really possible to create a skin editor.

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

MusicGirl24

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:May 11, 2008, 10:51:41 pm
Re: DOSCab/WinCab Skins
« Reply #3 on: November 16, 2007, 11:50:38 pm »
I could use a little help on the installation of this jukebox. I am up to the point of copy and paste for my songpath settings in the jukebox.ini file, but every time I try to save the changes, I'm not allowed to  perform the action- being told to save it under a different name- save the file in My Documents. :blah: I have a Gateway computer- Vista Home Premium- and I already made the alterations to other files in this program,  but I don't know if there is a specific action from this point, such as another file alteration- in order for me to save my songpath settings.  ??? I would appreciate any info on this one. Thanks- :)

blah69

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:October 02, 2010, 12:44:17 pm
Re: DOSCab/WinCab Skins
« Reply #4 on: November 17, 2007, 03:31:37 pm »
I could use a little help on the installation of this jukebox. I am up to the point of copy and paste for my songpath settings in the jukebox.ini file, but every time I try to save the changes, I'm not allowed to  perform the action- being told to save it under a different name- save the file in My Documents. :blah: I have a Gateway computer- Vista Home Premium- and I already made the alterations to other files in this program,  but I don't know if there is a specific action from this point, such as another file alteration- in order for me to save my songpath settings.  ??? I would appreciate any info on this one. Thanks- :)
Instead of just closing out the program and having it ask you if you want to save, try clicking save or save as.  I initially got the same thing in Vista.

MusicGirl24

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:May 11, 2008, 10:51:41 pm
Re: DOSCab/WinCab Skins
« Reply #5 on: November 17, 2007, 04:33:03 pm »
Thanks for posting. If I can ask another question- I tried what you said- but I keep getting the sam response from the program- which is
This file is set to read-only.
Try again with a different file name.

Should I perform an override in the program- or should I try and rename the file. I can't get any different response. When trying to save, it says Save as type: Text Documents(*.txt)
File name: jukebox
I figured if I named it jukebox 2 it wouldn't read my songpaths anyway.
I'm a little stuck here. I 'd appreciate any imput, if it' s not too much trouble.
Another problem that I have seems to be when I try to save it as a different file name. If I continue with it to be saved as text, it asks me if I want to same in documents- and if I save as all file types it asks if I want to save in my folder. Should I rename the file and save in one of these 2 areas- or must it be saved as jukebox.ini file?

Thanks again 8)
« Last Edit: November 17, 2007, 04:56:45 pm by MusicGirl24 »

blah69

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:October 02, 2010, 12:44:17 pm
Re: DOSCab/WinCab Skins
« Reply #6 on: November 18, 2007, 12:26:54 am »
Thanks for posting. If I can ask another question- I tried what you said- but I keep getting the sam response from the program- which is
This file is set to read-only.
Try again with a different file name.

Should I perform an override in the program- or should I try and rename the file. I can't get any different response. When trying to save, it says Save as type: Text Documents(*.txt)
File name: jukebox
I figured if I named it jukebox 2 it wouldn't read my songpaths anyway.
I'm a little stuck here. I 'd appreciate any imput, if it' s not too much trouble.
Another problem that I have seems to be when I try to save it as a different file name. If I continue with it to be saved as text, it asks me if I want to same in documents- and if I save as all file types it asks if I want to save in my folder. Should I rename the file and save in one of these 2 areas- or must it be saved as jukebox.ini file?

Thanks again 8)

When you "Save As", you have to click on the pull down menu on the bottom and change it from ".txt" files to all files.  Then save it with an ".ini"

I'm not sure if it will work if you switch the name from jukebox.ini though.

MusicGirl24

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:May 11, 2008, 10:51:41 pm
Re: DOSCab/WinCab Skins
« Reply #7 on: November 18, 2007, 01:54:08 am »
Thanks again so much for the input. I just tried going back in. This is what I did- I went back into the jukebox.ini file and I copied and pasted my songpaths in- and I saved as all files- jukebox.ini and it still wouldn't let me save the file. So while I'll still had these windows open, I deleted the original file from the program folder, and then canceled saving, and directly after that, reopened save as - I then saved this file as jukebox.ini and as all files. It automatically saved this file in My Documents. I then took the jukebox.ini file and by drag/ drop method with Administrator approval, put it back into the program. I then tried to open the shortcut of the jukebox on my desktop, and it worked. I now seem to be working the jukebox, and I am learning to use the Ctrl, Alt, Esc and Tab keys.
 ;) ;) ;) In case you haven't guessed I'm about to throw another question out there if you've got the time. Is there a way to control the volume ? And can you really pause ? Because I used the space bar and alt and the music started going on and off.
I also wrote down these codes somehow, but I don't remember from what page-
Alt + Tab =?  Ctrl + Esc =?
Alt +Esc = exiting the jukebox
I don't even know what these are - PrtSc   or  Alt + PrtSc  or Alt + Enter or Alt + Space , since this one had the music jumping in and out- I know I did something wrong- just obviously not what exactly.  : :dunno
My volume/pg up /pg dn buttons are controlling the pages - and my arrows seem to highlight songs.
Most importantly though- you were a great help, and I truly appreciate it. :applaud: No matter what- I can put in coins- using my #5 , and I am using the adjoining number and letter combos to select tracks, and I'm happy. ;D It's better than I thought 8)

blah69

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 37
  • Last login:October 02, 2010, 12:44:17 pm
Re: DOSCab/WinCab Skins
« Reply #8 on: November 18, 2007, 04:39:09 pm »
Thanks again so much for the input. I just tried going back in. This is what I did- I went back into the jukebox.ini file and I copied and pasted my songpaths in- and I saved as all files- jukebox.ini and it still wouldn't let me save the file. So while I'll still had these windows open, I deleted the original file from the program folder, and then canceled saving, and directly after that, reopened save as - I then saved this file as jukebox.ini and as all files. It automatically saved this file in My Documents. I then took the jukebox.ini file and by drag/ drop method with Administrator approval, put it back into the program. I then tried to open the shortcut of the jukebox on my desktop, and it worked. I now seem to be working the jukebox, and I am learning to use the Ctrl, Alt, Esc and Tab keys.
 ;) ;) ;) In case you haven't guessed I'm about to throw another question out there if you've got the time. Is there a way to control the volume ? And can you really pause ? Because I used the space bar and alt and the music started going on and off.
I also wrote down these codes somehow, but I don't remember from what page-
Alt + Tab =?  Ctrl + Esc =?
Alt +Esc = exiting the jukebox
I don't even know what these are - PrtSc   or  Alt + PrtSc  or Alt + Enter or Alt + Space , since this one had the music jumping in and out- I know I did something wrong- just obviously not what exactly.  : :dunno
My volume/pg up /pg dn buttons are controlling the pages - and my arrows seem to highlight songs.
Most importantly though- you were a great help, and I truly appreciate it. :applaud: No matter what- I can put in coins- using my #5 , and I am using the adjoining number and letter combos to select tracks, and I'm happy. ;D It's better than I thought 8)

All the controls are listed in the controls.ini file....

But yes,
pause = F8
minus = volume down
equals = volume up