Bool LiquidToolDialog::CreateLayout(void) { GroupBegin(0, BFH_SCALEFIT, 1, 0, "", 0); GroupBegin(0, BFH_SCALEFIT, 2, 0, "", 0); GroupSpace(4, 1); AddStaticText(0, 0, 0, 0, "R", 0); AddEditSlider(1000, BFH_SCALEFIT); AddStaticText(0, 0, 0, 0, "G", 0); AddEditSlider(1001, BFH_SCALEFIT); AddStaticText(0, 0, 0, 0, "B", 0); AddEditSlider(1002, BFH_SCALEFIT); GroupEnd(); GroupEnd(); return true; }
void PaletteSubDialog::LayoutPalette() { Int32 rows = 0; Int32 cols = 0; Int32 tmp = 0; rows = m_rows; if(m_layout == 1){ tmp = rows; rows = cols; cols = tmp; } if(m_spotColors != NULL){ delete[] m_spotColors; } m_spotColors = new PaletteColor[m_palette.GetCount()]; GroupBegin(30, BFH_SCALEFIT|BFV_SCALEFIT, cols, rows, String(), 0); GroupSpace(0,0); for(int i=0;i<m_palette.GetCount();i++){ Int32 pos; if(m_searchString == "" || m_palette[i].m_name.ToLower().FindFirst(m_searchString.ToLower(), &pos)){ m_spotColors[i].SetColor(m_palette[i]); m_spotColors[i].SetColorID(i); m_spotColors[i].SetSelectCallback(m_selectCallback,m_selectCallbackData); m_spotColors[i].SetDragable(m_dragable); m_spotColors[i].SetPaletteID(m_paletteID); if(m_showLabel){ GroupBegin(400 + i*3,0,1,0,"",FALSE); AddStaticText(400 + i*3+1,0,0,0,m_palette[i].m_name,BORDER_NONE); } C4DGadget *area = AddUserArea(400 + i*3+2,0); AttachUserArea(m_spotColors[i],area); if(m_showLabel){ GroupEnd(); } } } GroupEnd(); }