It is currently September 29th, 2024, 3:24 pm

Rendering problems on too many skin !Refresh

General topics related to Rainmeter.
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Rendering problems on too many skin !Refresh

Post by rbriddickk84 »

Greetings!

I finally finished my skin graphics and my button sidebar coding.
I have a buttons sidebar, and a preferences window and an .inc file, where i store the numbers of the buttons on the sidebar.
My sidebar aligned on the left and vertically middle of the screen from code.
On my preferences.ini there is a "+" and a "-" button, where you can add or take buttons on the sidebar.
The problem is if i click on + or - too often, on every click there is a "Refresh sidebar" action, and a strange "jumping" effect is occour.
I try to describe it: click on + twice and fast, the sidebar appearing for a moment at the origo of the screen, and after that the sidebar will in the correct position.
If i do this faster and more often, then always appears first on the left upper corner, then at the correct position.
Is there a way to get a variable from an .inc file without full skin refresh?
User avatar
Mordasius
Posts: 1178
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Rendering problems on too many skin !Refresh

Post by Mordasius »

I don't understand exactly what you are trying to do, but I don't think you should need to do a !Refresh just to update a few variables. Have you tried using the !Update or !Redraw Bangs?

Don't forget that you can update individual measures or meters using !UpdateMeasure or !UpdateMeter.
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Rendering problems on too many skin !Refresh

Post by rbriddickk84 »

Mordasius wrote:I don't understand exactly what you are trying to do, but I don't think you should need to do a !Refresh just to update a few variables. Have you tried using the !Update or !Redraw Bangs?

Don't forget that you can update individual measures or meters using !UpdateMeasure or !UpdateMeter.
Thanks for your reply. Here is the short version:
There is "a.ini" and "b.ini" files and a "tmp.inc" file.
With "a.ini" i displaying rectangles.
With "b.ini" i change the number of rectangles displayed by "a.ini".
The number of rectangles are stored in the "tmp.inc" file, and every time i change the number with "b.ini", i have to refresh the "a.ini" to get the new data from "tmp.inc" file.

Is there a way, if i could tell from "b.ini" to refresh or update a single Measure or Meter in "a.ini"?
User avatar
Mordasius
Posts: 1178
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Rendering problems on too many skin !Refresh

Post by Mordasius »

Ok. Now things are a little clearer but I still don't see why you need to have the number of rectangles to be displayed in a seperate tmp.inc file. You can change variables in a.ini from b.ini using something like

[!SetVariable Number_Rectangles "3" "#ROOTCONFIG#\Buttons"]

Assuming that a.ini is in the 'Buttons' sub-folder and loaded, the new value of Number_Rectangles will be used by all measures and meters with DynamicVariables=1. If you want to make the change permanent, you can add

[!WriteKeyValue Variables Number_Rectangles "3" "#ROOTCONFIG#\Buttons\a.ini]

The new Number_Rectangles will be used next time a.ini is loaded or refreshed.

You can also Show or Hide meters in a.ini from b.ini using

[!ShowMeter Button_3 "#ROOTCONFIG#\Buttons"]

You can update a single meter in a.ini from b.ini using something like

[!UpdateMeter "Button_3" "#ROOTCONFIG#\Buttons"]

Basicaly, all the Meter bangs and Measure bangs can be called by one skin to act on another skin using the optional Config parameter. The bit that often trips me up is deciding what to put as the Config. I find the easiest way is to load the skin where I want the !bang to take effect then right-click on the skin, the name in bold at the top of the menu is what you need to use as the Config.

If you've got all your skins in sub-folders of 'MyWizardLauncher' you'll find that #ROOTCONFIG# will give you the 'MyWizardLauncher' bit, all you have to do is add the name of the folder containing a.ini
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Rendering problems on too many skin !Refresh

Post by rbriddickk84 »

I modified all my ini files, but it seems the !SetVariable works directly between the ini files.
But the !WriteKeyValue doesn't change the variable.
I use in one action both [!SetVariable...] and [!WriteKeyValue...]
User avatar
Mordasius
Posts: 1178
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Rendering problems on too many skin !Refresh

Post by Mordasius »

rbriddickk84 wrote:But the !WriteKeyValue doesn't change the variable.
Changes made by !WriteKeyValue only take effect the next time the skin is loaded or refreshed.

Changes made by !SetVariable are immediate but only in those measures and meters with the setting DynamicVariables=1
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Rendering problems on too many skin !Refresh

Post by rbriddickk84 »

Mordasius wrote: Changes made by !WriteKeyValue only take effect the next time the skin is loaded or refreshed.

Changes made by !SetVariable are immediate but only in those measures and meters with the setting DynamicVariables=1
I know that. As i testing my skins, my *.ini files are opened in Notepad++, and instantly notify me as something were modified in the documents.
That's why i use both method, first i change the var in the memory with !Set..., and i would change the same variable permanently with !WriteKey, if there were refresh.
I putted DynamicVariables=1 as you wrote the first time.
User avatar
Mordasius
Posts: 1178
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Rendering problems on too many skin !Refresh

Post by Mordasius »

You're welcome.
User avatar
rbriddickk84
Rainmeter Sage
Posts: 276
Joined: February 17th, 2014, 12:39 pm
Location: Hungary

Re: Rendering problems on too many skin !Refresh

Post by rbriddickk84 »

Mordasius wrote:You're welcome.
Sorry, if you take my words as offence, i don't wanted to!
I am not a professional programmer, but i looked after the basics of Rainmeter. Of course sometimes if i tired i made some silly mistakes.
Anyway, thank you very much to trying to help, i just wanted to tell that some part of the code are worked, some are not.
But thanks anyway, and sorry again!