| View previous topic :: View next topic |
| Author |
Message |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Wed Dec 04, 2002 4:33 pm Post subject: Skinning VDS apps... |
|
|
I have seen several VDs apps that have been skinned with graphic images, however, my attempts to do so have met with very dismal failure. A guide to skinning VDS dialogs would be very helpful. Hint, hint!  |
|
| Back to top |
|
 |
marty Professional Member


Joined: 10 May 2001 Posts: 789
|
Posted: Wed Dec 04, 2002 5:22 pm Post subject: |
|
|
Your using VDS 4?
If so I might make a quick example...  |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Wed Dec 04, 2002 6:10 pm Post subject: |
|
|
I usually use VDS 3.51, but I am trying out version 4.5 to see if it is worthy of an upgrade (unless s.a.d.e has version 5 in the works, in which case I might wait). Being able to skin a dialog would be a pretty good argument for VDS 4.5 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Dec 04, 2002 6:33 pm Post subject: |
|
|
You can use a BITMAP element with the STRETCH
style for a background, just add it first.
Here's a stretchable example (change %%bmp to
a bitmap on your computer).
NOTE: If ya don't save code as a DSC file, the
@path(%0) function doesn't work, so use the full
path to your bitmap if ya don't want to save this.
__________________________________________________________________________________________________________________________
| Code: |
%%bmp = @path(%0)splash1.bmp
OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
%%wintitle = "Test Program"
DIALOG CREATE,%%wintitle,-1,0,300,200,RESIZABLE
DIALOG ADD,BITMAP,BkGrnd,0,0,300,200,%%bmp,,STRETCH
DIALOG ADD,EDIT,E1,20,20,208,127,,,MULTI,WRAP
DIALOG SHOW
:RESIZE
DIALOG SETPOS,BkGrnd,,,@diff(@winpos(%%wintitle,W),8),@diff(@winpos(%%wintitle,H), 27)
DIALOG SETPOS,E1,,,@diff(@winpos(%%wintitle,W),100),@diff(@winpos(%%wintitle,H), 100)
:EVLOOP
WAIT EVENT
goto @event()
:CLOSE
EXIT
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Dec 04, 2002 7:17 pm Post subject: |
|
|
OOPS... Background adjustment height was off by one pixel.
It's fixed now. Also replaced the list with an edit element.
BTW, the "27" allows for title bar height, the "8" allows
for discrepancies between the @winpos() function and the
DIALOG SETPOS command (prolly some of this in the
title bar allowance as well).
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Wed Dec 04, 2002 9:00 pm Post subject: |
|
|
| Mac: I've been able to get that far in my attempts before, but how do you account for text or group elements? They always show the grey over the bitmap. |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Wed Dec 04, 2002 9:10 pm Post subject: |
|
|
For text elements you can use the transparent option like this:
| Code: |
dialog add,text,text1,0,0,,,Your Text Here,Transparent
|
This will remove the "gray" (or any color) from the background of
your text.
For the groups and such, If you want them to match your skinning
theme you will have to make them out of bitmaps.
Check out my ColorCell2 program. It may give you an example.
http://www.cgs.vdsworld.com/x/modules/mydownloads/viewcat.php?cid=3
For buttons, you will have to make bitmaps for normal and pressed
state.
If I have time I will try to make an example for you.
Good luck, _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Dec 04, 2002 9:11 pm Post subject: |
|
|
Use the TRANSPARENT style.
DIALOG ADD,TEXT,T1,5,5,,,"This is a test",,TRANSPARENT
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Dec 04, 2002 9:14 pm Post subject: |
|
|
OOPS... Sorry Chris. I'm too slow typing...  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Dec 04, 2002 9:21 pm Post subject: |
|
|
Lol, I forgot to answer the group question anyway.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Dec 04, 2002 9:50 pm Post subject: |
|
|
BTW, you can also use a STYLE for groups if ya
want a solid background that matches the color
scheme rather than another bitmap.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Dec 04, 2002 9:57 pm Post subject: |
|
|
| LiquidCode wrote: | For buttons, you will have to make bitmaps for normal and pressed state.
|
Uh... Chris...
Normal buttons work fine over a bitmap...  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed Dec 04, 2002 10:12 pm Post subject: |
|
|
I think he means to skin em Mac.  _________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Dec 04, 2002 10:17 pm Post subject: |
|
|
Well... if that's the case, why not use a BITBTN?
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|