Example #1
0
StGLMenuItem* StGLMenu::addItem(const StString&                 theLabel,
                                const StHandle<StFloat32Param>& theTrackedValue,
                                const float                     theOnValue) {
    StGLMenuItem* aNewItem = new StGLMenuRadioButton(this, theTrackedValue, theOnValue);
    aNewItem->setText(theLabel);
    return aNewItem;
}
Example #2
0
StGLMenuItem* StGLMenu::addItem(const StString&           theLabel,
                                const StHandle<StAction>& theAction,
                                StGLMenu*                 theSubMenu) {
    StGLMenuItem* aNewItem = new StGLMenuActionItem(this, theAction, theSubMenu);
    aNewItem->setText(theLabel);
    return aNewItem;
}
Example #3
0
StGLMenuItem* StGLMenu::addItem(const StString& theLabel,
                                const size_t    theUserData) {
    StGLMenuItem* aNewItem = new StGLMenuItem(this, 0, 0);
    aNewItem->setText(theLabel);
    aNewItem->setUserData(theUserData);
    return aNewItem;
}
Example #4
0
StGLMenuItem* StGLMenu::addItem(const StHandle<StEnumParam>& theTrackedValue,
                                const int32_t                theOnValue) {
    StGLMenuItem* aNewItem = new StGLMenuRadioButton(this, theTrackedValue, theOnValue);
    aNewItem->setText(theTrackedValue->getOptionLabel(theOnValue));
    return aNewItem;
}
Example #5
0
StGLMenuItem* StGLMenu::addItem(const StHandle<StBoolParamNamed>& theTrackedValue) {
    StGLMenuItem* aNewItem = new StGLMenuCheckbox(this, theTrackedValue);
    aNewItem->setText(theTrackedValue->getName());
    return aNewItem;
}
Example #6
0
StGLMenuItem* StGLMenu::addItem(const StString&              theLabel,
                                const StHandle<StBoolParam>& theTrackedValue) {
    StGLMenuItem* aNewItem = new StGLMenuCheckbox(this, theTrackedValue);
    aNewItem->setText(theLabel);
    return aNewItem;
}
Example #7
0
StGLMenuItem* StGLMenu::addItem(const StString& theLabel,
                                StGLMenu*       theSubMenu) {
    StGLMenuItem* aNewItem = new StGLMenuItem(this, 0, 0, theSubMenu);
    aNewItem->setText(theLabel);
    return aNewItem;
}
Example #8
0
StGLMenuItem* StGLButton::addItem(const StString& theLabel) {
    StGLMenuItem* aNewItem = new StGLPassiveMenuItem(this);
    aNewItem->setText(theLabel);
    return aNewItem;
}
Example #9
0
void StGLButton::setLabel(const StString& theLabel) {
    StGLMenuItem* anItem = getMenuItem();
    if(anItem != NULL) {
        anItem->setText(theLabel);
    }
}