mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-03 15:21:40 +00:00
PINK: Plug in autohide menu
This commit is contained in:
parent
ddfe6c3bce
commit
cd357e59d0
@ -81,7 +81,7 @@ Director::Director()
|
|||||||
_wm.setScreen(&_surface);
|
_wm.setScreen(&_surface);
|
||||||
_wm.setMode(Graphics::kWMModeNoDesktop | Graphics::kWMModeAutohideMenu);
|
_wm.setMode(Graphics::kWMModeNoDesktop | Graphics::kWMModeAutohideMenu);
|
||||||
_wm.setMenuHotzone(Common::Rect(0, 0, 640, 23));
|
_wm.setMenuHotzone(Common::Rect(0, 0, 640, 23));
|
||||||
_wm.setMenuDelay(250);
|
_wm.setMenuDelay(250000);
|
||||||
|
|
||||||
_menu = _wm.addMenu();
|
_menu = _wm.addMenu();
|
||||||
_menu->addStaticMenus(menuSubItems);
|
_menu->addStaticMenus(menuSubItems);
|
||||||
@ -102,6 +102,10 @@ void Director::update() {
|
|||||||
draw();
|
draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Director::processEvent(Common::Event &event) {
|
||||||
|
return _wm.processEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
void Director::addSprite(ActionCEL *sprite) {
|
void Director::addSprite(ActionCEL *sprite) {
|
||||||
_sprites.push_back(sprite);
|
_sprites.push_back(sprite);
|
||||||
int i;
|
int i;
|
||||||
|
@ -45,6 +45,7 @@ public:
|
|||||||
Director();
|
Director();
|
||||||
|
|
||||||
void update();
|
void update();
|
||||||
|
bool processEvent(Common::Event &event);
|
||||||
|
|
||||||
void setPallette(const byte *pallete) { g_system->getPaletteManager()->setPalette(pallete, 0, 256); }
|
void setPallette(const byte *pallete) { g_system->getPaletteManager()->setPalette(pallete, 0, 256); }
|
||||||
|
|
||||||
|
@ -112,6 +112,9 @@ Common::Error Pink::PinkEngine::run() {
|
|||||||
while (!shouldQuit()) {
|
while (!shouldQuit()) {
|
||||||
Common::Event event;
|
Common::Event event;
|
||||||
while (_eventMan->pollEvent(event)) {
|
while (_eventMan->pollEvent(event)) {
|
||||||
|
if (_director.processEvent(event))
|
||||||
|
continue;
|
||||||
|
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case Common::EVENT_QUIT:
|
case Common::EVENT_QUIT:
|
||||||
case Common::EVENT_RTL:
|
case Common::EVENT_RTL:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user