Skip to content

Commit

Permalink
Don't load button images if none were provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Feb 28, 2016
1 parent 800d2d8 commit 0babe82
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/display.cpp
Expand Up @@ -898,7 +898,9 @@ void display::layout_buttons()
b->set_location(loc);
b->set_measurements(0,0);
b->set_label(i->title());
b->set_image(i->image());
if(!i->image().empty()) {
b->set_image(i->image());
}
b->set_volatile(
sdl::rects_overlap(b->location(),map_outside_area()));
}
Expand All @@ -913,7 +915,9 @@ void display::layout_buttons()
b->set_location(loc);
b->set_measurements(0,0);
b->set_label(i->title());
b->set_image(i->image());
if(!i->image().empty()) {
b->set_image(i->image());
}
b->set_volatile(
sdl::rects_overlap(b->location(),map_outside_area()));
}
Expand Down

0 comments on commit 0babe82

Please sign in to comment.