A basic graphics package for the LPC4088 Display Module.

Dependents:   lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI lpc4088_displaymodule_fs_aid ... more

Fork of DMBasicGUI by EmbeddedArtists AB

Revision:
17:6e2abf107800
Parent:
15:a68bb30ab95e
Child:
21:0038059e3a8f
--- a/SlideShow/AppSlideShow.cpp	Mon Mar 09 14:24:54 2015 +0000
+++ b/SlideShow/AppSlideShow.cpp	Fri Mar 20 14:25:46 2015 +0100
@@ -17,7 +17,7 @@
 
 #include "mbed.h"
 #include "AppSlideShow.h"
-#include "basic_image_data.h"
+
 
 /******************************************************************************
  * Defines and typedefs
@@ -25,8 +25,6 @@
 
 #define TICKER_RESOLUTION_IN_MS  10
 
-#define BTN_WIDTH  40
-#define BTN_HEIGHT 40
 #define BTN_OFF    20
 
 /******************************************************************************
@@ -98,10 +96,10 @@
         err = _show->prepare(_script);
     }
 
-    _btnRepeat = new ImageButton((COLOR_T*)_fb, _disp->width() - 2*BTN_OFF - 2*BTN_WIDTH, _disp->height() - BTN_OFF - BTN_HEIGHT, BTN_WIDTH, BTN_HEIGHT);
-    _btnRepeat->loadImages(img_repeat, img_size_repeat);
-    _btnDone = new ImageButton((COLOR_T*)_fb, _disp->width() - BTN_OFF - BTN_WIDTH, _disp->height() - BTN_OFF - BTN_HEIGHT, BTN_WIDTH, BTN_HEIGHT);
-    _btnDone->loadImages(img_ok, img_size_ok);
+    _btnRepeat = new ImageButton((COLOR_T*)_fb, _disp->width() - 2*BTN_OFF - _resOk->width() - _resRepeat->width(), _disp->height() - BTN_OFF - _resRepeat->height(), _resRepeat->width(), _resRepeat->height());
+    _btnRepeat->loadImages(_resRepeat);
+    _btnDone = new ImageButton((COLOR_T*)_fb, _disp->width() - BTN_OFF - _resOk->width(), _disp->height() - BTN_OFF - _resOk->height(), _resOk->width(), _resOk->height());
+    _btnDone->loadImages(_resOk);
     
     return (err == SlideShow::Ok);
 }
@@ -183,3 +181,12 @@
 }
 
 
+void AppSlideShow::addResource(Resources id, Resource* res)
+{
+    if (id == Resource_Ok_button) {
+        _resOk = res;
+    } else {
+        _resRepeat = res;
+    }
+}
+