Custom GUI button via resource description



  • Hi,

    In the past I have been able to programmatically provide a custom gui "clearselection" button in a GeDialog using:

    Bool MyGeDialog::CreateLayout(void)
    {
    	...
    	BaseContainer bc = GetCustomDataTypeDefault(CUSTOMGUI_BITMAPBUTTON);
    	bc = GetCustomDataTypeDefault(CUSTOMGUI_BITMAPBUTTON);
    	bc.SetBool(BITMAPBUTTON_BUTTON, TRUE);
    	bc.SetInt32(BITMAPBUTTON_ICONID1, RESOURCEIMAGE_CLEARSELECTION);
    	AddCustomGui(IDC_FILTER_CLEAR, CUSTOMGUI_BITMAPBUTTON, String(), 0, 0, 0, bc);
    

    I have also been able to provide my own customgui in a DescriptionToolData resource using:

    CONTAINER MyDescriptionTool_desc
    {     
    	NAME MyDescriptionTool_desc;
    
    	GROUP
    	{
    		LONG REFERENCEPOINT_GADGETID { ANIM OFF; CUSTOMGUI REFERENCEPOINT; REFERENCEPOINTS 5; }
    		...
    

    Where "reference point" is a custom gadget allowing to select one of the corners of a rectangle, to be used as reference/origin.

    Now I would like to provide a "clearselection" button as part of a DescriptionToolData resource description.
    Could anyone please point me to an example how to go about this. Thank you.



  • I don't think you can configure a bitmap button in a res file.

    You can add a BITMAPBUTTON parameter in the res file (e.g. ocamera.res). But then you have to implement DescriptionToolData::GetDDescription() to define the specific settings of this parameter's GUI.



  • @PluginStudent

    You mentioning the BITMAPBUTTON and with the help of ExampleSculptGrabBrush::GetDDescription from the cinemasdk I was able to make it work.
    Thanks.


Log in to reply