Jump to content

"non-editable" GUI Fields


Guest xionmark

Recommended Posts

Guest xionmark

Hi,

I was wondering how one would declare a field in the GUI tamplate to create a "non-editable" field to be used for informational feedbak only, not to edited by the user.

In this example:

TerraGen_params.jpg

only the first 4 parameters are available for the user to edit, the other fields provide feedback to the user of what type of terrain file has been read. I'd like it to be a cleaner look, without the controls and just have the vaules painted into the GUI.

Right now the fields are defined like:

    // Terrain scale (vector), height scale, base height
    PRM_Template(PRM_XYZ, 3, &names[7]),
    PRM_Template(PRM_INT, 1, &names[8]),
    PRM_Template(PRM_INT, 1, &names[9]),
    // Radius & crvm
    PRM_Template(PRM_FLT, 1, &names[10]),
    PRM_Template(PRM_INT, 1, &names[11]),

What PRM_Type should I use?

Thanks!

--Mark

Link to comment
Share on other sites

  • 15 years later...

Anyone knows how to dynamicaly change the string in a button calback ?

 

i figured out how to dynamicaly change Integers and floats on PRM_INT or PRM_FLT Parms

with function :

 me->setInt("intParm",intValue);

or

me->setFloat("floatParm",floatValue);

 

but could not find on PRM_LABEL

i obviously tried setString()... but seems to be used for a different purpose 

 

 

 

please find below my caalbaclk on PRM_CALLBACK

int SOP_CircleLineAnimator::UICheckFile(void *data, int index, float t, const PRM_Template *)
{


    SOP_CircleLineAnimator *me;
    me = (SOP_CircleLineAnimator *)data;

    me->setInt("txt", 12);
    me->forceRecook();

    return 0;
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...