/*------------------------------------------------------------------------------------------------------------------ -- FUNCTION: showloaded -- -- DATE: April 15th, 2009 -- -- REVISIONS: None yet -- -- DESIGNER: Alin Albu -- -- PROGRAMMER: Alin Albu -- -- INTERFACE: bool POptMenu::showloaded() -- -- RETURNS: bool -- -- NOTES: -- Shows loaded background . ----------------------------------------------------------------------------------------------------------------------*/ bool POptMenu::showloaded() { TTF_Font *font; SDL_Surface *name; SDL_Color text_color = { pNameColourRed_, pNameColourGreen_, pNameColourBlue_ }; printf("Loading backgrounds\n"); bool result = false; result = move(0, 0); if (result) { if ((font = TTF_OpenFont("resources/fonts/igloo.ttf", 50)) == NULL) { printf("Couldn't open desired font type: %s\n", SDL_GetError()); exit(4); } printf("Background Loaded\n"); result = showModels(); if (name_exists) { if ((name = TTF_RenderText_Solid(font, pName_.c_str(), text_color)) == NULL) printf("Could not update text"); apply_surface((350 - (name->w / 2)), 120, name, screen_); SDL_Flip(screen_); printf("TESTING"); } } return result; }
void NewDevice::slotManufacturerActivated(int item) { showModels(m_manufacturer->currentText()); }