Jump to content


Photo

Winskin Extension


  • Please log in to reply
24 replies to this topic

#1 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 13 March 2007 - 04:44 AM

WinSkin Extension
By Dylan Fortune (aka DFortun81)

This is an extension that adds RMXP's window skin capabilities to Game Maker. In RMXP, a "window" is created using a single background, the same is now possible for GM. WinSkin provides easy to use Window skinning and you can even modify some of the settings.

An example is provided in the main download. If you have any further questions pertaining to this extension, please post your question or PM it to me.

WinSkin takes a background that looks like this:
Posted Image

And can turn it into something like this if you get good enough: (NOTE: Different Window skin used in this picture)
Posted Image

Functions List:
To Initialize:
winskin_init(fillalpha, borderalpha, tilesides, tilefill, winskin);
winskin_set_tile_sides(tilesides);
winskin_set_fillalpha(alpha);
winskin_set_tile_fill(tilefill);
winskin_set_borderalpha(alpha);
winskin_set_winskin(back);

To Draw:
draw_arrow_down_skinned(x, y);
draw_arrow_left_skinned(x, y);
draw_arrow_right_skinned(x, y);
draw_arrow_up_skinned(x, y);
draw_continue_skinned(x, y);
draw_pointer_skinned(x, y, animate, xscale, yscale);
draw_selectionbox_skinned(x1, y1, x2, y2);
draw_selectionbox_skinned_ext(centerx, centery, w, h);
draw_window_skinned(x1, y1, x2, y2);

To Animate:
winskin_step();

To Access Settings:
winskin_get_tile_sides();
winskin_get_tile_fill();
winskin_get_fillalpha();
winskin_get_borderalpha();
winskin_get_winskin();

Programs/Games currently using the WinSkin Extension:
DIA RPG Builder - DFortun81
Peacekeeper - DFortun81
Begemed 2 - DFortun81
Helion - jakman4242
...

Do you have a game using this extension? Provide the name and a link and I'll include it in this list.

Download: Posted Image

Enjoy,
-DF81

Edited by DFortun81, 21 July 2007 - 04:43 AM.

  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#2 -!MBC!- R3D R3AP3R

-!MBC!- R3D R3AP3R

    GMC Member

  • New Member
  • 196 posts

Posted 13 March 2007 - 09:43 AM

Cool extension, i like it and will use it if i need to :D
  • 0

#3 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 15 March 2007 - 11:07 PM

Thanks for your support.

-DF81
  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#4 -!MBC!- R3D R3AP3R

-!MBC!- R3D R3AP3R

    GMC Member

  • New Member
  • 196 posts

Posted 15 March 2007 - 11:17 PM

How do you actually go about using a different RMXP WinSkin?
  • 0

#5 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 15 March 2007 - 11:25 PM

How do you actually go about using a different RMXP WinSkin?

<{POST_SNAPBACK}>

Well, you can change the winskin being drawn by calling
winskin_set_winskin(back_winskin);

From that point on, the window skin will draw based from back_winskin. If you are lazy, you could just replace the one I provided with one that you get from RMXP. Custom skins should also work.

-DF81
NOTE: You should add an extra pixel at the bottom if your skin is transparent!
  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#6 GmDude66

GmDude66

    GMC Member

  • New Member
  • 348 posts
  • Version:Unknown

Posted 16 March 2007 - 12:56 AM

Looks great!

I'll try it in a few.
  • 0

#7 T-Bird

T-Bird

    GMC Member

  • New Member
  • 1326 posts

Posted 17 March 2007 - 05:26 AM

Im glad someone made an ext to make subwindows. I will probably be trying it out.
  • 0

#8 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 07 April 2007 - 03:22 AM

Im glad someone made an ext to make subwindows.  I will probably be trying it out.

<{POST_SNAPBACK}>

This isn't really for submenus, it's more of a draw_rectangle function with the ability to draw the rectangle with a background rather than lines and a color. But it's a little more complicated than that.

-DF81
  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#9 PLAY: More

PLAY: More

    Press F8 to enter BIOS

  • New Member
  • 824 posts

Posted 07 April 2007 - 04:19 AM

It looks interesting, but how do you create a custom background for it?
  • 0

#10 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 07 April 2007 - 04:22 AM

It looks interesting, but how do you create a custom background for it?

<{POST_SNAPBACK}>

Use the background image I provided as a template.

-DF81
  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#11 gamerr

gamerr

    GMC Member

  • New Member
  • 40 posts

Posted 25 June 2007 - 08:16 AM

Hm its a good extension.
The only problem i have is that it loads the message imediatly.
And i only want it to load when i press space.
So a create event isnt really good for me.

Any suggestions?
  • 0

#12 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 25 June 2007 - 08:37 AM

Hm its a good extension.
The only problem i have is that it loads the message imediatly.
And i only want it to load when i press space.
So a create event isnt really good for me.

Any suggestions?

<{POST_SNAPBACK}>

I don't understand. This extension is for drawing rectangles made from a window skin, not showing messages.

What I would do is make an object that draws the window and the message, and whenever you want to show a message, (like when the user presses Space), create an instance of it.

-DF81

Edited by DFortun81, 25 June 2007 - 08:45 AM.

  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#13 jakman4242

jakman4242

    Vertical Shmup Junkie

  • New Member
  • 3222 posts

Posted 25 June 2007 - 09:54 AM

Hey DFortun81,

whats up?
Cool extension, i'll use it for Helion(Add it to list, link it to my topic in game design for now)

lol, i was starting to get suspicious when your windows started to look like RMXP. And now i know why.
Well, thanks DFortun81. Once again you manage to do something else i can't ever hope to understand lol.

EDIT: This will be extreemly useful for HUD and GUI!!!!
I just noticed that. Thanks for adding my game :medieval: I'll tell you when the first demo is out.
btw, why not add custom font support using backgrounds, if you've already done this.

Edited by jakman4242, 25 June 2007 - 10:15 AM.

  • 0
-- My blog. --

#14 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 25 June 2007 - 10:37 AM

btw, why not add custom font support using backgrounds, if you've already done this.

<{POST_SNAPBACK}>

Hmmm... That's not such a bad idea. I'll see what I can do, if I get it to work, I'll incorporate it into the extension.

-DF81
  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#15 spacerat

spacerat

    GMC Member

  • GMC Member
  • 233 posts

Posted 11 July 2007 - 04:57 PM

Very nice, however it would be good if you could change the settings of individual windows, perhaps have a draw_window_ext(x1,y1,x2,y2,alpha/etc) which overrides the normal functions.
I would use this, but I want the game I'm making to stay compatible with GM6, so (unless the scripts you use happen to be compatible with GM6...) I may have to try and make my own GM6 version of this.
  • 0
Registered GM 7 | Vista Ultimate X86 | Intel Core 2 Duo E6750 2.6 GHz FSB 1333 mhz | ASUS P5B-SE Motherboard | ATI Radeon HD 4870 512 MB | 4GB DDR2 667 Mhz Elixiar Ram | Realtek HD Audio | 1280x1024 ViewSonic VE710s LCD screen | Logitech MX 518 Mouse| Saitek Eclipse Keyboard Blue | AOL 8 Mb broadband| Ralink 58 Mb/s wireless PCI card | nEar 05 Classic studio speakers.

Anything else you need to know?

#16 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 11 July 2007 - 05:03 PM

Very nice, however it would be good if you could change the settings of individual windows, perhaps have a draw_window_ext(x1,y1,x2,y2,alpha/etc) which overrides the normal functions.
I would use this, but I want the game I'm making to stay compatible with GM6, so (unless the scripts you use happen to be compatible with GM6...) I may have to try and make my own GM6 version of this.

<{POST_SNAPBACK}>

You can change the settings using winskin_set_fillalpha, winskin_set_borderalpha, and the other setting functions.

I'll make a GM6 compatible version. Give me a few minutes to get it up.
-DF81
EDIT: Link. This url provides both the GM7 extension, a windowskin, and a GM6 compatible set of scripts in a gm6. This requires the Registered/Pro version of GM.

Edited by DFortun81, 11 July 2007 - 05:20 PM.

  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#17 Ryan-Phoenixan

Ryan-Phoenixan

    GMC Member

  • New Member
  • 211 posts

Posted 21 December 2007 - 10:39 AM

I need to let you know that when you set tiling to true, you get gaps between the tiles in the window, even on the default skin. Let me demonstrate after changing the background color of the room.
Posted Image
Other than that, great extension!

Edited by Ryan-Phoenixan, 21 December 2007 - 10:44 AM.

  • 0

#18 paolo-dude

paolo-dude

    GMC Member

  • New Member
  • 210 posts

Posted 21 December 2007 - 02:28 PM

Gives off a really good look, but could you make a DnD version?
I find it quite hard to understand the GML version.
Thanks,

~PD~
  • 0
Her eyes are like looking into the abyss...

#19 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 21 December 2007 - 03:35 PM

I fixed the said error and now it works fine: Fixed WinSkin extension.

-DF81
  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#20 Ryan-Phoenixan

Ryan-Phoenixan

    GMC Member

  • New Member
  • 211 posts

Posted 21 December 2007 - 07:23 PM

Thanks! Works perfectly! :lol: I'll have to get my game topic back up soon. XD
  • 0

#21 FantiX

FantiX

    GMC Member

  • GMC Member
  • 175 posts

Posted 26 December 2007 - 02:03 PM

GM6 !!!!1
  • 0

#22 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 26 December 2007 - 04:56 PM

GM6 !!!!1

<{POST_SNAPBACK}>

Yes, I also included the open source GM6 in the zip file.
  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#23 Konochi

Konochi

    GMC Member

  • New Member
  • 629 posts

Posted 21 February 2008 - 06:07 AM

hm...the gm6 file link is broken
  • 0

#24 DFortun81

DFortun81

    The Fortunate One

  • GMC Member
  • 899 posts
  • Version:GM:Studio

Posted 21 February 2008 - 02:04 PM

Dunno why 64D is broken again, here's a working link: Download.

-DF81
  • 0

dia_rpg_builder.png
Navigate to my personal website by clicking the image above.


#25 Konochi

Konochi

    GMC Member

  • New Member
  • 629 posts

Posted 21 February 2008 - 11:08 PM

thanks :blink:
[edit]
um that's the gmk file but it's ok I got your winskin scripts

Edited by Konochi, 21 February 2008 - 11:11 PM.

  • 0