GUI1: allow buttons to accept "" as a valid image path

This allows the editor to clear the palette group menu button overlay by passing "".
This commit is contained in:
Charles Dang 2017-05-02 17:15:29 +11:00
parent 03841cb1a0
commit 1000d9684a

View file

@ -394,7 +394,7 @@ bool button::hit(int x, int y) const
return sdl::point_in_rect(x,y,location());
}
static bool is_valid_image(const std::string& str) { return !str.empty() && str[0] != IMAGE_PREFIX; }
static bool is_valid_image(const std::string& str) { return str[0] != IMAGE_PREFIX; }
void button::set_image(const std::string& image_file)
{