/* Saves some often used pointers. */ void TrackInfoScreen::loadedFromFile() { m_target_type_spinner = getWidget<SpinnerWidget>("target-type-spinner"); m_target_type_label = getWidget <LabelWidget>("target-type-text"); m_target_type_div = getWidget<Widget>("target-type-div"); m_target_value_spinner = getWidget<SpinnerWidget>("target-value-spinner"); m_target_value_label = getWidget<LabelWidget>("target-value-text"); m_ai_kart_spinner = getWidget<SpinnerWidget>("ai-spinner"); m_ai_kart_label = getWidget<LabelWidget>("ai-text"); m_option = getWidget<CheckBoxWidget>("option"); m_record_race = getWidget<CheckBoxWidget>("record"); m_option->setState(false); m_record_race->setState(false); m_highscore_label = getWidget<LabelWidget>("highscores"); for (unsigned int i=0;i<HIGHSCORE_COUNT;i++) { m_kart_icons[i] = getWidget<IconButtonWidget>(("iconscore"+StringUtils::toString(i+1)).c_str()); m_highscore_entries[i] = getWidget<LabelWidget>(("highscore"+StringUtils::toString(i+1)).c_str()); } GUIEngine::IconButtonWidget* screenshot = getWidget<IconButtonWidget>("screenshot"); screenshot->setFocusable(false); screenshot->m_tab_stop = false; m_is_soccer = false; m_show_ffa_spinner = false; } // loadedFromFile
/* Saves some often used pointers. */ void TrackInfoScreen::loadedFromFile() { m_lap_spinner = getWidget<SpinnerWidget>("lap-spinner"); m_ai_kart_spinner = getWidget<SpinnerWidget>("ai-spinner"); m_reverse = getWidget<CheckBoxWidget>("reverse"); m_reverse->setState(false); m_highscore_label = getWidget<LabelWidget>("highscores"); m_kart_icons[0] = getWidget<IconButtonWidget>("iconscore1"); m_kart_icons[1] = getWidget<IconButtonWidget>("iconscore2"); m_kart_icons[2] = getWidget<IconButtonWidget>("iconscore3"); m_highscore_entries[0] = getWidget<LabelWidget>("highscore1"); m_highscore_entries[1] = getWidget<LabelWidget>("highscore2"); m_highscore_entries[2] = getWidget<LabelWidget>("highscore3"); GUIEngine::IconButtonWidget* screenshot = getWidget<IconButtonWidget>("screenshot"); screenshot->setFocusable(false); screenshot->m_tab_stop = false; } // loadedFromFile
/** Called when the stkgui file is read. It stores the pointer to various * widgets and adds the right names for reverse mode. */ void GPInfoScreen::loadedFromFile() { // The group spinner is filled in init every time the screen is shown // (since the groups can change if addons are added/deleted). m_group_spinner = getWidget<SpinnerWidget>("group-spinner"); m_reverse_spinner = getWidget<SpinnerWidget>("reverse-spinner"); m_reverse_spinner->addLabel(_("Default")); m_reverse_spinner->addLabel(_("None")); m_reverse_spinner->addLabel(_("All")); m_reverse_spinner->addLabel(_("Random")); m_reverse_spinner->setValue(0); m_num_tracks_spinner = getWidget<SpinnerWidget>("track-spinner"); // Only init the number of tracks here, this way the previously selected // number of tracks will be the default. m_num_tracks_spinner->setValue(1); m_ai_kart_spinner = getWidget<SpinnerWidget>("ai-spinner"); GUIEngine::IconButtonWidget* screenshot = getWidget<IconButtonWidget>("screenshot"); screenshot->setFocusable(false); screenshot->m_tab_stop = false; } // loadedFromFile