It is currently April 25th, 2024, 2:24 am

toggling visibility on a group of buttons

Get help with creating, editing & fixing problems with skins
mukis
Posts: 7
Joined: January 20th, 2017, 3:49 am

toggling visibility on a group of buttons

Post by mukis »

now I have a button I use to make all of the skins I'm using disappear, I looked at the .ini file and it's really simple, just a togglefadegroup bang, but what I'm trying to do is fit that same bang into an existing file for a set of launcher buttons so that it only effects that one skin, toggling between the launcher's images I have to some other image so it looks like they are hidden in a toolbar..... I have no idea if I'm explaining this properly and I really don't understand very much about rainmeter or any other kind of coding except what I picked up by fiddling with existing code. so if at all possible, if anyone understands what I'm getting at, please explain how I can get the actions I've mentioned in laymen's terms.
below is the particular existing code for the launchers I'm asking about.
how can I affect a drop down menu/toolbar tray for these?

Code: Select all

[Rainmeter]
Author=Media Maggot | Daelnz
Group=Avengers

[Metadata]
Name=Large Launchers
Information=6 buttons for launching programs | Change the icons, paths and labels in the Config.inc file
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=1.1.0

[Variables]
@include=#SKINSPATH#\Avengers - Tweaked\Config.inc

;Styles========================

[TextStyle]
meter=string
fontface= gliscor gothic
fontcolor=255,255,255,255
fontsize = 10
Antialias=1
stringalign = left

;Buttons=====================

[MeterLauncher]
Meter=BUTTON
ButtonImage=Launcher Large Button.png
y=0
Antialias=1
ButtonCommand=!Execute ["C:\Program Files\paint.net\PaintDotNet.exe"]
MouseOverAction=!Execute [!ShowMeter MeterLauncherTextH][!Hidemeter MeterLauncherText][!ShowMeter MeterLauncherIconH][!Hidemeter MeterLauncherIcon]
MouseLeaveAction=!Execute [!ShowMeter MeterLauncherText][!Hidemeter MeterLauncherTextH][!ShowMeter MeterLauncherIcon][!Hidemeter MeterLauncherIconH]

[MeterLauncher2]
Meter=BUTTON
ButtonImage=Launcher Large Button.png
y=48r
Antialias=1
ButtonCommand=!Execute ["C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"]
MouseOverAction=!Execute [!ShowMeter MeterLauncherText2H][!Hidemeter MeterLauncherText2][!ShowMeter MeterLauncherIcon2H][!Hidemeter MeterLauncherIcon2]
MouseLeaveAction=!Execute [!ShowMeter MeterLauncherText2][!Hidemeter MeterLauncherText2H][!ShowMeter MeterLauncherIcon2][!Hidemeter MeterLauncherIcon2H]

[MeterLauncher3]
Meter=BUTTON
ButtonImage=Launcher Large Button.png
y=48r
Antialias=1
ButtonCommand=!Execute ["http://www.deviantart.com/browse/all/"]
MouseOverAction=!Execute [!ShowMeter MeterLauncherText3H][!Hidemeter MeterLauncherText3][!ShowMeter MeterLauncherIcon3H][!Hidemeter MeterLauncherIcon3]
MouseLeaveAction=!Execute [!ShowMeter MeterLauncherText3][!Hidemeter MeterLauncherText3H][!ShowMeter MeterLauncherIcon3][!Hidemeter MeterLauncherIcon3H]

[MeterLauncher4]
Meter=BUTTON
ButtonImage=Launcher Large Button.png
y=48r
ButtonCommand=!Execute ["E:\itunes\iTunes.exe"]
MouseOverAction=!Execute [!ShowMeter MeterLauncherText4H][!Hidemeter MeterLauncherText4][!ShowMeter MeterLauncherIcon4H][!Hidemeter MeterLauncherIcon4]
MouseLeaveAction=!Execute [!ShowMeter MeterLauncherText4][!Hidemeter MeterLauncherText4H][!ShowMeter MeterLauncherIcon4][!Hidemeter MeterLauncherIcon4H]

[MeterLauncher5]
Meter=BUTTON
ButtonImage=Launcher Large Button.png
y=48r
Antialias=1
ButtonCommand=!Execute ["http://www.facebook.com"]
MouseOverAction=!Execute [!ShowMeter MeterLauncherText5H][!Hidemeter MeterLauncherText5][!ShowMeter MeterLauncherIcon5H][!Hidemeter MeterLauncherIcon5]
MouseLeaveAction=!Execute [!ShowMeter MeterLauncherText5][!Hidemeter MeterLauncherText5H][!ShowMeter MeterLauncherIcon5][!Hidemeter MeterLauncherIcon5H]

[MeterLauncher6]
Meter=BUTTON
ButtonImage=Launcher Large Button.png
y=48r
Antialias=1
ButtonCommand=!Execute ["http://www.youtube.com"]
MouseOverAction=!Execute [!ShowMeter MeterLauncherText6H][!Hidemeter MeterLauncherText6][!ShowMeter MeterLauncherIcon6H][!Hidemeter MeterLauncherIcon6]
MouseLeaveAction=!Execute [!ShowMeter MeterLauncherText6][!Hidemeter MeterLauncherText6H][!ShowMeter MeterLauncherIcon6][!Hidemeter MeterLauncherIcon6H]

[MeterLauncher7]
Meter=BUTTON
ButtonImage=Launcher Large Button.png
y=48r
Antialias=1
ButtonCommand=!Execute ["E:\Guild Wars 2\Gw2-64.exe"]
MouseOverAction=!Execute [!ShowMeter MeterLauncherText7H][!Hidemeter MeterLauncherText7][!ShowMeter MeterLauncherIcon7H][!Hidemeter MeterLauncherIcon7]
MouseLeaveAction=!Execute [!ShowMeter MeterLauncherText7][!Hidemeter MeterLauncherText7H][!ShowMeter MeterLauncherIcon7][!Hidemeter MeterLauncherIcon7H]


[MeterLauncher8]
Meter=BUTTON
ButtonImage=Launcher Large Button.png
y=48r
Antialias=1
ButtonCommand=!Execute ["https://www.netflix.com/"]
MouseOverAction=!Execute [!ShowMeter MeterLauncherText8H][!Hidemeter MeterLauncherText8][!ShowMeter MeterLauncherIcon8H][!Hidemeter MeterLauncherIcon8]
MouseLeaveAction=!Execute [!ShowMeter MeterLauncherText8][!Hidemeter MeterLauncherText8H][!ShowMeter MeterLauncherIcon8][!Hidemeter MeterLauncherIcon8H]

;LauncherText============

[MeterLauncherText]
meter=string
meterstyle=textstyle
text="PDN"
x = 48
y = 20

[MeterLauncherTextH]
meter=string
meterstyle=textstyle
text="PDN"
x = 6r
y = 6r
hidden=1

[MeterLauncherText2]
meter=string
meterstyle=textstyle
text="Chrome"
x = 48
y = 68

[MeterLauncherText2H]
meter=string
meterstyle=textstyle
text="Chrome"
x = 6r
y = 6r
hidden=1

[MeterLauncherText3]
meter=string
meterstyle=textstyle
text="DeviantArt"
x = 48
y=116

[MeterLauncherText3H]
meter=string
meterstyle=textstyle
text="DeviantArt"
x = 6r
y = 6r
hidden=1

[MeterLauncherText4]
meter=string
meterstyle=textstyle
text="iTunes"
x = 48
y = 164

[MeterLauncherText4H]
meter=string
meterstyle=textstyle
text="iTunes"
x = 6r
y = 6r
hidden=1

[MeterLauncherText5]
meter=string
meterstyle=textstyle
text="FaceBook"
x = 48
y = 212

[MeterLauncherText5H]
meter=string
meterstyle=textstyle
text="FaceBook"
x = 6r
y = 6r
hidden=1

[MeterLauncherText6]
meter=string
meterstyle=textstyle
text="YouTube"
x = 48
y = 260

[MeterLauncherText6H]
meter=string
meterstyle=textstyle
text="YouTube"
x = 6r
y = 6r
hidden=1

[MeterLauncherText7]
meter=string
meterstyle=textstyle
text="Guild Wars 2"
x = 48
y = 308

[MeterLauncherText7H]
meter=string
meterstyle=textstyle
text="Guild Wars 2"
x = 6r
y = 6r
hidden=1

[MeterLauncherText8]
meter=string
meterstyle=textstyle
text="Netflix"
x = 48
y = 356

[MeterLauncherText8H]
meter=string
meterstyle=textstyle
text="Netflix"
x = 6r
y = 6r
hidden=1

;Launcher Icon========================

[MeterLauncherIcon]
meter=image
imagename=Firefox
w=30
h=30
x=15
y=6
antialias = 1

[MeterLauncherIconH]
meter=image
imagename=Firefox
w=30
h=30
x=6r
y=6r
hidden=1
antialias = 1

[MeterLauncherIcon2]
meter=image
imagename=Chrome
w=30
h=30
x=15
y=54
antialias = 1

[MeterLauncherIcon2H]
meter=image
imagename=chrome
w=30
h=30
x=6r
y=6r
hidden=1
antialias = 1

[MeterLauncherIcon3]
meter=image
imagename=MS 2007 WORD_48x48-32
w=30
h=30
x=15
y=102
antialias = 1

[MeterLauncherIcon3H]
meter=image
imagename=MS 2007 WORD_48x48-32
w=30
h=30
x=6r
y=6r
hidden=1
antialias = 1

[MeterLauncherIcon4]
meter=image
imagename=MS 2007 EXCEL_48x48-32
w=30
h=30
x=15
y=150
antialias=1

[MeterLauncherIcon4H]
meter=image
imagename=MS 2007 EXCEL_48x48-32
w=30
h=30
x=6r
y=6r
hidden=1
antialias = 1

[MeterLauncherIcon5]
meter=image
imagename=MS 2007 POWERPOINT_48x48-32
w=30
h=30
x=15
y=198
antialias = 1

[MeterLauncherIcon5H]
meter=image
imagename=MS 2007 POWERPOINT_48x48-32
w=30
h=30
x=6r
y=6r
hidden=1
antialias = 1

[MeterLauncherIcon6]
meter=image
imagename=XION_48x48-32
w=30
h=30
x=15
y=246
antialias = 1

[MeterLauncherIcon6H]
meter=image
imagename=XION_48x48-32
w=30
h=30
x=6r
y=6r
hidden=1
antialias = 1

[MeterLauncherIcon7]
meter=image
imagename=BattlesHollowBlue
w=30
h=30
x=15
y=294
antialias = 1

[MeterLauncherIcon7H]
meter=image
imagename=BattlesHollowBlue
w=30
h=30
x=6r
y=6r
hidden=1
antialias = 1

[MeterLauncherIcon8]
meter=image
imagename=netflix
w=30
h=30
x=15
y=342
antialias = 1

[MeterLauncherIcon8H]
meter=image
imagename=netflix
w=30
h=30
x=6r
y=6r
hidden=1
antialias = 1
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: toggling visibility on a group of buttons

Post by balala »

mukis wrote:now I have a button I use to make all of the skins I'm using disappear, I looked at the .ini file and it's really simple, just a togglefadegroup bang, but what I'm trying to do is fit that same bang into an existing file for a set of launcher buttons so that it only effects that one skin, toggling between the launcher's images I have to some other image so it looks like they are hidden in a toolbar..... I have no idea if I'm explaining this properly and I really don't understand very much about rainmeter or any other kind of coding except what I picked up by fiddling with existing code. so if at all possible, if anyone understands what I'm getting at, please explain how I can get the actions I've mentioned in laymen's terms.
below is the particular existing code for the launchers I'm asking about.
how can I affect a drop down menu/toolbar tray for these?
I'm really not very sure I understood what would you like to do, but first of all, I don't see which button (meter) would hide / show the skins. I can't find a !ToggleFadeGroup bang, or any other similar.
Now maybe you'd like to show / hide the buttons of the posted code? Or to change the images of the buttons? Or what is about that drop down menu?
Please give us some further details, about what would you like to achieve.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: toggling visibility on a group of buttons

Post by fonpaolo »

I hate self promotion, however...
Avengers S.H.I.E.L.D. 2.1
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: toggling visibility on a group of buttons

Post by balala »

fonpaolo wrote:I hate self promotion, however...
Don't hate it, you don't have to be ashamed by your very good works...
mukis
Posts: 7
Joined: January 20th, 2017, 3:49 am

Re: toggling visibility on a group of buttons

Post by mukis »

The togglefade is excluded from the code because i don't know how to put it in. The one i was talking about is a seperate ini, i mentioned it because it seems like part of what i need to make it work. Yes, i want the entire group of buttons to appear as they are, behave as they do, but i want to add another dynamic to the file that will hide the buttons and their functions, replacing them with a single image that i'll make to look like a tab or icon for a dropdown menu...
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: toggling visibility on a group of buttons

Post by fonpaolo »

Thanks balala. :D

It's not really because I'm ashamed to promote my works, it's more that I'm very finicky and there's always something I could do better, or, it could be used in other ways and I didn't thought about this...
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: toggling visibility on a group of buttons

Post by fonpaolo »

First of all, mukis, you can use the ...Fade only with another skin, since this command will hide/show the whole skin with a fade effect.

Then, if you want to change the buttons with an image, keep in mind that a button is made from three images in one for the effect of "normal", "hover" and "clicked", an image of any other kind can't be used unless you change the meter from Button to Image.

To make it as dropdown menu, you'll need to rewrite almost everything in the code.

However, you're in the right place if you want to do it and need help.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: toggling visibility on a group of buttons

Post by balala »

fonpaolo wrote:It's not really because I'm ashamed to promote my works, it's more that I'm very finicky and there's always something I could do better, or, it could be used in other ways and I didn't thought about this...
That's happening many times to all of us, who are using and coding in Rainmeter (or lua, or...).
mukis wrote:The togglefade is excluded from the code because i don't know how to put it in.
fonpaolo is right, when he said that if you add the current skin to the group which you'd like to hide / show with the !ToggleFadeGroup, on first click to the appropriate button, the bang will hide, along with the others, the current skin too, making impossible showing it again. So, you'll have to add this bang to another skin, which isn't part of the group.
Better would be to pack the whole config of the skins belonging to the group and upload it. It'd be much easier for us to help you.
mukis wrote:The one i was talking about is a seperate ini, i mentioned it because it seems like part of what i need to make it work. Yes, i want the entire group of buttons to appear as they are, behave as they do, but i want to add another dynamic to the file that will hide the buttons and their functions, replacing them with a single image that i'll make to look like a tab or icon for a dropdown menu...
It seems to me that here you are talking about an entirely other action, different from the previous one.
If I'm right, add the Group=MyGroup option to each button / meter you'd like to hide / show with your button (obviously again you can change the name of the group).
Add the image meter you'd like to see when the buttons are hidden. Eg:

Code: Select all

[MeterReplacingImage]
Meter=Image
ImageName=#@#ReplacingImage.png
X=0
Y=0
Add to the [Variables] section of the skin a ShowButtons=0 variable.
Add the following measure:

Code: Select all

[MeasureShowHideButtons]
Measure=Calc
Formula=#ShowButtons#
IfCondition=(MeasureShowHideButtons=0)
IfTrueAction=[!HideMeterGroup "MyGroup"][!ShowMeter "MeterReplacingImage"]
IfFalseAction=[!ShowMeterGroup "MyGroup"][!HideMeter "MeterReplacingImage"]
DynamicVariables=1
And finally add to the meter you'd like to use to show / hide the buttons, respectively hide / show the image, the following option: LeftMouseUpAction=[!SetVariable ShowButtons "(1-#ShowButtons#)"][!UpdateMEasure "MeasureShowHideButtons"], along with the DynamicVariables=1 option (the last one is absolutely needed, otherwise the meter won't be able to change the value of the variable).
mukis
Posts: 7
Joined: January 20th, 2017, 3:49 am

Re: toggling visibility on a group of buttons

Post by mukis »

fonpaolo wrote:I hate self promotion, however...
Avengers S.H.I.E.L.D. 2.1
it looks as perfect as everybody else's on deviantart. but it doesn't help me with my problem. I did take the time to watch you on DA, though. I hope to see more in the future.
mukis
Posts: 7
Joined: January 20th, 2017, 3:49 am

Re: toggling visibility on a group of buttons

Post by mukis »

It seems to me that here you are talking about an entirely other action, different from the previous one.
If I'm right, add the Group=MyGroup option to each button / meter you'd like to hide / show with your button (obviously again you can change the name of the group).
Add the image meter you'd like to see when the buttons are hidden. Eg:
......
well that did something but not what I'm looking for.
it ONLY made the buttons disappear, the text and icons stayed visible. the button that is supposed to toggle visibility is stuck behind the now invisible buttons and does nothing .
thanks for the help, I'm bowing out now. can an admin please close or remove this topic?