Game Maker Community YoYo Games

Welcome Guest ( Log In | Register )

> Tutorials Rules

This forum is for clear and concise tutorials and well documented examples. Tutorials and examples posted here must follow the format in the pinned Rules and Guidelines.

All new topics must be approved by a moderator before they appear. Don't post twice!

 
Reply to this topicStart new topic
Desktop Widget Example!, Not the best, but it's a start! And very cool!
Newly Discovered
post Oct 24 2009, 07:53 AM
Post #1


Harmonious Genius
Group Icon

Group: GMC Member
Posts: 2031
Joined: 14-October 05
From: ....Wonderland.... Pwned? Of Course
Member No.: 36998



  • Title: Widget (gadget)
  • Description: Attempt at a desktop widget.
  • GM Version: GM7
  • Registered: True
  • File Type: .zip (.gmk + .dll)
  • File Size: 24.2kb
  • File Link: download 01 from WHFF

Additional Info
Credit to Recreate for the Screensave Dll.
Extract folder before running.

This is a basic example of creating desktop widgets with Game Maker.
The biggest deal about this is that it uses a transparent window and a drop shadow around the window.
The drop shadow effect has never been done with GM before, so I'm happy it actually works.
This isn't the best way to go about it, but it's still very cool.

Screenshot.


Controls.
Click and drag anywhere in the game area to move the window.
Press 'R' to "refresh" the screen.
Press 'T' to toggle window's "stay on top" function.
Press 'esc' to exit.

Enjoy!

p.s. - the window sprite is mine, so I'd prefer you didn't use it...but it is in there, so I really can't stop you.
Please respect my request and don't use it. You can use the shadow all you want.

This post has been edited by Newly Discovered: Oct 25 2009, 11:45 PM
Go to the top of the page
 
+Quote Post
Greybox
post Oct 24 2009, 12:00 PM
Post #2


Grey Gamer
Group Icon

Group: GMC Member
Posts: 41
Joined: 3-September 09
From: London, England
Member No.: 138937



What is this widget supposed to do?
Go to the top of the page
 
+Quote Post
gamma
post Oct 24 2009, 12:27 PM
Post #3


GMC Member
Group Icon

Group: GMC Member
Posts: 45
Joined: 6-June 08
From: somwhere in the USA
Member No.: 108349



QUOTE (Greybox @ Oct 24 2009, 05:00 AM) *
What is this widget supposed to do?


greybox, it is an example, YOU will have to program what you want the widget to do.
Go to the top of the page
 
+Quote Post
aprentice
post Oct 24 2009, 12:40 PM
Post #4


Rockhillgames
Group Icon

Group: GMC Member
Posts: 552
Joined: 31-January 09
From: earth? duh.... u?
Member No.: 127614



nice, i like it. Very unique idea. 10/10
Go to the top of the page
 
+Quote Post
StarTrek
post Oct 24 2009, 10:12 PM
Post #5


Yesterdays games
Group Icon

Group: GMC Member
Posts: 614
Joined: 7-December 08
From: Sweden
Member No.: 124474



The transparent part is kind of bugg-ish.. But try this DLL instead of saving a BG: http://gmc.yoyogames.com/index.php?showtopic=212558
Go to the top of the page
 
+Quote Post
Luga
post Oct 24 2009, 10:15 PM
Post #6


Loogster
Group Icon

Group: GMC Member
Posts: 320
Joined: 7-June 09
Member No.: 134665



Doesnt work on vista very well. RELY buggy and odd.
Go to the top of the page
 
+Quote Post
jsorgeagames
post Oct 24 2009, 11:04 PM
Post #7


GMC Member
Group Icon

Group: GMC Member
Posts: 364
Joined: 2-July 07
Member No.: 82619



Very cool, but it needs to refresh the screenshot every couple of seconds, thus taking into account the user moving windows and such behind it. I always wanted to do something like this, but I could never find a screenshot dll.
Go to the top of the page
 
+Quote Post
Luga
post Oct 25 2009, 12:29 AM
Post #8


Loogster
Group Icon

Group: GMC Member
Posts: 320
Joined: 7-June 09
Member No.: 134665



I am working on a screen saver and am useing one,here.

http://gmc.yoyogames.com/index.php?showtopic=451140
Go to the top of the page
 
+Quote Post
collipop
post Oct 25 2009, 04:12 PM
Post #9


GMC Member
Group Icon

Group: GMC Member
Posts: 18
Joined: 24-October 09
Member No.: 143400



This is a nice example I like it, you have chosen an interesting way to do this. The problem is that when you change position of windows the widget box doesn't take a new snapshot.
Go to the top of the page
 
+Quote Post
Newly Discovered
post Oct 25 2009, 10:37 PM
Post #10


Harmonious Genius
Group Icon

Group: GMC Member
Posts: 2031
Joined: 14-October 05
From: ....Wonderland.... Pwned? Of Course
Member No.: 36998



QUOTE (Greybox @ Oct 24 2009, 07:00 AM) *
What is this widget supposed to do?
A widget is a very small application, so small, it usually only has a couple functions to it.
They usually use a nice interface and a soft drop-shadow around it.

QUOTE (aprentice @ Oct 24 2009, 07:40 AM) *
nice, i like it. Very unique idea. 10/10
Thanks, it just came to me.

QUOTE (StarTrek @ Oct 24 2009, 05:12 PM) *
The transparent part is kind of bugg-ish.. But try this DLL instead of saving a BG: http://gmc.yoyogames.com/index.php?showtopic=212558
Read below about the bug, and thanks for the link, I'll check it out.

edit
Unless you know how to make different parts of the screen different transparencies, this is worthless.

QUOTE (Luga @ Oct 24 2009, 05:15 PM) *
Doesnt work on vista very well. RELY buggy and odd.
It can't be vista's fault, because I made it using vista. It has to be your video card that isn't working properly with the blend mode.
There's an easier way to get this effect, so I'll change that now. Thanks for letting me know.

QUOTE (jsorgeagames @ Oct 24 2009, 06:04 PM) *
Very cool, but it needs to refresh the screenshot every couple of seconds, thus taking into account the user moving windows and such behind it. I always wanted to do something like this, but I could never find a screenshot dll.
I had it refreshing at a desired speed (calling an alarm at a given time) at first,
but I had an overlapping issue when taking the screenshot that I must have pulled it out thinking it was the problem.
Thanks for reminding me. I'll add it to the next release (sometime today).

QUOTE (Luga @ Oct 24 2009, 07:29 PM) *
I am working on a screen saver and am useing one,here.

http://gmc.yoyogames.com/index.php?showtopic=451140
Also thanks for the link, I'll check it out.

edit
that's exactly what I'm using, but in .gex form.

QUOTE (collipop @ Oct 25 2009, 11:12 AM) *
This is a nice example I like it, you have chosen an interesting way to do this. The problem is that when you change position of windows the widget box doesn't take a new snapshot.
That's what I'm trying to correct right now. For now, just press 'R', as it says in the first topic under Controls.

This post has been edited by Newly Discovered: Oct 26 2009, 12:55 AM
Go to the top of the page
 
+Quote Post
Recreate
post Oct 25 2009, 10:45 PM
Post #11


Rocketsnail King
Group Icon

Group: GMC Member
Posts: 2374
Joined: 5-April 08
From: NULL
Member No.: 103863



This is pretty neat man.
Though it is a little buggy it still looks pretty good!
I may develop this further, If i have enough interest in it wink1.gif
Thanks for using my DLL.
Edit: Woah, I didn't realize i used a smiley at the end of every line XD
QUOTE
Doesnt work on vista very well. RELY buggy and odd.

That is because you don't know how it works, and how easy(meh, relatively easy) it would be to fix it, oh and i'm using 7
Edit: I don't know why i keep getting these ideas from other people whistle.gif

Getting that thing to refresh the background on the fly is very tedious! Good luck with that, I'm still trying stuff...

This post has been edited by Recreate: Oct 25 2009, 11:25 PM
Go to the top of the page
 
+Quote Post
Newly Discovered
post Oct 25 2009, 11:45 PM
Post #12


Harmonious Genius
Group Icon

Group: GMC Member
Posts: 2031
Joined: 14-October 05
From: ....Wonderland.... Pwned? Of Course
Member No.: 36998



I fixed the shadow bug and added the auto refresh.
Added a close button and added mouse restrictions to that area.
Finally, I added a fading effect when you close the widget.

download 01
Go to the top of the page
 
+Quote Post
Recreate
post Oct 25 2009, 11:49 PM
Post #13


Rocketsnail King
Group Icon

Group: GMC Member
Posts: 2374
Joined: 5-April 08
From: NULL
Member No.: 103863



Wow, That's pretty neat!
Go to the top of the page
 
+Quote Post
jsorgeagames
post Nov 1 2009, 01:24 AM
Post #14


GMC Member
Group Icon

Group: GMC Member
Posts: 364
Joined: 2-July 07
Member No.: 82619



Is there any way to make it so the window doesn't disappear while refreshing?
Go to the top of the page
 
+Quote Post
Recreate
post Nov 1 2009, 04:38 AM
Post #15


Rocketsnail King
Group Icon

Group: GMC Member
Posts: 2374
Joined: 5-April 08
From: NULL
Member No.: 103863



Well, if you read the code, No, Its impossible with what he has setup, Which is pretty much the only way to do it.
So, No.
Go to the top of the page
 
+Quote Post
Newly Discovered
post Nov 7 2009, 06:43 AM
Post #16


Harmonious Genius
Group Icon

Group: GMC Member
Posts: 2031
Joined: 14-October 05
From: ....Wonderland.... Pwned? Of Course
Member No.: 36998



if you didn't read the code as recreate instructed above, I cannot refresh the window without making it disappear first. this is because when it refreshes, it takes another screenshot of the screen, but if this widget is in the screen when it takes the screenshot, it's obviously doing what we don't want it to do, so I move it out of the screen momentarily, but the screen capture is too slow and lags too long for the user to clearly notice that the window has moved, or at least flashed. it really needs to be an instant thing but as of now, it NEEDS to disappear.

sorry this reply is late, I've been doing some life changing things lately.
Go to the top of the page
 
+Quote Post

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: 22nd November 2009 - 11:24 AM