aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo
diff options
context:
space:
mode:
authorEugene Sandulenko2011-01-03 12:48:28 +0000
committerEugene Sandulenko2011-01-03 12:48:28 +0000
commit3d2104460de2d3b836243e44b4f62749d45d5b25 (patch)
treeede94cc14448dc19a6708827f738d7d7e005d6b6 /engines/hugo
parent30b40c47459e47f39beece2f089393a2d2cf39aa (diff)
downloadscummvm-rg350-3d2104460de2d3b836243e44b4f62749d45d5b25.tar.gz
scummvm-rg350-3d2104460de2d3b836243e44b4f62749d45d5b25.tar.bz2
scummvm-rg350-3d2104460de2d3b836243e44b4f62749d45d5b25.zip
HUGO: Show bitmap on first button in menu as a proof of concept
svn-id: r55101
Diffstat (limited to 'engines/hugo')
-rw-r--r--engines/hugo/menu.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/engines/hugo/menu.cpp b/engines/hugo/menu.cpp
index 310be2bb7e..849a5ec114 100644
--- a/engines/hugo/menu.cpp
+++ b/engines/hugo/menu.cpp
@@ -24,14 +24,17 @@
*/
#include "hugo/hugo.h"
+#include "graphics/imagedec.h"
namespace Hugo {
enum {
+ kMenuWidth = 320,
+ kMenuHeight = 24,
kMenuX = 5,
kMenuY = 1,
- kButtonWidth = 18,
- kButtonHeight = 18,
+ kButtonWidth = 20,
+ kButtonHeight = 20,
kButtonPad = 1,
kButtonSpace = 5
};
@@ -48,7 +51,7 @@ enum {
kCmdBomb = 'BOMB'
};
-TopMenu::TopMenu(HugoEngine *vm) : Dialog(0, 0, 320, 20),
+TopMenu::TopMenu(HugoEngine *vm) : Dialog(0, 0, kMenuWidth, kMenuHeight),
_vm(vm) {
init();
}
@@ -57,7 +60,16 @@ void TopMenu::init() {
int x = kMenuX;
int y = kMenuY;
+ Graphics::Surface *surf;
+ Common::File in;
+
+ in.open("btn_1.bmp");
+
+ surf = Graphics::ImageDecoder::loadFile(in, g_system->getOverlayFormat());
+
_whatButton = new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight, "What is it?", kCmdWhat);
+ _whatButton->setGfx(surf);
+
x += kButtonWidth + kButtonPad;
_musicButton = new GUI::PicButtonWidget(this, x, y, kButtonWidth, kButtonHeight, "Music", kCmdMusic);