DatMCEyeBall Posted October 22, 2013 Share Posted October 22, 2013 (edited) You probable saw the topic title and went: "Sword Art Online?, Online suggests it's a game, so uhhm, let me report it!" Or if you're a Mod:"Let me band him!!! XDXD" Joking aside, it's not a game, It's an anime. It also has some cool UI styles, which is what I made Files in a 7zip below: Release: SAO.Widgets v2.5 (Release).7z Source: SAO.Widgets v2.5 (Source).7z Previous downloads: 2.4: 496+ 1.3-1.4: 482+1.1: 11+ 1.0: 45+ Maybe I should create a UDF that allows easy creation and management of widgets/GDI+. If you have any suggestions/feedback/comments feel free to post here. To-Do: Stability patches if needed [super-extreme priority] HDD widget to swap between hard drives. [Medium priority] Maybe change widget colour scheme? [Low priority] Version history: V1.1: This script has been amended with a minor change (Using the env variable "systemdrive" instead of @HomeDrive), thanks to Wombat for finding it V1.2: Added widget specific context menu options. Small analogue clock on the clock widget now moves 12 - 24 hour toggle. V1.3 Widgets save positions on exit. Embedded fonts Minor changes to draw code. V2.4 Completely re-wrote the source code. The HDD Widget uses the WM_DEVICECHANGE message to detect new volumes and adjust the context menu in real-time. Added "LEDs" to the HDD Widget that show the current drive read/write/IO. Add a indicator to the CPU widget to show the current battery percentage. V2.5 Changed the bar styles to fit the SAO equivalent. Added a (tiny) week day indicator to the clock widget. Edited May 12, 2014 by DatMCEyeBall mesale0077 and AlmarM 2 "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted October 29, 2013 Author Share Posted October 29, 2013 For some reason the script crashes (No line number just "SAO.Widgets.exe has stopped working") after about 17 hours of run-time. Anyone else getting this? "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Wombat Posted October 29, 2013 Share Posted October 29, 2013 (edited) Very nice, very very nice! You should check the event viewer in windows... Also: #1: The widgets jump across my screen when loading or exiting the script, to their destination on the screen... #2: You should use Global Const $SYSTEMDRIVE = EnvGet('systemdrive') as mine shows up as my networked drive and not my actual hdd installed in the laptop... Edited October 29, 2013 by Wombat Just look at us.Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner The internet is our one and only hope at a truly free world, do not let them take it from us... Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted October 29, 2013 Author Share Posted October 29, 2013 #1 - That's part of the design, move the widgets randomly across your screen and hit "Reset position>All" from the menu, and watch the widgets return to their positions at the same time. If you don't like the enter and exit animations, comment out lines 151-165 and lines 345-352. #2 - Nice catch, added, see OP for download. About the crash, I fixed it. It was a small memory leak in the _Clock_Refresh() function that caused the crash after so long. There might be more, look out! "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
willichan Posted October 29, 2013 Share Posted October 29, 2013 (edited) Is there a download link for the Corel fonts? I searched their website, but could not find any font packs available for download. I suspect it is free for you to use, since you have purchased the software. For the rest of us, maybe the following might be a good substitute for personal use. http://www.1001freefonts.com/sf_digital_readout.font or maybe this one for commercial use. http://www.fontspace.com/allen-r-walden/crystal Edited October 29, 2013 by willichan My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Wombat Posted October 29, 2013 Share Posted October 29, 2013 (edited) I also made an edit to the code for people that want the 12 hour format: expandcollapse popupFunc _CLOCK_Refresh() Local $hContext, $hFormat, $hFont, $hTextBrush, $hTextBrushBlack, $CLOCK_sTime, $aInfo, $sTempText, $iHour, $sAMPM $iHour = @HOUR _GDIPlus_BitmapDispose($hImages_CLOCK) $hImages_CLOCK = _GDIPlus_BMPFromMemory(_Clock_Img()) $hContext = _GDIPlus_ImageGetGraphicsContext($hImages_CLOCK) _GDIPlus_GraphicsSetSmoothingMode($hContext, 2) $hFormat = _GDIPlus_StringFormatCreate() $hFont = _GDIPlus_FontCreate($hLcdFontFamily, 20.5, 0, 3) $hTextBrush = _GDIPlus_BrushCreateSolid($CLOCK_iBrushCols[0][0]) $hTextBrushBlack = _GDIPlus_BrushCreateSolid($CLOCK_iBrushCols[0][1]) If $iHour>12 Then $sAMPM=" PM" Else $sAMPM=" AM" EndIf If $iHour>12 Then $iHour=$iHour-12 If $iHour=0 Then $iHour=12 If $sAMPM=" AM" Then $iHour=StringTrimLeft($iHour, 1) $CLOCK_sTime = $iHour & ":" & @MIN & ":" & @SEC & $sAMPM $aInfo = _GDIPlus_GraphicsMeasureString($hContext, $CLOCK_sTime, $hFont, _GDIPlus_RectFCreate(31, 10, 0, 0), $hFormat) _GDIPlus_GraphicsDrawStringEx($hContext, $CLOCK_sTime, $hFont, $aInfo[0], $hFormat, $hTextBrushBlack) $aInfo = _GDIPlus_GraphicsMeasureString($hContext, $CLOCK_sTime, $hFont, _GDIPlus_RectFCreate(30, 9, 0, 0), $hFormat) ControlMove($hGUI_CLOCK, "", $CLOCK_PlaceholderLables[0], DllStructGetData($aInfo[0], 1), DllStructGetData($aInfo[0], 2), DllStructGetData($aInfo[0], 3) + 1, DllStructGetData($aInfo[0], 4) + 1) _GDIPlus_GraphicsDrawStringEx($hContext, $CLOCK_sTime, $hFont, $aInfo[0], $hFormat, $hTextBrush) _GDIPlus_FontDispose($hFont) _GDIPlus_BrushDispose($hTextBrush) _GDIPlus_BrushDispose($hTextBrushBlack) $hFont = _GDIPlus_FontCreate($hSAOFontFamily, 17, 0, 3) $hTextBrush = _GDIPlus_BrushCreateSolid($CLOCK_iBrushCols[1][0]) $hTextBrushBlack = _GDIPlus_BrushCreateSolid($CLOCK_iBrushCols[1][1]) $sTempText = _GetMonthAbb() & " " & @MDAY $aInfo = _GDIPlus_GraphicsMeasureString($hContext, $sTempText, $hFont, _GDIPlus_RectFCreate(126, 9, 0, 0), $hFormat) _GDIPlus_GraphicsDrawStringEx($hContext, $sTempText, $hFont, $aInfo[0], $hFormat, $hTextBrushBlack) $aInfo = _GDIPlus_GraphicsMeasureString($hContext, $sTempText, $hFont, _GDIPlus_RectFCreate(125, 8, 0, 0), $hFormat) ControlMove($hGUI_CLOCK, "", $CLOCK_PlaceholderLables[1], DllStructGetData($aInfo[0], 1), DllStructGetData($aInfo[0], 2), DllStructGetData($aInfo[0], 3) + 1, DllStructGetData($aInfo[0], 4) + 1) _GDIPlus_GraphicsDrawStringEx($hContext, $sTempText, $hFont, $aInfo[0], $hFormat, $hTextBrush) _GDIPlus_BrushDispose($hTextBrush) _GDIPlus_BrushDispose($hTextBrushBlack) _GDIPlus_FontDispose($hFont) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_GraphicsDispose($hContext) SetBitmap($hGUI_CLOCK, $hImages_CLOCK, 255) EndFunc ;==>_CLOCK_Refresh EDIT: added AM/PM as well Edited October 31, 2013 by Wombat Just look at us.Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner The internet is our one and only hope at a truly free world, do not let them take it from us... Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted October 30, 2013 Author Share Posted October 30, 2013 Actually that should be $iHour and $sAMPM (i for integer, s for string) to match the rest of the code. "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Wombat Posted October 31, 2013 Share Posted October 31, 2013 (edited) edited per Hungarian Notation. I was simply using the "c" to represent "current" which i apologise, as it's my little thing I do in my mind while coding. If the variable name is two words i use the first letter of the first word infront of the second word... my apologies. Edited October 31, 2013 by Wombat Just look at us.Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner The internet is our one and only hope at a truly free world, do not let them take it from us... Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted October 31, 2013 Author Share Posted October 31, 2013 Ah, well that's fine. Do you want me to include an option to switch the clock between 24 and 12 hour modes? "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Wombat Posted October 31, 2013 Share Posted October 31, 2013 I was actually going to do that edit next, but if you would that would be awesome, preferebly in the righ-click menu for the wrench button. Just look at us.Everything is backwards; everything is upside down. Doctors destroy health. Lawyers destroy justice. Universities destroy knowledge. Governments destroy freedom. The major media destroy information and religions destroy spirituality. ~ Michael Ellner The internet is our one and only hope at a truly free world, do not let them take it from us... Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted November 1, 2013 Author Share Posted November 1, 2013 @willichan - http://apps.corel.com/ms/cgsx3/1731/extras.html I got the fonts when I got corel X3 in 2006 as a present, had then lying around and thought I'd use them somewhere. I used my new shiny X6 version to create the images for the widgets. See OP for update, click on the icons on the widgets (For the HDD one it's the windows icon, for the clock it's the miniature analogue clock) to bring up a "widget specific" context menu. "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
willichan Posted November 2, 2013 Share Posted November 2, 2013 @willichan - http://apps.corel.com/ms/cgsx3/1731/extras.html I got the fonts when I got corel X3 in 2006 as a present, had then lying around and thought I'd use them somewhere. I used my new shiny X6 version to create the images for the widgets. That was what I thought. The fonts are free for you to use because you bought Corel X3. The rest of us will need to either buy X3 or use other fonts. Feel free to post the links I provided in the OP for others to use. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted November 3, 2013 Author Share Posted November 3, 2013 So I should remove my LCD font from the archive and replace it with one of the ones you provided? Or just update the OP with the links? Or remove my LCD font from the archive and update the OP with the links? "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
willichan Posted November 3, 2013 Share Posted November 3, 2013 Since the license does not include re-distribution, you should probably remove the font from the archive. I showed this to my son, by the way, and he loves it. He has a Sword Art Online card deck he plays with. (Not sure of the game. I don't follow that closely.) My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted November 3, 2013 Author Share Posted November 3, 2013 Updated the OP with the "Crystal" font because it closely resembles the "LcdD" font. "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
UEZ Posted November 3, 2013 Share Posted November 3, 2013 (edited) Look here how to load an embedded TTF to GDI+: '?do=embed' frameborder='0' data-embedContent>> On exit the positions are not saved. Br, UEZ Edited November 3, 2013 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted November 4, 2013 Author Share Posted November 4, 2013 Fixed. "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted March 2, 2014 Author Share Posted March 2, 2014 Completely re-wrote the source code from scratch, removing the annoying 23-hours-crash bug! V2.4 Completely re-wrote the source code. The HDD Widget uses the WM_DEVICECHANGE message to detect new volumes and adjust the context menu in real-time. Added "LEDs" to the HDD Widget that show the current drive read/write/IO. Add a indicator to the CPU widget to show the current battery percentage. "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Sori Posted March 3, 2014 Share Posted March 3, 2014 I would suggest a taskbar icon that allows you to exit the program. Also an option to choose which widgets you want to use. If you need help with your stuff, feel free to get me on my Skype. I often get bored and enjoy helping with projects. Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted March 4, 2014 Author Share Posted March 4, 2014 (edited) Also an option to choose which widgets you want to use. Why? EDIT: Thinking of adding the "Hide/Show" option to all 5 context menus. Anyone? I would suggest a taskbar icon that allows you to exit the program. What's wrong with the current "wrench" button? Edited March 13, 2014 by DatMCEyeBall "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now