TWINE: implement ui control via mouse
Also optimized the on-screen keyboard rendering a lot, renamed parameters and started to use Common::Rect
This commit is contained in:
parent
0c3fb36127
commit
e8fcff6e6d
14 changed files with 228 additions and 73 deletions
|
@ -35,6 +35,7 @@
|
|||
#include "engines/metaengine.h"
|
||||
#include "engines/util.h"
|
||||
#include "graphics/colormasks.h"
|
||||
#include "graphics/cursorman.h"
|
||||
#include "graphics/fontman.h"
|
||||
#include "graphics/font.h"
|
||||
#include "graphics/managed_surface.h"
|
||||
|
@ -81,6 +82,14 @@ ScopedEngineFreeze::~ScopedEngineFreeze() {
|
|||
_engine->unfreezeTime();
|
||||
}
|
||||
|
||||
ScopedCursor::ScopedCursor(const TwinEEngine* engine) {
|
||||
CursorMan.showMouse(engine->cfgfile.Mouse);
|
||||
}
|
||||
|
||||
ScopedCursor::~ScopedCursor() {
|
||||
CursorMan.showMouse(false);
|
||||
}
|
||||
|
||||
TwinEEngine::TwinEEngine(OSystem *system, Common::Language language, uint32 flags, TwineGameType gameType)
|
||||
: Engine(system), _gameType(gameType), _gameLang(language), _gameFlags(flags), _rnd("twine") {
|
||||
// Add default file directories
|
||||
|
@ -323,6 +332,7 @@ void TwinEEngine::initConfigurations() {
|
|||
cfgfile.Movie = ConfGetIntOrDefault("movie", CONF_MOVIE_FLA);
|
||||
cfgfile.Fps = ConfGetIntOrDefault("fps", DEFAULT_FRAMES_PER_SECOND);
|
||||
cfgfile.Debug = ConfGetBoolOrDefault("debug", false);
|
||||
cfgfile.Mouse = ConfGetIntOrDefault("mouse", true);
|
||||
|
||||
cfgfile.UseAutoSaving = ConfGetBoolOrDefault("useautosaving", false);
|
||||
cfgfile.CrossFade = ConfGetBoolOrDefault("crossfade", false);
|
||||
|
@ -941,6 +951,10 @@ void TwinEEngine::flip() {
|
|||
g_system->updateScreen();
|
||||
}
|
||||
|
||||
void TwinEEngine::copyBlockPhys(const Common::Rect &rect) {
|
||||
copyBlockPhys(rect.left, rect.top, rect.right, rect.bottom);
|
||||
}
|
||||
|
||||
void TwinEEngine::copyBlockPhys(int32 left, int32 top, int32 right, int32 bottom) {
|
||||
assert(left <= right);
|
||||
assert(top <= bottom);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue