It is currently April 26th, 2024, 7:25 pm

Trying to apply ImageTint to the Button from GAMEHUB2

Get help with creating, editing & fixing problems with skins
BasedUmi
Posts: 1
Joined: September 1st, 2020, 2:11 pm

Trying to apply ImageTint to the Button from GAMEHUB2

Post by BasedUmi »

Hello, I'm new to Rainmeter and am having some trouble with figuring something out.

Here are the URLs to both of the skins I am talking about before I begin.

GAMEHUB:https://www.deviantart.com/not-finch/art/GameHUB-launcher-2-for-Rainmeter-785369648
Gemini:https://www.deviantart.com/trucola/art/The-Gemini-Suite-805582955

I'm trying to get the GAMEHUB button to look like its a part of the Pollux bar (part of the Gemini suite) and changing the image and getting it to line up with the other Icons in the bar was simple enough. The problem is I cannot get the image to tint the way it does in the pollux bar. Here is the code for a button thats typically on the bar.

Code: Select all

[AppLink1]
Meter=Image
ImageName=#@#\Icons\#App1#
ImageTint=#teal#
X=75
Y=225
W=25
LeftMouseUpAction=["#App1Path#"]
MouseOverAction=[!SetOption #CURRENTSECTION# ImageTint "#text#"][!Update]
MouseLeaveAction=[!SetOption #CURRENTSECTION# ImageTint "#teal#"][!SetOption GameOverlay ImageName ""][!Update]
So I tried imitating this within the description of the button in GAMEHUB's files, but no matter what I try I cannot get it to tint. I tried removing the current section, adding a reference to file, and a whole slew of other things. I'm not very good at coding or familiar with how to do so, so I am unsure of what I am doing wrong. I can get the image to tint if I do it outside of the MouseOverAction by just typing ImageTint=(numbers for color).

Here is what the code for the button looks like as of now.

Code: Select all

[Variables]
@Include=#@#Settings.inc
[MeterButton]
Meter=Image
ImageName=button.png
SolidColor=0,0,0,1
W=25
H=25
MouseOverAction=[!SetOption #CURRENTSECTION# ImageTint 255,255,255][!Update]
MouseLeaveAction=[!SetOption #CURRENTSECTION# ImageTint 90,222,205][!Update]
LeftMouseUpAction=!Execute [!ActivateConfig "#ROOTCONFIG#" "GameHUB.ini"]
DynamicVariables=1
UpdateDivider=-1
Antialias=1
Any help would be very much appreciated.
Last edited by balala on September 1st, 2020, 4:04 pm, edited 2 times in total.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: Trying to apply ImageTint to the Button from GAMEHUB2

Post by brax64 »

BasedUmi wrote: September 1st, 2020, 2:24 pm Hello, I'm new to Rainmeter and am having some trouble with figuring something out.
...
So, if I'm not misunderstanding, you want the button belonging to one skin, to look like an objects that belong to another skin.
well, I'm not familiar with those skins, but it seems that you're trying to use a variable #teal# that it is not part of the skin, so you must look for that variable (probably in a Variable.inc file...) copy it and paste in the other skin where you want to use it.

also:
LeftMouseUpAction=!Execute [!ActivateConfig "#ROOTCONFIG#" "GameHUB.ini"] should be better to change it as
LeftMouseUpAction=[!ToggleConfig "#ROOTCONFIG#" "GameHUB.ini"]

replace [!Update] with [!UpdateMeter "Button"][!Redraw]

remove UpdateDivider=-1
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Trying to apply ImageTint to the Button from GAMEHUB2

Post by balala »

brax64 wrote: September 1st, 2020, 3:49 pm well, I'm not familiar with those skins, but it seems that you're trying to use a variable #teal# that it is not part of the skin, so you must look for that variable (probably in a Variable.inc file...) copy it and paste in the other skin where you want to use it.
Beside the teal variable, text is also needed. These variables are declared into the @Resources\PolluxVariables.inc file:

Code: Select all

[Variables]
...
teal=90,222,205
...
text=253,253,253
...
As said, they have to be copied into a file where they can be used by the skin. I probably would copy them into the @Resources\Settings.inc file of the GameHUB 2 config.

Additionally note thet the encoding of files of the GameHUB 2 config are not the best, being UTF-8. I'd probably update them to UTF-16 LE, because: https://forum.rainmeter.net/viewtopic.php?f=5&t=33243&p=165012#p165012