It is currently October 19th, 2021, 3:17 pm

My First Skin Help

Help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 4069
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: My First Skin Help

Post by Yincognito »

MourningStar wrote: July 19th, 2021, 7:55 pmAnd it was appropriate, for THAT skin. This skin, however, has no animation/graphics and is quite spartan in regards to bells & whistles, as is my intent for this skin.
balala wrote: July 19th, 2021, 8:15 pmSorry, didn't realize the code is yours, however I definitely didn't talk about your code, but about the code of MourningStar's skin.
Ah, that explains it. I thought it was the exact same skin as in the other thread. My bad, please, carry on, disregard my comment. :thumbup:
User avatar
balala
Rainmeter Sage
Posts: 13324
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: My First Skin Help

Post by balala »

Yincognito wrote: July 19th, 2021, 8:24 pm Ah, that explains it. I thought it was the exact same skin as in the other thread. My bad, please, carry on, disregard my comment. :thumbup:
:thumbup:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4428
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: My First Skin Help

Post by eclectic-tech »

MourningStar wrote: July 19th, 2021, 7:55 pm And it was appropriate, for THAT skin. This skin, however, has no animation/graphics and is quite spartan in regards to bells & whistles, as is my intent for this skin. So, I think I understand balala's position in this light. Apparently, it was my skillset lack that it was left in there, as are other things that are being noted. I will try harder.

The op was for having it inspected for compliance with community standards prior to public offer. The feedback provided indicating errors or useless and missing code is, of course, warranted and needed.

Perhaps, in the end, it will not be something worth offering to the community. I still want to refine it to my liking and, if no help with the font request, will stumble and fumble my way.

-thx
MourningStar, I hope you don't mind my added the changes suggested by balala to your code:
  • Added a 'Scale' variable to [Variables] section
  • Added [CurrentTemperatureF] to 'Times' group so it is enabled when the weather webparser measure finishes
  • Disabled [CurrentTemperatureF] to remove the 'extra calc' error
  • Removed unneeded lines from [CurrentTemperatureF] measure
  • Added 'SolidColor=0,0,0,1' to [MeterTemperature] so it responds to mouse scroll actions
  • Added mouse scroll actions to change the size of the text to [MeterTemperature]
  • Removed link to obsolete 'Weather codes' from the context menu
  • Added option to use 'Custom skin menu' with a link to the normal 'skin menu
You should be able to replace your skin code with this code and have all the issues corrected.
Let us know if you have any questions or other ideas. :thumbup:

'BasicDualTemperature.ini'

Code: Select all

[Metadata]
Name=BasicDualTemperature
Author=MourningStar
Co-Authors=zivallh, Yincognito & Rainmeter Tutorial
Information=basic dual (C & F) text-only display temperature skin
Version=1.0
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,1

RightMouseUpAction=[!SkinCustomMenu]
ContextTitle=Location: [@LocationName]
ContextAction=["https://weather.com/weather/today"]
ContextTitle2=Time: [@CurrentObservationTime] [@LocationTimezoneAbbreviation]
ContextAction2=[]
ContextTitle3=Edit Weather Variables
ContextAction3=["#@#WeatherComJSONVariables.inc"]
ContextTitle4="---"
ContextAction4=[]
ContextTitle5=Change Text Color
ContextAction5=["#@#Addons\RainRGB4.exe" "VarName=FontColor" "FileName=#@#Variables.inc"]
ContextTitle6="---"
ContextAction6=[]
ContextTitle7="More Actions >>"
ContextAction7=[!SkinMenu]


[Variables]
; Include weather settings and language variables 
@Include1=#@#WeatherComJSONVariables.inc
@Include2=#@#WeatherComJSONMeasures.inc
@Include3=#@#Variables.inc
; Added 'Scale' variable used in the new mouse action bangs below 
Scale=1

--------------------------------------------------------

[CurrentTemperatureF]
; Added to 'Times' group so it is enabled when the webparser finishes
Group=Times
Measure=Calc
Formula=(([@CurrentTemperature]*9/5)+32)
DynamicVariables=1
Disabled=1

[MeterTemperature]
MeasureName=@CurrentTemperature
MeasureName2=CurrentTemperatureF
;MeasureName2=@UnitsTemperature
Meter=String
X=(10*#Scale#)R
Y=(5*#Scale#)
FontFace=#Font#
FontSize=(55*#Scale#)
FontColor=#FontColor#
StringStyle=Normal
StringAlign=Left
StringEffect=Shadow
FontEffectColor=0,0,0,50
Antialias=1
DynamicVariables=1
Text=%1°C / %2°F
; Added to change the text size by scrolling the mouse wheel up or down
SolidColor=0,0,0,1
MouseScrollUpAction=[!SetVariable Scale (Clamp(#Scale#+0.05,0.1,3))][!WriteKeyValue Variables Scale (Clamp(#Scale#+0.1,0.1,3))][!UpdateMeter MeterTemperature][!Redraw]
MouseScrollDownAction=[!SetVariable Scale (Clamp(#Scale#-0.05,0.1,3))][!WriteKeyValue Variables Scale (Clamp(#Scale#+0.1,0.1,3))][!UpdateMeter MeterTemperature][!Redraw]
MiddleMouseUpAction=[!SetVariable Scale 1][!WriteKeyValue Variables Scale 1][!UpdateMeter MeterTemperature][!Redraw]
basicdual.png
You do not have the required permissions to view the files attached to this post.
User avatar
MourningStar
Posts: 228
Joined: June 12th, 2016, 2:40 am

Re: My First Skin Help

Post by MourningStar »

eclectic-tech wrote: July 19th, 2021, 9:07 pm MourningStar, I hope you don't mind my added the changes suggested by balala to your code ...
Not at all, thank you for your contribution! :17drums I have further updated the file to include you as co-author.

question regarding mouse scroll - how does that function? I tried placing the cursor over the skin and scrolling the mouse wheel fwd & bkwd but nothing happens.
User avatar
MourningStar
Posts: 228
Joined: June 12th, 2016, 2:40 am

Re: My First Skin Help

Post by MourningStar »

... also, the context menu does not appear like your image :
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 4069
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: My First Skin Help

Post by Yincognito »

MourningStar wrote: July 19th, 2021, 9:25 pmquestion regarding mouse scroll - how does that function? I tried placing the cursor over the skin and scrolling the mouse wheel fwd & bkwd but nothing happens.
MourningStar wrote: July 19th, 2021, 9:32 pm... also, the context menu does not appear like your image :
Does this work for you?
BasicDualTemperature_1.0.1.rmskin
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 4069
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: My First Skin Help

Post by Yincognito »

dvo wrote: July 19th, 2021, 10:01 pm ...
Co-Authors=Co-Authors=zivallh, Yincognito,blalala, & Rainmeter Tutorial the whole Image
LOL, well, if he insisted on adding everyone, I was consistent with that approach... :confused:
From my part, he could very well skip me, since my contribution was minor. It's not like I'll sue him for not adding me there or anything like that - all I did was to try to help and didn't expect any "reward" for it. ;-)

P.S. For more complex stuff or actual skin ripoff though, that is to be expected. Not the case here, IMHO.
User avatar
MourningStar
Posts: 228
Joined: June 12th, 2016, 2:40 am

Re: My First Skin Help

Post by MourningStar »

Yincognito wrote: July 19th, 2021, 9:54 pm Does this work for you?
Yes!!! Image
unlike your avatar you, sir, are an angel :bow:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4428
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: My First Skin Help

Post by eclectic-tech »

Edit: Missed the msg from MourningStar, Glad you got it working... no credit needed for my part.

@dvo :D
Yeah, we don't expect credit for correcting code, just as Yincognito said... :thumbup:

@ MourningStar
From your screen shot, something must have gone wrong in your 'cut/paste'...
Try the package posted above by Yincognito which should give you everything.

The way the scroll works is by adding Mouse action bangs to [MeterTemperature] that set a new value for the 'Scale' variable, clamping it between 0.1 and 3. If you look at the code I posted you will see the mouse scroll action bangs at the end of that section.

I can lead you in the right direction, but some study of the documentation is required.
You may find performing the basic tutorials helpful to understand how measures, meters , and action bangs work.

Keep learning, it is not too difficult and will get easier the more you learn. :great:
User avatar
Yincognito
Rainmeter Sage
Posts: 4069
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: My First Skin Help

Post by Yincognito »

MourningStar wrote: July 19th, 2021, 10:23 pm Yes!!! Image
unlike your avatar you, sir, are an angel :bow:
Oh, wow, thanks! An angel... sounds, well, angelic, isn't it? 8-)
Joking aside, it was just about pasting eclectic-tech's updated code in your original skin's BasicDualTemperature.ini file, saving the file, and refreshing the skin - that's all. No big deal. ;-)
That's partially of the meaning of my avatar, actually. You know, Yin and Yang, contradiction vs complementarity, that kind of things. Apart from clearly illustrating being "incognito" (i.e. unknown), of course, and some other more or less hidden meanings.