Commit Graph

17 Commits

Author SHA1 Message Date
jsmorley
fd9cac7add Change by MattKing to the MouseActionCursor feature. The user can now set MouseActionCursor=0 in the [Rainmeter] section of the skin, and the change of the cursor to the hand when over mouse action meters will be disabled for the entire skin. This can be overridden on a meter-by-meter basis with MouseActionCursor=1.
Added this change to the Meters.htm help file.
2009-10-30 18:15:13 +00:00
Kimmo Pekkola
0b4ba32924 Added cache for the fonts.
Fixed a memory leak in the string meter.
Changed the library project to use precompiled headers.
2009-10-07 16:45:14 +00:00
spx
3afe01569c Broken backwards compatibility was fixed.
([Measure] contained in Action in Measure and Meter are not replaced when reading skins. They are replaced only when executing action.)
2009-10-01 03:13:19 +00:00
spx
f6f293cc57 Minor tweaks of "hand pointer". 2009-09-26 07:16:55 +00:00
jsmorley
5560d6e72a Added MattKing's code to enable the standard "hand pointer" mouse cursor when you hover over a meter with any "MouseAction" on it or a button.
This behavior is ON by default.  If you do not want the cursor change on a meter or button, set MouseActionCursor=0 on the Meter or button.

Example of disabling mouse cursor change:

[Meter]
Meter=Image
W=100
H=100
SolidColor=0,0,0,255
LeftMouseUpAction=!Execute ["http://rainmeter.net"]
MouseActionCursor=0

Note: If you have a button with a meter (either image or text) on TOP of it, you will need to set MouseActionCursor=0 on the image/text meter even if it doesn't have a mouse action, or the button will not change cursors.
2009-09-25 22:20:07 +00:00
jsmorley
48bee2c6fe 1) Added MattKing's code for supporting the middle mouse button in [Rainmeter] and [MeasureName].
MiddleMouseUpAction | MiddleMouseDownAction

2) Updated the manual entries for the middle mouse functionality

3) Added  spx268's code to fix a problem with BUTTON and dynamic variables addressed in:

http://code.google.com/p/rainmeter/issues/detail?id=108
2009-09-07 16:37:58 +00:00
Kimmo Pekkola
8eccc8ddec Got rid of the "Not a meter or measure" error.
The handling of the MeterStyle is now done in the CConfigParser.
2009-09-04 17:40:02 +00:00
Kimmo Pekkola
4bf4e51126 Reverted the changes from r209. 2009-09-04 16:37:51 +00:00
jsmorley
8239919333 Added MeterStyle functionality:
Rainy, given the "issues" listed at the bottom of this comment, I leave it to you whether to create a build using this revision or use r208 for the build.  I would like to start testing MeterStyle, but there are a few more things it needs work on.

What is MeterStyle?

MeterStyle
This will allow users to create CSS-like "Styles" for meters. This means that all the parameters of a meter can be defined in the style, and then many meters can use the style to eliminate copy / pasting the same parameters over and over on multiple meters. (Examples: FontColor=, FontSize= etc.)

How do I use it?

You will create a new [Section] (as many as you want) in the .ini. The section(s) can have any name.

[MyStringStyle]

Then you will tell Rainmeter that this is a "MeterStyle" and not a measure or meter

Style=Meter

Note: The "value" of the key "Style" can be anything. It can be used to add a description of the style if you like. Style=This style is for the AccuWeather part of this skin
It is however required, both to tell Rainmeter it is not a meter or measure and to have the MeterStyle routines parse it.

Then you define parameters you want to use in the style

FontColor=#FontColor#
FontFace=TheSansBold-Caps
FontSize=11
StringEffect=SHADOW
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1

Then in any or all meters, you just use

[MeterName]
Meter=STRING (or any other meter type)
MeterStyle=MyStringStyle

None of the parameters in the style are then required to be actually in the meter(s). They are "inherited" from the MeterStyle.

Note: This works and has had preliminary testing with dynamic variables like FontColor=[MeasureName] and regular variables like FontColor=#FontColor#. It doesn't matter if the [Variables] section or the [MeasureName] measure is before or after the [StyleName] in the .ini file.

What if I want to override a MeterStyle parameter on a meter?

Sure. Just put in any parameter with a value different from the one defined in the MeterStyle and the one in the meter will take presidence. All non-defined parameters will still use the MeterStyle value.

[MeterName]
Meter=STRING
MeterStyle=MyStringStyle
FontColor=100,100,100,50

What are these "known issues" you are on about?

This is still a bit of a work in progress. Right now you cannot define X or Y in a style. You can define W and H, but NOT for a STRING meter. You cannot define a "Transformation Matrix" in a style. MattKing will be looking into these tomorrow. W and H in a string meter is our top priority. We will also look at X and Y and hope for an easy solution. Transformation Matrix may have to come later.
2009-09-04 14:48:28 +00:00
Kimmo Pekkola
c6fdbf7b60 Dynamic variables can be used to change the font in the string Meter.cpp.
Removed the error message if the meter's dimensions are 0.
2009-08-27 17:05:10 +00:00
Kimmo Pekkola
dc3c767efa It's now possible to use the measures as if they were variables (use [MeasureName] instead #VariableName#). Set DynamicVariables=1 for all meters and measures which refer to other measures.
New bang !RainmeterSetVariable can be used to change the value of a variable (DynamicVariables must be 1 in places where the variable is used).
2009-08-26 17:37:15 +00:00
Kimmo Pekkola
3a5b634b1b !RainmeterQuit bang doesn't show error message even if Rainmeter is not running. 2009-08-05 08:36:38 +00:00
Kimmo Pekkola
7440667743 New build-in variables: #WORKAREAWIDTH#, #WORKAREAHEIGHT#, #SCREENAREAWIDTH#, #SCREENAREAHEIGHT#
Added support for math formulas for the X, Y, W, H, WindowX and WindowY (e.g. "WindowX=(#WORKAREAWIDTH# / 2)"). The formula must be surrounded by parenthesis.
2009-07-30 15:19:47 +00:00
Kimmo Pekkola
fce069e2c7 The antialias setting can be set for all meters. 2009-07-29 11:52:01 +00:00
Kimmo Pekkola
dd9ab1dc04 Added support for transformation matrix in meters. 2009-07-27 11:48:57 +00:00
Kimmo Pekkola
5d2f960552 Code cleanup. 2009-02-14 10:11:28 +00:00
Kimmo Pekkola
30edc895f2 2009-02-10 18:37:48 +00:00