Skip to content

Commit

Permalink
fixed selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolauska committed Dec 9, 2013
1 parent f32fc1a commit 3e1a8be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Laamapeli/Draw.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ inline void Draw::menu(int menu, int selection, int WIDTH, int HEIGHT, int FPS,
break;
}
case(2):{
al_draw_scaled_bitmap(msel, 0, 0, this->selectorW, this->selectorH, this->WIDTH/2 + (al_get_text_width(font18,text1C)/2), this->HEIGHT/8*4 -14, 40, 50, NULL);
al_draw_scaled_bitmap(msel, 0, 0, this->selectorW, this->selectorH, this->WIDTH/2 - (al_get_text_width(font18,text1C)/2) - (picWidth()/2.7), this->HEIGHT/8*4 -14, 40, 50, ALLEGRO_FLIP_HORIZONTAL);
al_draw_scaled_bitmap(msel, 0, 0, this->selectorW, this->selectorH, this->WIDTH/2 + (al_get_text_width(font18,text2C)/2), this->HEIGHT/8*4 -14, 40, 50, NULL);
al_draw_scaled_bitmap(msel, 0, 0, this->selectorW, this->selectorH, this->WIDTH/2 - (al_get_text_width(font18,text2C)/2) - (picWidth()/2.7), this->HEIGHT/8*4 -14, 40, 50, ALLEGRO_FLIP_HORIZONTAL);
break;
}
case(3):{
al_draw_scaled_bitmap(msel, 0, 0, this->selectorW, this->selectorH, this->WIDTH/2 + (al_get_text_width(font18,text1C)/2), this->HEIGHT/8*5 -14, 40, 50, NULL);
al_draw_scaled_bitmap(msel, 0, 0, this->selectorW, this->selectorH, this->WIDTH/2 - (al_get_text_width(font18,text1C)/2) - (picWidth()/2.7), this->HEIGHT/8*5 -14, 40, 50, ALLEGRO_FLIP_HORIZONTAL);
al_draw_scaled_bitmap(msel, 0, 0, this->selectorW, this->selectorH, this->WIDTH/2 + (al_get_text_width(font18,text3C)/2), this->HEIGHT/8*5 -14, 40, 50, NULL);
al_draw_scaled_bitmap(msel, 0, 0, this->selectorW, this->selectorH, this->WIDTH/2 - (al_get_text_width(font18,text3C)/2) - (picWidth()/2.7), this->HEIGHT/8*5 -14, 40, 50, ALLEGRO_FLIP_HORIZONTAL);
break;
}
}
Expand Down
2 changes: 2 additions & 0 deletions Laamapeli/Initialize_Destroy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ int initialize(){
al_register_event_source(event_queue, al_get_timer_event_source(speedTimer));
al_register_event_source(event_queue, al_get_mouse_event_source());

al_destroy_font(fontLoading);
al_destroy_bitmap(loading);

// Start timer
al_start_timer(FPSTimer);
Expand Down

0 comments on commit 3e1a8be

Please sign in to comment.