void renderMenu() { if(renderinitialised==0) return; renderPicture(&Background); renderButton(&choixJeu); renderButton(&choixStat); renderButton(&choixQuit); }
void Mixer::renderMute(byte id) { int w = (_tft.getDisplayXSize() - 11) / 3, x = 10 + (w * id), y = _tft.getDisplayYSize() - 40; renderButton(id, (char *) (id == 0 ? "Sampler" : id == 1 ? "Synth 1" : "Synth 2"), x, y, w, !(id == 0 ? _sampler->mute : _synths[id - 1]->mute)); }
//Update all the widgets void GHEffectViews_renderEffects(LinkedList* effectParams) { GHEffectParamView* param; list_rewind(effectParams); //List over all the parameters. while((param = list_next(effectParams))) { //Knobs need to be repainted every time. Otherwise the animated cursor would erase the position indicators. if (param->knob) { renderKnob(param); } //If the parameter value hasn't changed, we can carry on if (!param->invalidated) continue; //Display text-based widgets if they are defined if (param->nameShard) { GHTextShards_displaySingle(param->nameShard); } if (param->valueShard) { formatParamTextValue(param->valueShard->value, param->controller); GHTextShards_displaySingle(param->valueShard); } //Display button if it is defined if(param->button) { renderButton(param); } //invalidated is set to 1 when the value of a parameter changes. The update then needs to happen twice in a row in order to fill both buffers. if(param->invalidated==2) param->invalidated = 0; else param->invalidated = 2; } }
/** Displays the player view in the panel area. \param defaultPos default position if rank is 0 (race startup) */ void CAPlayerView::display( const int defaultPos ) { // Maybe we need to re-render the button sprite: // if( currentColor!=player->getColor() ) { renderButton(); } int lap = (int)( floor( player->getPosition() )+1.0 ); int rank = (player->getRaceRank()==0 ? defaultPos : player->getRaceRank()); int y = (rank-1) * 55 + 110 + 38; // The turbo jauge + the ammo jauge if( lap>5 ) lap=5; std::ostringstream ossLap, ossRank, ossNumLap; ossLap << lap; ossRank << rank; ossNumLap << CA_NUMLAPS; // Display color button: // button.draw ( *CA_APP->graphicContext,0, y); CA_RES->panel_life.draw ( *CA_APP->graphicContext, (int)((float)player->getLife() / 100.0 * 120.0), y ); // Display name: // CA_RES->font_normal_11_white.draw_text( *CA_APP->graphicContext, 3, y+2, player->getName() ); // Display laps and rank: // CA_RES->panel_infoview.draw ( *CA_APP->graphicContext,0, y+20); CA_RES->font_lcd_13_green.draw_text( *CA_APP->graphicContext, 50, y+22, ossLap.str() ); CA_RES->font_lcd_13_green.draw_text( *CA_APP->graphicContext, 70, y+31, ossNumLap.str() ); CA_RES->font_normal_11_white.draw_text( *CA_APP->graphicContext, 99, y+30, ossRank.str() ); // Display cross for death players: // if( player->getLife()<0.1 ) { CL_Draw::fill( *CA_APP->graphicContext, CL_Rectf(0, y, 120, y+55), CL_Colorf(0, 0, 0, 85) ); CA_RES->panel_death.draw ( *CA_APP->graphicContext,0, y); } }
/** Constructor. \param player Pointer to the appropriate player. */ CAPlayerView::CAPlayerView( Player* player ) { this->player = player; renderButton(); }
virtual void render() { renderButton(); }