It is currently September 21st, 2019, 1:43 am

Gadgets 5.1.0 - inspired by AddGadgets.com Sidebar Gadgets

Post your work-in-progress and completed skins to share and discuss.
TGonZo
Posts: 58
Joined: April 25th, 2015, 8:19 pm
Location: Virginia

Re: Gadgets 1.6.0 - inspired by AddGadgets.com Sidebar Gadge

TGonZo » August 8th, 2015, 3:31 pm

@SilverAzide, I've looked at the CalendarScript.lua for quite awhile, and I think I have basic understanding of how it is working.

Maybe Smurfier can weigh in, as it is his script. Maybe he can help.

For a high level plan to get tooltips to scale, it looks like to me, you would create another calendar after the one there is there, and move the tooltips to it with transparent image only, no strings or dates. That way you can scale the X,Y,H,W for the mouseovers instead of using the matrix.

With that said, it is not a quick and easy fix. You would probably have to create another full set of days in the Calendar.ini file, and a new TextStyle without the TransformationMatrix but with a means to reference the first calendar X,Y,H,W to scale it in the CalendarStyles.inc. It looks like the loop that creates all the days of the month is the Meter loop in the Draw function. There may be a bit more to it, but duplicating the Meter loop without the dates and creating the transparent overlay with tooltips only, sounds like the way to go.

I'm not sure how much you have looked into this script yet, or how much of this makes any sense. It looks doable, just a fair about of work to get it right.

Well, that's my 2 cents. It's always fun trying to understand someone else's code.
User avatar
SilverAzide
Posts: 575
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 1.6.0 - inspired by AddGadgets.com Sidebar Gadge

SilverAzide » August 8th, 2015, 11:25 pm

Hi @TGonZo,
I poked around in the script a little bit too and came to the same conclusion. I think I might have sprained a few brain cells looking at that stuff. :) I'll try to tackle it later I guess, it may take me a while though.
DeviantArt Gadgets More...
TGonZo
Posts: 58
Joined: April 25th, 2015, 8:19 pm
Location: Virginia

Re: Gadgets 1.6.0 - inspired by AddGadgets.com Sidebar Gadge

TGonZo » August 8th, 2015, 11:29 pm

LOL, I hear ya, but I plowed through it. Check your Private Messages.
User avatar
SilverAzide
Posts: 575
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 1.6.0 - inspired by AddGadgets.com Sidebar Gadge

SilverAzide » August 9th, 2015, 5:03 pm

Hi TGonZo,
This is AWESOME! Thanks a ton! I did get the 3 attachments you sent yesterday and I will incorporate them in the next release, hopefully soon. I am so grateful you decided to dig into that code... I was looking forward to it like a trip to the dentist, LOL.

If you sent more than two emails, I might have missed one. I just have two in my inbox today. I will double check to make sure I didn't overlook something. I sent you a reply, but it seems stuck in my Outbox.

Thanks!!
DeviantArt Gadgets More...
User avatar
jsmorley
Developer
Posts: 19467
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Gadgets 1.6.0 - inspired by AddGadgets.com Sidebar Gadge

jsmorley » August 9th, 2015, 5:07 pm

SilverAzide wrote:I sent you a reply, but it seems stuck in my Outbox.
In the forum, things stay in visible in your Outbox until they are "read". Well, technically until the recipient opens their private messages page.

The advantage to this is that you can edit or delete a message you "send" up until the time they are read.
User avatar
SilverAzide
Posts: 575
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 1.7.0 - inspired by AddGadgets.com Sidebar Gadge

SilverAzide » August 12th, 2015, 10:40 am

For v1.7.0:
Added GPU Meter gadget.
Added "All CPU Meter (for HWiNFO)" gadget variant.
Corrected scaling issues with Calendar gadgets (thanks to TGonZo)
DeviantArt Gadgets More...
seglea
Posts: 1
Joined: August 15th, 2015, 11:54 pm

Re: Gadgets 1.7.0 - inspired by AddGadgets.com Sidebar Gadge

seglea » August 16th, 2015, 12:02 am

Thank you very much for these excellent skins - I was hunting for exactly this. A small request... any chance of getting a setting on the weather meter to put dates and times into locale-appropriate format (in my case dd/mm/yy and 24h clock)? But if that's something you don't want to bother with, say so, and I'll try to figure out how to do it myself.
User avatar
SilverAzide
Posts: 575
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 1.7.0 - inspired by AddGadgets.com Sidebar Gadge

SilverAzide » August 16th, 2015, 4:21 pm

Seglea, glad you like them! For the dates and times, these are all coming from weather.com, so they are in U.S. English format. To convert, I think you'd need to do a bunch of regex string formatting to convert the times into your locale's format. I think I've seen some skins that do this (12h to 24h), so it would just be a matter of extending the translations that already are present for the language. I will look into adding this into the next release if I can.
DeviantArt Gadgets More...
User avatar
fonpaolo
Moderator
Posts: 1343
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Gadgets 1.7.0 - inspired by AddGadgets.com Sidebar Gadge

fonpaolo » August 16th, 2015, 4:52 pm

For the date, use this as substitution:

Code: Select all

"(\d+)/(\d+)/(\d+)":"\2/\1/20\3"
if year has only two digits, or:

Code: Select all

"(\d+)/(\d+)/(\d+)":"\2/\1/\3"
if year has four digits.

For the 12/24 hours change, edit the time measure:

Code: Select all

[MeasureHour]
Measure=Time
Format=#TimeSet#
Use:

Code: Select all

TimeSet=%#H
for 24 hours;

Use:

Code: Select all

TimeSet=%#I
for 12 hours.
Then, disable the AM/PM measure and corresponding meter (maybe with a variable for both).

In this way, if you want to change back from 24 to 12 hours, you need only to change a pair of variables.
TGonZo
Posts: 58
Joined: April 25th, 2015, 8:19 pm
Location: Virginia

Re: Gadgets 1.7.0 - inspired by AddGadgets.com Sidebar Gadge

TGonZo » August 16th, 2015, 11:50 pm

Not sure if this will be helpful, but it looks like the Weather.com url will accept a Locale variable. I see it changing some of the data fields in the output. Check it out.

http://wxdata.weather.com/wxdata/weather/local/FRXX0076?cc&dayf=5&unit=&locale=fr_FR

I found a page that listed a few different Locales that seem to work with this.
https://docs.bolt.cm/locales

en_US English
it_IT Italian
es_ES Spanish
fr_FR French
de_DE German
ru_RU Russian