From d5ed45c25651f04dc3972047d279c8eeb4ca9e51 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 6 Jun 2016 21:37:26 +0200 Subject: New TexturedBox class. --- plugingui/button.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'plugingui/button.h') diff --git a/plugingui/button.h b/plugingui/button.h index 1bfeb2d..f409a55 100644 --- a/plugingui/button.h +++ b/plugingui/button.h @@ -33,6 +33,7 @@ #include "widget.h" #include "painter.h" #include "font.h" +#include "texturedbox.h" namespace GUI { @@ -61,8 +62,15 @@ protected: private: bool in_button{false}; - Painter::Box box_up; - Painter::Box box_down; + TexturedBox box_up{getImageCache(), ":pushbutton.png", + 0, 0, // atlas offset (x, y) + 11, 1, 11, // dx1, dx2, dx3 + 10, 72, 12}; // dy1, dy2, dy3 + + TexturedBox box_down{getImageCache(), ":pushbutton.png", + 23, 0, // atlas offset (x, y) + 11, 1, 11, // dx1, dx2, dx3 + 10, 72, 12}; // dy1, dy2, dy3 typedef enum { up, -- cgit v1.2.3