It is currently June 23rd, 2024, 5:06 am

@include and relative positioning

General topics related to Rainmeter.
User avatar
JamesAC
Developer
Posts: 318
Joined: July 14th, 2009, 5:57 pm

Re: @include and relative positioning

Post by JamesAC »

Not possible at the moment, but it is an interesting idea.
+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
Quis custodiet ipsos custodes?
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: @include and relative positioning

Post by dragonmage »

This technically could work so long as all the @Includes are listed one after another in the skin without meters in the skin between them. If you use the [Rainmeter] section to create your background then place all your meters in your @includes sequentially at the bottom of the ini you should be good. Put all these in the same folder and load it.


IncludeTest.ini

Code: Select all

[Rainmeter]
BackgroundMode=2
SolidColor=0,0,0,180
DynamicWindowSize=1

[Variables]
Inc1=INC.inc
Inc2=INC2.inc
Inc3=INC3.inc

@Include=#CURRENTPATH##Inc1#
@Include2=#CURRENTPATH##Inc2#
@Include3=#CURRENTPATH##Inc3#
INC1.inc

Code: Select all

[Image1]
Meter=IMAGE
SolidColor=255,255,255,200
X=5
Y=5
W=50
H=50

[String1]
Meter=String
SolidColor=255,255,255,255
FontColor=0,0,0,255
FontSize=12
Text=@Includes.
StringAlign=CENTER
X=30
Y=10R
W=50
H=20
ClipString=1
INC2.inc

Code: Select all

[Image2]
Meter=IMAGE
SolidColor=255,255,255,200
X=30r
Y=5
W=200
H=50
INC3.inc

Code: Select all

[Image3]
Meter=IMAGE
SolidColor=255,255,255,200
X=5R
Y=5
W=50
H=50
Your dock should be possible.
User avatar
Jkon
Posts: 185
Joined: December 4th, 2009, 2:05 am

Re: @include and relative positioning

Post by Jkon »

Currently,in the actual skin I'm working on,i do have the image meter with the strings in the inc files and as long as i keep any needed measure's in between strings,the chain of relative positioning can be kept.Unfortunately the dock is a bit more complex then the simple example from above with options to have the dock run vertically,so with multiple font sizes in some of the inc files,the y relative gets complicated.also each dock has a visible master button which can be placed in several positions on a dock,so the whole relative positioning thing becomes a bit of a nightmare.An picture would probably explain this a lot better.
Image
User avatar
Jkon
Posts: 185
Joined: December 4th, 2009, 2:05 am

Re: @include and relative positioning

Post by Jkon »



In the image above you can see multiple launch docks,each one is the same but modified using the settings config in the center of the screen,changing orientation,number of items on the dock etc.I'm trying to create a similar setup for the various tabs at the top and bottom right of the screeny,the idea being the user can set how many tabs they want on the dock and then choose which tabs they want and where they want them on the dock.Having a settings config write the variable for each tabs @include is no problem,my problem is telling the dock where to place the meters that are in each include,or atleast where the first meter(the tab) in each goes.
Image
crish29
Posts: 36
Joined: February 1st, 2011, 6:35 pm

Re: @include and relative positioning

Post by crish29 »

very nice skin.,
User avatar
jsmorley
Developer
Posts: 22640
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: @include and relative positioning

Post by jsmorley »

Nice job on the graphics. Very creative!
dragonmage
Developer
Posts: 1270
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: @include and relative positioning

Post by dragonmage »

Yes, that is a bit more complex, but I think still possible if you convert all elements of your dock to individual .inc files. Then if you can intelligently determine which elements (@Includes) are currently written into the ini file and insert new elements into the correct position within the .ini. It may help you to know that @Includes do not require a numeric identifier. You only need @Include the rest before the = can be more descriptive.

@Include=#CURRENTPATH##Inc1#
@Include.Dock.Item.Left.2=#CURRENTPATH##Inc2#
@Include.Dock.Item.Left.3=#CURRENTPATH##Inc3#
User avatar
Jkon
Posts: 185
Joined: December 4th, 2009, 2:05 am

Re: @include and relative positioning

Post by Jkon »

Cheers Js,but i cant take credit for it,i just recreated the image from the header at http://www.blendercookie.com/.actually,every building and hill is an individual skin,i'm trying to create a kinda interactive desktop,with many of the props functioning as a skin,the antenna on the tower show net in and out on mouse over,theres a tower crane like my avatar that album art work hangs from and moves back and forth,the clouds will change depending on the weather forcast and i'm trying to get the whole lot to darken as sunset approaches and the windows in the buildings to light up.it's all just for shitz and giggles cause it's an absolute memory hog. :D
Image
User avatar
jsmorley
Developer
Posts: 22640
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: @include and relative positioning

Post by jsmorley »

Jkon wrote:Cheers Js,but i cant take credit for it,i just recreated the image from the header at http://www.blendercookie.com/.actually,every building and hill is an individual skin,i'm trying to create a kinda interactive desktop,with many of the props functioning as a skin,the antenna on the tower show net in and out on mouse over,theres a tower crane like my avatar that album art work hangs from and moves back and forth,the clouds will change depending on the weather forcast and i'm trying to get the whole lot to darken as sunset approaches and the windows in the buildings to light up.it's all just for shitz and giggles cause it's an absolute memory hog. :D
Sometimes it's fun just building it...

I did this as a CPU meter after all...
2-11-2011 2-01-31 PM.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
Jkon
Posts: 185
Joined: December 4th, 2009, 2:05 am

Re: @include and relative positioning

Post by Jkon »

dragonmage wrote:Yes, that is a bit more complex, but I think still possible if you convert all elements of your dock to individual .inc files. Then if you can intelligently determine which elements (@Includes) are currently written into the ini file and insert new elements into the correct position within the .ini. It may help you to know that @Includes do not require a numeric identifier. You only need @Include the rest before the = can be more descriptive.

@Include=#CURRENTPATH##Inc1#
@Include.Dock.Item.Left.2=#CURRENTPATH##Inc2#
@Include.Dock.Item.Left.3=#CURRENTPATH##Inc3#
that may actually help me stay atleast a little bit sane :D

At the moment i have it like this:

In the dock file under variables

style=H
master=L

Inc01=clock
inc02=weather
Inc03=power (and so on up to inc08)

@include=#currentpath##style#_#master#
@include1=#currentpath##Inc01#.inc
@include2=#currentpath##Inc02#.inc (and so on)

"@include=#currentpath##style#_#master#" contains just x and y variables for a horizontal dock i.e

x01=0
y01=0

x02=200
y02=0

the first meter (the tab image) in each subsequent @include then reads the variable to position it,but this means i need 3 writekeyvalue bangs for enabling each available tab and 3 more for disabling it.It is easily done i suppose,i just thought there be a neater(less code method) of doing it as there is a phenomenal amount of writekeyvalue bangs involved in the docks settings.
Image