[Scummvm-cvs-logs] SF.net SVN: scummvm:[55101] scummvm/trunk/engines/hugo/menu.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Mon Jan 3 13:48:28 CET 2011
Revision: 55101
http://scummvm.svn.sourceforge.net/scummvm/?rev=55101&view=rev
Author: sev
Date: 2011-01-03 12:48:28 +0000 (Mon, 03 Jan 2011)
Log Message:
-----------
HUGO: Show bitmap on first button in menu as a proof of concept
Modified Paths:
--------------
scummvm/trunk/engines/hugo/menu.cpp
Modified: scummvm/trunk/engines/hugo/menu.cpp
===================================================================
--- scummvm/trunk/engines/hugo/menu.cpp 2011-01-03 12:38:13 UTC (rev 55100)
+++ scummvm/trunk/engines/hugo/menu.cpp 2011-01-03 12:48:28 UTC (rev 55101)
@@ -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 @@
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 @@
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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list