How does labeling with different states work?

Suggestions/ideas for new Controls

How does labeling with different states work?

Postby MrTestOne » 2. Feb 2014, 11:59

I was looking onto making a multiple position switch, on my own, with just .json files editing. So, I've done my research:
-There is a "Label" used in CounterStrike grid called [MuteMic2] that displays "slash" over the icon.
-There are evidence of using two different pictures for different states in BasicCtrls folder and in SoundCtrl.json file.

So, I don't know If you know anything about all this coding :D But can you tell me in some short, quick way how can I implement two pics into one Control, or make such "Label", to put something onto my icon, when pressed.


For now there are two special labels for indicating muted microphone and muted speakers:

- [MuteMas2] OR [MuteMas] label display a line, which indicates a muted speaker setting (in Windows)
- [MuteMic2] OR [MuteMic] label display a line, which indicates a muted microphone setting (in Windows)

Usually they fit perfectly together with the function for muting these devices, so here are the functions for it:

- [ToggleMic] mutes or unmutes the microphone
- [ToggleMas] mutes or unmutes the speakers

If you are more advanced and familiar with coding, you can take a look into the CustomBtn.qs file in the Power-Grid\Data\CustomBtn folder. Look for the keyword "mute" and you'll find the definitions and functions, which are used for those mute commands. Basically the label checks, whether the state of the device is muted or not and then displays the label. You can try to add some own codings and experiment with it, if you are able to read and modify the used code. ;)

For now there aren't more commands included, but we are working on it to add more features regarding that topic. Despite we are working on it to allow different state buttons in a more comfortable way in the near future.
Attachments
toggled mutes.JPG
toggled mutes.JPG (21.91 KiB) Viewed 12233 times
Let's put a smile on that face...

... with ROCCAT Power-Grid!
User avatar
MrTestOne
ROCCAT Staff
 
Posts: 244
Joined: 26. Mar 2013, 17:18

Re: How does labeling with different states work?

Postby MrDynamite13 » 2. Feb 2014, 13:26

Thank you, thank you, THANK YOU!!

Im on my way to create some two state switches :D

Thanks again. :)

So. I got to the point, where:
In CustomBtn.json
-Added line with my switch overlay(Label) name
In CustomBtn.qs
-Added
Code: Select all
if(sLabel=="[Przycisk]"){sLabel="ROC_CustomBtn:Switch";


And here come the stairs:
-Where are sLabel= stuff taken, cause first thing i got in mind are .json files, so I've added stuff into CustomBtn.json
-There is this
Code: Select all
p_xSkin.data.sImgVis="DFP:SND_Mute_Main_Get";};

I couldn't find any reference to this in other files, so Where can I find it?

P.S. It looks like when You know the code, it ain't so hard to create some new Labels and/or creating menu for
Labels to choose what pic you want (Two switch, that doesn't use any System output, but just "If once pressed; If pressed second time").

But, I don't know your priorities so, maybe You have something more important to work on.

Thanks :)
MrDynamite13
 

Re: How does labeling with different states work?

Postby MrTestOne » 6. Mar 2014, 16:38

Sorry for the late answer, was absent in the last time. Regarding that DFP:SND_Mute_Main_Get you can find that in Data\BasicCtrls\ within the SoundCtrl files. Since I'm not a programmer of Power-Grid I can only provide basic support regarding such information. In my case it would be more trial and error, since i have basic knowledge of programming in general, but not specific knowledge regarding our code.
Let's put a smile on that face...

... with ROCCAT Power-Grid!
User avatar
MrTestOne
ROCCAT Staff
 
Posts: 244
Joined: 26. Mar 2013, 17:18

My unfamiliar website

Postby kellygc4 » 16. Jul 2017, 03:45

My new photo blog
http://asslick.photo.erolove.in/?post.tori
camp casey korea zip free vidio matures fat sexy women pics in japan free lolix porn school traffic whittier
kellygc4
 
Posts: 69
Joined: 29. Sep 2016, 16:27

My unfamiliar website

Postby sherrycb11 » 3. Sep 2017, 01:38

Novel devise
http://hd.cars.telrock.net/?entry.yvonne
barely legal teen boy porn little boy with mom porn wet kissing porn porn utorrent capable bart seduces lisa porn
sherrycb11
 
Posts: 46
Joined: 18. Sep 2016, 17:26


Return to Controls

Who is online

Users browsing this forum: No registered users and 1 guest

cron