void OptionsGamePlay::end() { for ( int i = MSG_GREEN; i < MSG_ELITE + 1; i++ ) { if ( getButton( i )->isPressed() ) prefs.GameDifficulty = i - MSG_GREEN; } prefs.baseColor = rects[36].getColor( ); prefs.highlightColor = rects[37].getColor( ); prefs.useUnlimitedAmmo = getButton( MSG_UNLIMITED_AMMO )->isPressed(); prefs.useLeftRightMouseProfile = getButton( MSG_LEFT_CLICK )->isPressed(); //prefs.tutorials = getButton( MSG_TUTORIALS )->isPressed(); //Do NOT setup a camera in mission. // A. We don't need it cause the option is greyed out. // B. It creates a mech which will NOT be deleted until we // come back to logistics, at which point, THESE heaps will be gone!! // Then, CRASH! if ( mission && strlen( mission->getMissionFileName() ) ) { } else { camera.setMech( NULL ); } }
void MainMenu::configureText() { setDefaultHighlighting(getButton("BTN_NEWGAME")->getTextHighlightableComponent()); setDefaultHighlighting(getButton("BTN_LOADGAME")->getTextHighlightableComponent()); setDefaultHighlighting(getButton("BTN_MOVIES")->getTextHighlightableComponent()); setDefaultHighlighting(getButton("BTN_OPTIONS")->getTextHighlightableComponent()); setDefaultHighlighting(getButton("BTN_EXIT")->getTextHighlightableComponent()); }
void Dialog::askRocket(){ if( !desktop ) { std::cerr << "No desktop found.\n"; return; } try { myDialogComponent = loadGUIFile( "gui/launch_rocket_yn.xml" ); assert( myDialogComponent != 0); registerDialog(); blockingDialogIsOpen = true; iAmBlocking = true; } catch(std::exception& e) { std::cerr << "Couldn't display message 'launch_rocket_yn': " << e.what() << "\n"; return; } Paragraph* p = getParagraph( *myDialogComponent, "DialogTitle" ); std::stringstream title; title << _("Launchsite") << " ( " << pointX <<" , " << pointY << " )"; p->setText( title.str() ); // connect signals Button* yesButton = getButton( *myDialogComponent, "Yes" ); yesButton->clicked.connect( makeCallback(*this, &Dialog::okayLaunchRocketButtonClicked ) ); Button* noButton = getButton( *myDialogComponent, "No" ); noButton->clicked.connect( makeCallback( *this, &Dialog::closeDialogButtonClicked ) ); Button* gotoButton = getButton( *myDialogComponent, "goto" ); gotoButton->clicked.connect( makeCallback( *this, &Dialog::gotoButtonClicked ) ); }
CharAlignment::CharAlignment(CharGenChoices &choices, ::Engines::Console *console) : CharGenBase(console) { _choices = &choices; _loyalty = 101; _goodness = 101; load("cg_alignment"); getEditBox("HelpEdit", true)->setTitle("fnt_galahad14", TalkMan.getString(111)); getEditBox("HelpEdit", true)->setText("fnt_galahad14", TalkMan.getString(458)); _buttons = new ButtonsGroup(getEditBox("HelpEdit", true)); uint textID = 448; _buttons->addButton(getButton("CEButton"), TalkMan.getString(120), TalkMan.getString(textID)); _buttons->addButton(getButton("CGButton"), TalkMan.getString(118), TalkMan.getString(++textID)); _buttons->addButton(getButton("CNButton"), TalkMan.getString(119), TalkMan.getString(++textID)); _buttons->addButton(getButton("LEButton"), TalkMan.getString(114), TalkMan.getString(++textID)); _buttons->addButton(getButton("LGButton"), TalkMan.getString(112), TalkMan.getString(++textID)); _buttons->addButton(getButton("LNButton"), TalkMan.getString(113), TalkMan.getString(++textID)); _buttons->addButton(getButton("NEButton"), TalkMan.getString(117), TalkMan.getString(++textID)); _buttons->addButton(getButton("NGButton"), TalkMan.getString(115), TalkMan.getString(++textID)); _buttons->addButton(getButton("TNButton"), TalkMan.getString(116), TalkMan.getString(++textID)); getButton("OkButton", true)->setDisabled(true); //TODO Recommend button for alignment. getWidget("RecommendButton", true)->setDisabled(true); }
void OptionsGraphicsAdvancedMenu::updateAntiAliasing(int antiAliasing) { WidgetButton &antiAliasButton = *getButton("BTN_ANTIALIAS", true); WidgetButton &leftButton = *getButton("BTN_ANTIALIASLEFT", true); WidgetButton &rightButton = *getButton("BTN_ANTIALIASRIGHT", true); Common::UString text; if (antiAliasing == 0) text = TalkMan.getString(47996); else if (antiAliasing == 1) text = TalkMan.getString(47997); else if (antiAliasing == 2) text = TalkMan.getString(47999); else if (antiAliasing == 3) text = TalkMan.getString(49125); antiAliasButton.setText(text); if (_antiAliasing == 0) { leftButton.hide(); } else { leftButton.show(); } if (_antiAliasing == 3) { rightButton.hide(); } else { rightButton.show(); } }
int MPPrefs::handleMessage( unsigned long message, unsigned long who ) { switch ( who ) { case MB_MSG_NEXT: status = DOWN; saveSettings( ); break; case MB_MSG_PREV: status = DOWN; cancelSettings(); break; case MB_MSG_MAINMENU: status = MAINMENU; break; case MP_PREFS_BASE: case MP_PREFS_STRIPE: { getButton( MP_PREFS_BASE )->press( 0 ); getButton( MP_PREFS_STRIPE )->press( 0 ); getButton( who )->press( 1 ); } break; } return 0; }
void LogisticsDialog::update() { enterAnim.update(); exitAnim.update(); if ( exitAnim.isDone() ) bDone = true; // hack for some reason we don't get here from the zone userInput->mouseOn(); userInput->setMouseCursor( mState_NORMAL ); bool bFocus = 0; for ( int i = 0; i < editCount; i++ ) { if ( edits[i].hasFocus() ) bFocus = true; } if ( enterAnim.isDone() ) LogisticsScreen::update(); if ( userInput->leftMouseReleased() && enterAnim.isDone() && !inside( userInput->getMouseX(), userInput->getMouseY() ) && !inside( userInput->getMouseDragX(), userInput->getMouseDragY() ) ) { handleMessage( 0, NO ); } if ( !bFocus && enterAnim.isDone() ) { if ( gos_GetKeyStatus( KEY_RETURN ) == KEY_RELEASED ) { if ( getButton( YES ) ) { if ( getButton( YES )->isEnabled() ) handleMessage( aMSG_LEFTMOUSEDOWN, YES ); } else handleMessage( aMSG_LEFTMOUSEDOWN, YES ); } } if ( gos_GetKeyStatus( KEY_ESCAPE ) == KEY_RELEASED ) { if ( getButton( NO /*MB_MSG_MAINMENU*/ ) ) { if ( getButton( NO )->isEnabled() ) handleMessage( aMSG_LEFTMOUSEDOWN, NO ); } } }
void MPHostGame::update() { if (bShowDlg) { LogisticsOneButtonDialog::instance()->update(); if (LogisticsOneButtonDialog::instance()->isDone()) { bShowDlg = 0; status = NO; } return; } LogisticsDialog::update(); helpTextID = 0; helpTextHeaderID = 0; std::wstring tmp; edits[0].getEntry(tmp); int32_t len = tmp.Length(); if (len >= 1) { getButton(YES)->disable(false); } else getButton(YES)->disable(true); }
void GUI::connectToTask() { auto find = getButton("RecommendButton"); auto search = getButton("FilterSearch"); QObject::connect(find, SIGNAL(clicked()), this, SLOT(search())); QObject::connect(search, SIGNAL(clicked()), this, SLOT(checkBoxSelected())); }
void buttonAndLED(TaskState* tsk){ int timeDiff; switch((tsk->state)) { case RELEASED: if(getButton(tsk->whichButton) == IS_PRESSED) { turnLED(tsk->whichLED, ON); tsk->recordedTime = getTime(); tsk->state = PRESSED_ON; tsk->buttonReleased = FALSE; } break; case PRESSED_ON: if(getButton(tsk->whichButton) == IS_RELEASED) tsk->buttonReleased = TRUE; else { if(tsk->buttonReleased == TRUE) tsk->state = TURNING_OFF; tsk->buttonReleased = FALSE; turnLED(tsk->whichLED, OFF); } timeDiff = getTime() - (tsk->recordedTime); if(timeDiff >= tsk->interval) { turnLED(tsk->whichLED, OFF); tsk->recordedTime = getTime(); tsk->state = PRESSED_OFF; } break; case PRESSED_OFF: if(getButton(tsk->whichButton) == IS_RELEASED) tsk->buttonReleased = TRUE; else { if(tsk->buttonReleased == TRUE) { tsk->state = TURNING_OFF; tsk->buttonReleased = FALSE; turnLED(tsk->whichLED, OFF); } } timeDiff = getTime() - (tsk->recordedTime); if(timeDiff >= tsk->interval) { turnLED(tsk->whichLED, ON); tsk->recordedTime = getTime(); tsk->state = PRESSED_ON; } break; case TURNING_OFF: if(getButton(tsk->whichButton) == IS_RELEASED) { tsk->buttonReleased = TRUE; tsk->state = RELEASED; } break; } }
bool TroopInfoPanel::onTouchBegan(CCTouch *pTouch, CCEvent *pEvent){ if (isTouchInside(getButton(1), pTouch) || isTouchInside(getButton(2), pTouch) || isTouchInside(getButton(3), pTouch)){ return false; } return true; }
int OptionsGamePlay::handleMessage( unsigned long message, unsigned long fromWho ) { if ( fromWho >= MSG_GREEN && fromWho < MSG_ELITE+1 ) { for ( int i = MSG_GREEN; i < MSG_ELITE+1; i++ ) { getButton( i )->press( 0 ); } getButton( fromWho )->press( true ); } switch( fromWho ) { case MSG_RESET: reset(originalSettings); break; case MSG_BASE: case MSG_ACCENT: getButton( MSG_BASE )->press( 0 ); getButton( MSG_ACCENT )->press( 0 ); getButton( fromWho )->press( true ); break; } return 1; }
void Controller::setColourShade(double grayScale){ try{ if(getButton("colours") != NULL) getButton("colours")->setShade(grayScale); } catch(...){ throw eFileNotFoundException(); } }
void Dialog::editMarket(){ if( !desktop ) { std::cerr << "No desktop found.\n"; return; } try { myDialogComponent = loadGUIFile( "gui/tradedialog.xml" ); assert( myDialogComponent != 0); registerDialog(); blockingDialogIsOpen = true; iAmBlocking = true; } catch(std::exception& e) { std::cerr << "Couldn't display dialog 'tradedialog.xml': " << e.what() << "\n"; return; } // set Dialog to Market-Data Paragraph* p = getParagraph( *myDialogComponent, "DialogTitle" ); std::stringstream title; title << _("Market") << " ( " << pointX <<" , " << pointY << " )"; p->setText( title.str() ); Market * market = static_cast <Market *> (world(pointX, pointY)->reportingConstruction); CheckButton* cb; cb = getCheckButton( *myDialogComponent, "BuyJobs" ); if( market->commodityRuleCount[Construction::STUFF_JOBS].take ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellJobs" ); if( market->commodityRuleCount[Construction::STUFF_JOBS].give ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "BuyFood" ); if( market->commodityRuleCount[Construction::STUFF_FOOD].take ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellFood" ); if( market->commodityRuleCount[Construction::STUFF_FOOD].give ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "BuyCoal" ); if( market->commodityRuleCount[Construction::STUFF_COAL].take ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellCoal" ); if( market->commodityRuleCount[Construction::STUFF_COAL].give ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "BuyOre" ); if( market->commodityRuleCount[Construction::STUFF_ORE].take ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellOre" ); if( market->commodityRuleCount[Construction::STUFF_ORE].give ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "BuyGoods" ); if( market->commodityRuleCount[Construction::STUFF_GOODS].take ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellGoods" ); if( market->commodityRuleCount[Construction::STUFF_GOODS].give ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "BuySteel" ); if( market->commodityRuleCount[Construction::STUFF_STEEL].take ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellSteel" ); if( market->commodityRuleCount[Construction::STUFF_STEEL].give) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "BuyWaste" ); if( market->commodityRuleCount[Construction::STUFF_WASTE].take ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellWaste" ); if( market->commodityRuleCount[Construction::STUFF_WASTE].give) cb->check(); else cb->uncheck(); // connect signals Button* applyButton = getButton( *myDialogComponent, "Apply" ); applyButton->clicked.connect( makeCallback(*this, &Dialog::applyMarketButtonClicked ) ); Button* gotoButton = getButton( *myDialogComponent, "goto" ); gotoButton->clicked.connect( makeCallback( *this, &Dialog::gotoButtonClicked ) ); }
void HUD::init() { _targetName = getLabel("LBL_NAME"); _targetNameBackground = getLabel("LBL_NAMEBG"); _targetHealth = getProgressbar("PB_HEALTH"); _targetHealthBackground = getLabel("LBL_HEALTHBG"); _firstTargetButton = getButton("BTN_TARGET0"); _secondTargetButton = getButton("BTN_TARGET1"); _thirdTargetButton = getButton("BTN_TARGET2"); }
OptionsGameplayMenu::OptionsGameplayMenu() { load("optgameplay"); _mousesettings = new OptionsMouseSettingsMenu(); _keyboardconfiguration = new OptionsKeyboardConfigurationMenu(); //Hardcoded, the gui file returns 1.0, 1.0, 1.0, 1.0 getButton("BTN_DIFFLEFT", true)->setColor(0, 0.658824, 0.980392, 1); getButton("BTN_DIFFRIGHT", true)->setColor(0, 0.658824, 0.980392, 1); }
bool ElevatorModule::calibrate() { if(!m_Enabled) return false; std::cout << "in calibrate" << std::endl; Timer timeOut, timeOut2; timeOut.Start(); bool renablePID = false; disablePID(); if(m_PIDController->IsEnabled()){ renablePID = true; } while(!getButton()) { if(timeOut.Get() > MAX_ELEVATOR_CALIBRATE_TIME_DOWN) { throw CalibrationError(this, "ElevatorModule::calibrate()" , "calibrate timed out"); } setPower(CALIBRATE_ELEVATOR_DOWN); Wait(0.005); } std::cout << "After first loop" << std::endl; setPower(0); m_Encoder->Reset(); timeOut2.Start(); while(timeOut2.Get() < MAX_ELEVATOR_CALIBRATE_TIME_UP) { setPower(CALIBRATE_ELEVATOR_UP); Wait(0.005); } std::cout << "after second" << std::endl; setPower(0); if(getButton()) { throw CalibrationError(this, "ElevatorModule::calibrate()" ,"check your button"); } if(m_Encoder->PIDGet() < MIN_ELEVATOR_DISTANCE_CALIBRATE) { throw CalibrationError(this, "ElevatorModule::calibrate()" , "check your encoder"); } if(renablePID) m_PIDController->Enable(); m_Calibration_Is_Done = true; std::cout << "Done with Calibrate" << std::endl; return true; }
int MissionSelectionScreen::handleMessage( unsigned long msg, unsigned long who ) { if ( who >= MSG_FIRST_MISSION && who < MSG_FIRST_MISSION + MAX_MISSIONS_IN_GROUP ) { setMission( who - MSG_FIRST_MISSION ); } switch( who ) { case MB_MSG_NEXT: status = NEXT; break; case MB_MSG_PREV: status = PREVIOUS; break; case MN_MSG_PLAY: if ( bMovie ) bMovie->restart(); getButton( MN_MSG_STOP )->press( 0 ); getButton( MN_MSG_PAUSE )->press( 0 ); break; case MN_MSG_STOP: if ( bMovie ) bMovie->stop(); bStop = true; break; case MN_MSG_PAUSE: if ( !getButton( who )->isPressed() ) { if ( bMovie ) bMovie->pause(0); getButton( who )->press(false); } else { if ( bMovie ) bMovie->pause(1); getButton( who )->press(true); } break; case MB_MSG_MAINMENU: status = MAINMENU; break; } return 0; }
static BOOL getOptions(HWND hwndDlg) { getFormat(hwndDlg) ; getEncode(hwndDlg) ; SessOptShared = getButton(hwndDlg, IDD_OPT_SHARED) ; SessOptViewonly = getButton(hwndDlg, IDD_OPT_VONLY) ; SessOptDeiconify = getButton(hwndDlg, IDD_OPT_DEICON) ; return TRUE ; }
CharPackage::CharPackage(CharGenChoices &choices, ::Engines::Console *console) : CharGenBase(console) { _choices = &choices; load("cg_package"); //TODO Implement package recommendation. getButton("RecommendButton", true)->setDisabled(true); //TODO Implement package configuration. getButton("ConfigurePckg", true)->setDisabled(true); _packageListBox = getListBox("ClassListBox", true); }
void Camera::OnMouseDown(novus::IEventDataPtr eventData) { auto dataPtr = static_pointer_cast<EventData_MouseDown>(eventData); ShowCursor(false); if (dataPtr->getButton() == MouseButton::Left) mReadingMouse = true; if (dataPtr->getButton() == MouseButton::Right) mFreeRoam = !mFreeRoam; }
void mouse(int button, int state, int x, int y) { Window::Ptr window = getCurrentWindow(); if (window) { if (state == GLUT_DOWN) { window->mousePressed(MouseEvent(getModifiers(), getButton(button), Point(x, y))); } else if (state == GLUT_UP) { window->mouseReleased(MouseEvent(getModifiers(), getButton(button), Point(x, y))); } } }
void Dialog::editMarket(){ if( !desktop ) { std::cerr << "No desktop found.\n"; return; } try { myDialogComponent = loadGUIFile( "gui/tradedialog.xml" ); assert( myDialogComponent != 0); registerDialog(); blockingDialogIsOpen = true; iAmBlocking = true; } catch(std::exception& e) { std::cerr << "Couldn't display dialog 'tradedialog.xml': " << e.what() << "\n"; return; } // set Dialog to Market-Data Paragraph* p = getParagraph( *myDialogComponent, "DialogTitle" ); std::stringstream title; title << _("Market") << " ( " << pointX <<" , " << pointY << " )"; p->setText( title.str() ); CheckButton* cb; cb = getCheckButton( *myDialogComponent, "BuyJobs" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MB_JOBS ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellJobs" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MS_JOBS ) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "BuyFood" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MB_FOOD) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellFood" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MS_FOOD) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "BuyCoal" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MB_COAL) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellCoal" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MS_COAL) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "BuyOre" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MB_ORE) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellOre" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MS_ORE) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "BuyGoods" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MB_GOODS) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellGoods" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MS_GOODS) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "BuySteel" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MB_STEEL) cb->check(); else cb->uncheck(); cb = getCheckButton( *myDialogComponent, "SellSteel" ); if( MP_INFO( pointX,pointY ).flags & FLAG_MS_STEEL) cb->check(); else cb->uncheck(); // connect signals Button* applyButton = getButton( *myDialogComponent, "Apply" ); applyButton->clicked.connect( makeCallback(*this, &Dialog::applyMarketButtonClicked ) ); Button* gotoButton = getButton( *myDialogComponent, "goto" ); gotoButton->clicked.connect( makeCallback( *this, &Dialog::gotoButtonClicked ) ); }
/** * Returns the message type of this tool. * * @return The message type of this tool. */ Uml::SequenceMessage::Enum ToolBarStateMessages::getMessageType() { if (getButton() == WorkToolBar::tbb_Seq_Message_Synchronous) { return Uml::SequenceMessage::Synchronous; } else if (getButton() == WorkToolBar::tbb_Seq_Message_Found) { return Uml::SequenceMessage::Found; } else if (getButton() == WorkToolBar::tbb_Seq_Message_Lost) { return Uml::SequenceMessage::Lost; } return Uml::SequenceMessage::Asynchronous; }
/** * Returns the message type of this tool. * * @return The message type of this tool. */ Uml::Sequence_Message_Type ToolBarStateMessages::getMessageType() { if (getButton() == WorkToolBar::tbb_Seq_Message_Synchronous) { return Uml::sequence_message_synchronous; } else if (getButton() == WorkToolBar::tbb_Seq_Message_Found) { return Uml::sequence_message_found; } else if (getButton() == WorkToolBar::tbb_Seq_Message_Lost) { return Uml::sequence_message_lost; } return Uml::sequence_message_asynchronous; }
CharSex::CharSex(CharGenChoices &choices, ::Engines::Console *console) : CharGenBase(console) { _choices = &choices; load("cg_sex"); getEditBox("HelpBox", true)->setTitle("fnt_galahad14", TalkMan.getString(203)); getEditBox("HelpBox", true)->setText("fnt_galahad14", TalkMan.getString(447), 1.0f); _buttons.reset(new ButtonsGroup(getEditBox("HelpBox", true))); _buttons->addButton(getButton("MaleButton", true), TalkMan.getString(203), TalkMan.getString(199)); _buttons->addButton(getButton("FemaleButton", true), TalkMan.getString(203), TalkMan.getString(200)); getButton("MaleButton", true)->setPressed(true); }
OptionsGameplayMenu::OptionsGameplayMenu(::Engines::Console *console) : GUI(console) { load("optgameplay"); _mousesettings = new OptionsMouseSettingsMenu(_console); _keyboardconfiguration = new OptionsKeyboardConfigurationMenu(_console); //Hardcoded, the gui file returns 1.0, 1.0, 1.0, 1.0 getButton("BTN_DIFFLEFT", true)->setColor(0.0f, 0.658824f, 0.980392f, 1.0f); getButton("BTN_DIFFRIGHT", true)->setColor(0.0f, 0.658824f, 0.980392f, 1.0f); getCheckBox("CB_LEVELUP", true)->setColor(0.0f, 0.658824f, 0.980392f, 1.0f); getCheckBox("CB_INVERTCAM", true)->setColor(0.0f, 0.658824f, 0.980392f, 1.0f); getCheckBox("CB_AUTOSAVE", true)->setColor(0.0f, 0.658824f, 0.980392f, 1.0f); getCheckBox("CB_REVERSE", true)->setColor(0.0f, 0.658824f, 0.980392f, 1.0f); getCheckBox("CB_DISABLEMOVE", true)->setColor(0.0f, 0.658824f, 0.980392f, 1.0f); }
RemoveTrackModal::RemoveTrackModal(TimelineView* timelineView_ptr){ _timelineViewPtr = timelineView_ptr; setTitle("REMOVE TRACK"); getButton(0)->setLabel("APPLY"); getButton(0)->onButtonEvent(this, &RemoveTrackModal::onApplyButtonEvent); addButton("CANCEL"); trackNameToRemove = ""; createTogglesFromExistingTracks(); }
void initClientLayout(GtkWidget *window) { GtkWidget *menubar; GtkWidget *main_vbox; //main vertical box widget GtkWidget *button_hbox; //buttons horizon box widget GtkWidget *separator; //separator widget //Create a vbox to put menubar, image, and 3 buttons main_vbox = gtk_vbox_new(FALSE, BOX_SPACING_SIZE); //Set the border width of man_vbox gtk_container_set_border_width(GTK_CONTAINER(main_vbox), BORDER_WIDTH_SIZE); //Add the main_vbox into the window gtk_container_add(GTK_CONTAINER(window), main_vbox); //Create the menubar from itemfactoryentry menubar = getMenubarMenu(window); //Pack the menubar into the main_vbox gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, TRUE, 0); //Create the toolbar toolbar = getToolbar(); //Pack the toolbar into the main_vbox gtk_box_pack_start(GTK_BOX(main_vbox), toolbar, FALSE, TRUE, 0); //Create a image to play the video image = gtk_image_new_from_file(VIDEO_ICON); //Pack the image into the main_vbox gtk_box_pack_start(GTK_BOX(main_vbox), image, TRUE, TRUE, 0); //Create a separator separator = gtk_hseparator_new(); //Pack the separator into the main_vbox gtk_box_pack_start(GTK_BOX(main_vbox), separator, FALSE, TRUE, 0); //Create a hbox to put 3 buttons button_hbox = gtk_hbox_new(TRUE, BOX_SPACING_SIZE); //Pack the button_hbox into the main_vbox gtk_box_pack_start(GTK_BOX(main_vbox), button_hbox, FALSE, TRUE, 0); //Create the setup button setupButton = getButton(button_hbox, GTK_STOCK_NETWORK, "Setup", "Setup RTSP Connection"); //Create the play button playButton = getButton(button_hbox, GTK_STOCK_MEDIA_PLAY, "Play", "Play Streaming Video"); //Create the teardown button teardownButton = getButton(button_hbox, GTK_STOCK_MEDIA_STOP, "Teardown", "Teardown RTSP Connection"); //Set the sensitive property of buttons setSensitive(TRUE, FALSE, FALSE); return; }
void initClock( ) { int bTimerActif = (timerId != -1); int r,c; int o = 0; #ifdef STARTSTOP button_t *pBut; #else o = 16; #endif //pClockStyleUpdate = Style70sUpdate; //pClockStyleDraw = Style70sDraw; pClockStyleUpdate = StyleIkeaUpdate; pClockStyleDraw = StyleIkeaDraw; destroyAllButtons( ); buttonCreate( 0,0,SCREEN_HEIGHT,SCREEN_HEIGHT, TRANSPARENT_KEY, "", actionGoMatrix ); r = 0;c = 4; durationButton = getButton( buttonCreate( 5+c*80, 5+r*80+o, 75+(c+1)*80, 75+r*80+o, BLACK, durationInSecToText( bTimerActif ? ( 1 + getTimerRemainingTime( timerId ) / 1000 ) : timerDuration / 1000 ), actionAcknowledgeTimer )); durationButton->lit = 0; if( reminders >= 0 && durationButton->timer == -1 ) { durationButton->timer = syncTimerSetTimer( 750, blinkButtonTimer, durationButton, 0 ); } r = 1;c = 4; decreaseButton = getButton( buttonCreate( 5+c*80, 5+r*80+o, 75+c*80, 75+r*80+o, BLUE, "-", actionDecreaseTimer )); decreaseButton->lit = !bTimerActif; r = 1;c = 5; increaseButton = getButton( buttonCreate( 5+c*80, 5+r*80+o, 75+c*80, 75+r*80+o, RED, "+", actionIncreaseTimer )); increaseButton->lit = !bTimerActif; #ifdef STARTSTOP r = 2;c = 4; pBut = getButton( buttonCreate( 5+c*80, 5+r*80+o, 75+(c+1)*80, 75+r*80+o, bTimerActif ? YELLOW : GREEN, bTimerActif ? "STOP" : "START", actionStartTimer )); pBut->lit = 1; #endif }