COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 02-11-2010, 08:16 AM   #1
RRokkenAudio
Human being with feelings
 
RRokkenAudio's Avatar
 
Join Date: Jun 2009
Location: Buffalo, NY
Posts: 777
Default Weird grayout problems

I have 8 knobs setup like this:

Code:
IBitmap bitmap = pGraphics->LoadIBitmap(KNOB_ID, KNOB_FN, 101);


	pGraphics->AttachControl(new IKnobMultiControl(this,  40,55,kdethp, &bitmap));
	pGraphics->AttachControl(new IKnobMultiControl(this,  112,55,kdetlp, &bitmap));
	pGraphics->AttachControl(new IKnobMultiControl(this,  192,55,kthresh, &bitmap));
	pGraphics->AttachControl(new IKnobMultiControl(this,  272,55, kratio, &bitmap));
	pGraphics->AttachControl(new IKnobMultiControl(this, 192,119, kattack, &bitmap));
	pGraphics->AttachControl(new IKnobMultiControl(this, 272,119, krelease, &bitmap));
	pGraphics->AttachControl(new IKnobMultiControl(this, 353,119, kmakeup, &bitmap));
Now, if i add ONE MORE knob, my grayout control that i'm using in another area starts graying out the wrong control, which is a pushbutton and has absolutely nothing to do with those knobs above.

Its like, if I put in over 7 knobs, my grayout control for the switch, starts graying out the wrong thing. Makes absolutely no sense at all. Heres the grayout:

Code:
if(blah){ 
GetGUI()->GrayOutControl(listenidx,false);
}
	else{ //no rms

		//blah
		GetGUI()->GrayOutControl(listenidx,false);
	}
So, i add more than 8 knobs at the top, and my push button grayout code starts graying out the wrong push buttons. they are in no way, shape or form linked in any way. Is there a max amount of knobs you can add?

BTW: If i add 8 knobs, it grays out my one compressor in switch, if i add 9 knobs, it grays out ITSELF lol
~Rob.

Last edited by RRokkenAudio; 02-11-2010 at 08:22 AM.
RRokkenAudio is offline   Reply With Quote
Old 02-12-2010, 03:46 AM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

My guess would be that you're calling GetGUI()->GrayOutControl(listenidx, false) with the wrong index number in listenidx.
Tale is offline   Reply With Quote
Old 02-12-2010, 05:39 AM   #3
RRokkenAudio
Human being with feelings
 
RRokkenAudio's Avatar
 
Join Date: Jun 2009
Location: Buffalo, NY
Posts: 777
Default

hmmm index number?

I just put:

Code:
	listenidx = pGraphics->AttachControl(new ISwitchControl(this,  90,118,klisten, &bitmap));
Seeing as though I don't know what an index number is, that may be the problem

~Rob.
RRokkenAudio is offline   Reply With Quote
Old 02-12-2010, 07:56 AM   #4
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

I believe GrayOutControl() expects a parameter index number, not a control index number. I think if you patch your code as follows it should probably work:

Code:
GetGUI()->GrayOutControl(GetGUI()->GetControl(listenidx)->ParamIdx(), true);
Or you could simply do:

Code:
GetGUI()->GrayOutControl(klisten, true);
Tale is offline   Reply With Quote
Old 02-12-2010, 10:12 PM   #5
RRokkenAudio
Human being with feelings
 
RRokkenAudio's Avatar
 
Join Date: Jun 2009
Location: Buffalo, NY
Posts: 777
Default

That worked, thank you. I was using the meterupdate as an example, guess that works differently.



~Rob.
RRokkenAudio is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.