[Scummvm-devel] GUIErrorMessage method
Johannes Schickel
lordhoto at scummvm.org
Thu Aug 20 15:30:39 CEST 2009
Paul Gilbert wrote:
> I was curious as to why the method explicitly changes the graphics
> mode to 320x200 - is it necessary for some reason? When calling it
> from a windowed 640x480 mode it really looks weird to have the size of
> the window shrink to 320x200 non-scaled as the dialogue is shown.
> Would a game not running at 320x200 then be expected to restore the
> resolution back to whatever was needed after the method finishes
> (presuming there is a reason for the size change)? Or should the
> method itself be made responsible for restoring the old resolution?
About why it changes to 320x200, probably because it might be called
when setting up the screen resolution failed, like it is done a few
lines above this function in "initGraphics". It also might be called
before a screen resolution has been setup by the engine.
That function so far was used to show error messages, which are passed
to "error" later on or when the engine falls back to the launcher /
quits anyway, on the screen, so the user has a chance of seeing it. Thus
there was no need for it to change back to the old resolution.
I don't know why exactly you want to use it, but if you only want to
show a warning to the user, you can probably just use GUI::MessageDialog
directly.
// Johannes
More information about the Scummvm-devel
mailing list