It is currently March 28th, 2024, 12:55 pm

Text on Button Meter?

Get help with creating, editing & fixing problems with skins
Post Reply
HudTweaker13
Posts: 6
Joined: February 1st, 2017, 1:11 am

Text on Button Meter?

Post by HudTweaker13 »

I'm working on making the most efficient hud designs and am wondering if there is an easy way to reuse the same button meter for all of the buttons and place text over each, centered, to identify each button, in a very easy way without allot of extra coding. My goal is to make the hud small as possible and easy to customize.


Thanx Friends, for any and all help.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Text on Button Meter?

Post by balala »

HudTweaker13 wrote:am wondering if there is an easy way to reuse the same button meter for all of the buttons and place text over each, centered, to identify each button, in a very easy way without allot of extra coding.
There is, actually:

Code: Select all

[MeterButton]
Meter=Button
ButtonImage=#@#Button.png
ButtonCommand=["Notepad"]

[MeterButtonString]
Meter=STRING
X=25r
Y=9r
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTERCENTER
AntiAlias=1
Text=Button
The [MeterButton] meter uses the attached (extremely simple) button image file. Important is the size of this image. Because a Button meter horizontally shows always one third of the used image, you have to place the String meter horizontally to half of the visible part of the Button meter and vertically to half og the height of the image. Because the posted image size is 150x18 pixels I placed the String meter to X=25r (25 = half of 150/3 = 50) and Y=9r (half of the 18 pixels height of the image).
Attachments
Button.png
Post Reply