Desktop Widget Example!, Not the best, but it's a start! And very cool! |
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!
![]() ![]() |
Desktop Widget Example!, Not the best, but it's a start! And very cool! |
Oct 24 2009, 07:53 AM
Post
#1
|
|
|
Harmonious Genius Group: GMC Member Posts: 2031 Joined: 14-October 05 From: ....Wonderland.... Pwned? Of Course Member No.: 36998 |
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 |
|
|
|
Oct 24 2009, 12:00 PM
Post
#2
|
|
|
Grey Gamer Group: GMC Member Posts: 41 Joined: 3-September 09 From: London, England Member No.: 138937 |
What is this widget supposed to do?
|
|
|
|
Oct 24 2009, 12:27 PM
Post
#3
|
|
|
GMC Member Group: GMC Member Posts: 45 Joined: 6-June 08 From: somwhere in the USA Member No.: 108349 |
|
|
|
|
Oct 24 2009, 12:40 PM
Post
#4
|
|
|
Rockhillgames 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
|
|
|
|
Oct 24 2009, 10:12 PM
Post
#5
|
|
|
Yesterdays games 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
|
|
|
|
Oct 24 2009, 10:15 PM
Post
#6
|
|
|
Loogster Group: GMC Member Posts: 320 Joined: 7-June 09 Member No.: 134665 |
Doesnt work on vista very well. RELY buggy and odd.
|
|
|
|
Oct 24 2009, 11:04 PM
Post
#7
|
|
|
GMC Member 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.
|
|
|
|
Oct 25 2009, 12:29 AM
Post
#8
|
|
|
Loogster 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 |
|
|
|
Oct 25 2009, 04:12 PM
Post
#9
|
|
|
GMC Member 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.
|
|
|
|
Oct 25 2009, 10:37 PM
Post
#10
|
|
|
Harmonious Genius Group: GMC Member Posts: 2031 Joined: 14-October 05 From: ....Wonderland.... Pwned? Of Course Member No.: 36998 |
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. nice, i like it. Very unique idea. 10/10 Thanks, it just came to me.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. 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. 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). I am working on a screen saver and am useing one,here. Also thanks for the link, I'll check it out.http://gmc.yoyogames.com/index.php?showtopic=451140 edit that's exactly what I'm using, but in .gex form. 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 |
|
|
|
Oct 25 2009, 10:45 PM
Post
#11
|
|
|
Rocketsnail King 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 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 ![]() 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 |
|
|
|
Oct 25 2009, 11:45 PM
Post
#12
|
|
|
Harmonious Genius 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 |
|
|
|
Oct 25 2009, 11:49 PM
Post
#13
|
|
|
Rocketsnail King Group: GMC Member Posts: 2374 Joined: 5-April 08 From: NULL Member No.: 103863 |
Wow, That's pretty neat!
|
|
|
|
Nov 1 2009, 01:24 AM
Post
#14
|
|
|
GMC Member 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?
|
|
|
|
Nov 1 2009, 04:38 AM
Post
#15
|
|
|
Rocketsnail King 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. |
|
|
|
Nov 7 2009, 06:43 AM
Post
#16
|
|
|
Harmonious Genius 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. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd November 2009 - 11:24 AM |