It is currently April 27th, 2024, 1:44 pm

[Suggestion] #PREVIOUSSECTION#

Report bugs with the Rainmeter application and suggest features.
User avatar
thatsIch
Posts: 446
Joined: August 7th, 2012, 9:18 pm

[Suggestion] #PREVIOUSSECTION#

Post by thatsIch »

Hey,


we all now how awesome the build-in variables can be, used in meterstyles like
#CURRENTSECTION#

it can reduce the amount of code by a multiple fold and increase with that the readibility and recyclability of the code. Now we even now the use of "R" and "r" for relative positioning, but what about having stuff like
#PREVIOUSSECTION#

often you write something in combination and repetitive times like

Code: Select all

[Measure1]
Measure = Plugin
Plugin = X

[Meter1]
Meter = String
MeasureName = Measure1

[Measure2]
Measure = Plugin
Plugin = X

[Meter2]
Meter = String
MeasureName = Measure2

...
which could be "simplified" (maybe not here too much cause example too simple lol) with

Code: Select all

[MeterStyle]
MeasureName = #PREVIOUSSECTION#

[Measure1]
Measure = Plugin
Plugin = X

[Meter1]
Meter = String
MeterStyle = MeterStyle

[Measure2]
Measure = Plugin
Plugin = X

[Meter2]
Meter = String
MeterStyle = MeterStyle

...
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: [Suggestion] #PREVIOUSSECTION#

Post by KreAch3R »

I don't know if I like this suggestion, but if you want to do something like that right now, you can combine #CURRENTSECTION# with something else, to make it simpler. Example:

Code: Select all

[mCPU1]
Measure=CPU

[mCPU2]
Measure=CPU

[Style]
MeasureName=m#CURRENTSECTION#

[CPU1]
Meter=STRING
MeterStyle=Style

[CPU2]
Meter=STRING
MeterStyle=Style
I use "m" for "measure", so that way works for me.
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
User avatar
Brian
Developer
Posts: 2686
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: [Suggestion] #PREVIOUSSECTION#

Post by Brian »

@thatsIch: IMO, an option like #PreviousSection# could introduce a lot of problems, and I don't think we want to introduce a confusing built-in variable like that. Plus, most authors organize their skins in a Variables, Measures, Meters fashion usually not mixing measures with meters.

I will say that we are in early discussions on upgrading our relative position options. This does not mean we are going to change anything, just entertaining an idea....

@KreAch3r: Very clever idea!

-Brian
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: [Suggestion] #PREVIOUSSECTION#

Post by KreAch3R »

Brian wrote: @KreAch3r: Very clever idea!
Thank you! :)
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: [Suggestion] #PREVIOUSSECTION#

Post by MerlinTheRed »

With section variables, this really isn't needed. I think even the "r" and "R" are not very elegant (although short) and I'm happy that I can replace it with section variables now.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
thatsIch
Posts: 446
Joined: August 7th, 2012, 9:18 pm

Re: [Suggestion] #PREVIOUSSECTION#

Post by thatsIch »

MerlinTheRed wrote:With section variables, this really isn't needed. I think even the "r" and "R" are not very elegant (although short) and I'm happy that I can replace it with section variables now.
I know not much is very needed,
but it make things shorter and seperates better the data/display from its style

but I like the idea of Krecher very much, though its just a "bad hack" ^^
but really smart,
dude where were you hiding all time ;-)