COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 04-11-2018, 10:13 AM   #1
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 520
Default Two controls for same parameter

I'm a newbie to WDL-OL..

I've just tried hooking up a knoblinecontrol to a captioncontrol to show it's value, giving them both the same parameter id, but they do not work together as I expected.

Also the caption doesn't pop up a prompt when double clicked as I expected, even though I enabled prompt.

What am I doing wrong?

Code:
  //Attach IKnobLineControl
  IKnobLineControl* lineControl = new IKnobLineControl(this, IRECT(0, 300, 50, 350), kPanner1 + kX, &lineColor);
  lineControl->DisablePrompt(false);
  pGraphics->AttachControl(lineControl);

  //Attach ICaptionControl
  IText text = IText(14);
  ICaptionControl* captionControl = new ICaptionControl(this, IRECT(0, 350, 50, 400), kPanner1 + kX, &text);
  pGraphics->AttachControl(captionControl);
__________________
Mac OS X 10.11.x, Motu Ultralite, Reaper, FCP X.
http://vordio.net
http://twitter.com/vordio
mrlimbic is offline   Reply With Quote
Old 04-11-2018, 10:57 AM   #2
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 520
Default

I've fixed the related controls not updating each other by adding some code to onparameterchange

Code:
if (GetGUI()) {
  GetGUI()->SetParameterFromPlug(kFader1, GetParam(paramIdx)->Value(), false);
 }
But the caption control still doesn't allow entering a value when clicked on.

What do I need to add to make CaptionControl allow clicking to enter a value?
__________________
Mac OS X 10.11.x, Motu Ultralite, Reaper, FCP X.
http://vordio.net
http://twitter.com/vordio
mrlimbic is offline   Reply With Quote
Old 04-11-2018, 11:05 AM   #3
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 520
Default

I've got caption control working now (prompt was disabled by default).

Code:
captionControl->DisablePrompt(false);
But the text field popup hould really happen over the original caption text. It appears underneath. How do I make it replace the caption text?
__________________
Mac OS X 10.11.x, Motu Ultralite, Reaper, FCP X.
http://vordio.net
http://twitter.com/vordio
mrlimbic 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 03:25 AM.


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