Commit Graph

173 Commits

Author SHA1 Message Date
Torbjörn Andersson
3bc0661065 Merged the "palette manager" into the cursor manager. It was only used to
manage *cursor* palettes, so the name was misleading.

svn-id: r25500
2007-02-12 00:04:56 +00:00
Johannes Schickel
dda1431e7c cleanup
svn-id: r25435
2007-02-09 00:06:54 +00:00
Johannes Schickel
956affd3d2 Moved definition of ThemeClassic and ThemeModern to their own files.
svn-id: r25432
2007-02-08 23:25:07 +00:00
Max Horn
f01f4eea98 Added NewGui::getTopDialog method
svn-id: r24938
2006-12-27 22:51:14 +00:00
Johannes Schickel
6e16df7891 - renamed GUI::ThemeNew to GUI::ThemeModern
- renamed ThemeNew.cpp to ThemeModern.cpp

svn-id: r24512
2006-10-25 21:20:31 +00:00
Johannes Schickel
055d80c4dc Formatting.
svn-id: r24511
2006-10-25 21:06:49 +00:00
Bertrand Augereau
312f4747d5 Compile fix when DISABLE_FANCY_THEMES is #defined
svn-id: r24510
2006-10-25 20:18:16 +00:00
Johannes Schickel
ab7bced4fd Final fix for wrong cursor palettes in SCUMM games after using the GUI.
svn-id: r24233
2006-10-08 20:37:39 +00:00
Johannes Schickel
cfe6d9725c Making engines working again.
svn-id: r24232
2006-10-08 20:19:23 +00:00
Johannes Schickel
e11bfe5f49 - reworked my commit for r24216, not 'Classic (Builtin)' uses the builtin classic theme and classic uses the classic.ini file
- save the chosen theme now

svn-id: r24222
2006-10-08 19:24:31 +00:00
Johannes Schickel
1ced1777f8 - Forcing 'classic' as the builtin classic theme (which means it ignores the classic.ini atm)
svn-id: r24216
2006-10-08 18:49:25 +00:00
Johannes Schickel
3a81941981 - Added dialog for selecting the theme to use
- Added runtime theme switching

svn-id: r24213
2006-10-08 18:22:28 +00:00
Johannes Schickel
25486c789e - added auto detection of the Theme style to use
- fixed a bug which would lead to a crash when loading the modern theme config with the classic theme

svn-id: r24201
2006-10-08 12:00:19 +00:00
Torbjörn Andersson
e9b9aa65a6 Whitespace.
svn-id: r23704
2006-08-12 16:42:19 +00:00
Max Horn
aab45bac44 Only refresh the theme & reflow all dialogs if the screen settings actually changed
svn-id: r23669
2006-08-04 18:11:00 +00:00
Max Horn
40835e42b9 There is no need anymore to report EVENT_SCREEN_CHANGED changes to the GUI code
svn-id: r23668
2006-08-04 18:01:43 +00:00
Max Horn
0485f76c8d Changed GUI code to do 'lazy'/'just-in-time' reflowing, so that client code doesn't have to forward EVENT_SCREEN_CHANGED to us (this may initially cause some regressions, please report any induced crashes or oddities you observe to me)
svn-id: r23663
2006-08-04 15:48:37 +00:00
Max Horn
1a10cacfb9 Renamed handleScreenChanged() -> reflowLayout() in the GUI code
svn-id: r23662
2006-08-04 13:55:53 +00:00
Max Horn
4fcdbb9349 String class usage cleanup
svn-id: r23582
2006-07-23 15:08:48 +00:00
Torbjörn Andersson
6358547a43 More whitespace changes.
svn-id: r23496
2006-07-14 13:33:58 +00:00
Torbjörn Andersson
50673f9f1f The top dialog can change during the event loop. In that case, flush all the
dialog-related events since they were probably generated while the old dialog
was still visible, and therefore note intended for the new one.

This hopefully fixes strange behaviour/crashes with pop-up widgets. (Most easy
to trigger in 3x mode or when running ScummVM under Valgrind.)

svn-id: r23141
2006-06-16 06:26:26 +00:00
Johannes Schickel
84b54c3173 - Adds 'THEME_HINT_NO_BACKGROUND_RESTORE' for buttons which don't want restored background (example: the tab scrolling buttons).
- Call _theme->drawAll() at the end of the redraw method of NewGui

svn-id: r23134
2006-06-15 14:25:59 +00:00
Torbjörn Andersson
3728e96b17 Disable the theme before restoring the cursor, not afterwards. Otherwise there
may be a noticeable amount of time (disabling the theme can be comparatively
slow) where the cursor is wrong.

svn-id: r23082
2006-06-13 09:57:16 +00:00
Johannes Schickel
15aee485ea - Removes (obsolete) USE_AUTO_SCALE define
- typo fix

svn-id: r22987
2006-06-08 19:43:37 +00:00
Max Horn
76116f36dd *Loads* of Common::String related optimizations. Woa, *tons* of methods were copying strings needlessly
svn-id: r22873
2006-06-03 13:33:39 +00:00
Torbjörn Andersson
ca84620745 When the screen changes, redraw all dialogs *immediately* rather than waiting
for the main loop to check for _needRedraw. Otherwise subsequent events can
cause widgets to be redrawn before the theme has had a chance to re-open the
dialogs, and this could cause at least the modern theme to crash.

svn-id: r22860
2006-06-03 10:48:37 +00:00
Torbjörn Andersson
7f1eafea96 Don't "tickle" a dialog until after it has had a chance to redraw itself,
otherwise it may be in an inconsistent state since the modern theme uses
openDialog() to allocate a surface as large as he dialog itself.

This fixes a crash when changing to a bigger scaler when the About dialog is
running.

svn-id: r22688
2006-05-27 22:57:00 +00:00
Eugene Sandulenko
b56c7b88d7 Major GUI update:
- Implemented padding in console
- Update only current line in console instead of whole screen
- Fixed caret positioning in edit text widget
- Improved buttons drawing, now they look more realistic
- Added label spacing in popup widget
- Correct shadow in popup widget
- Fixed up with selected popup widget being drawn on wrong tab
- Added shading to list dialog
- Adjusted shading of inactive widgets
- Proper coloring of browset (add game) dialog
- Introduced Container widget
- Used Container widget in scumm save/load dialog. Now it looks properly
- Adjusted button colors even more. Now they match almost perfectly albeit with banding
- Made scrollbar appear only when it is really needed

svn-id: r22670
2006-05-27 05:46:04 +00:00
Torbjörn Andersson
79819da301 The GUI never asked for the cursor to be visible. I'm not sure why that used to
work before the cursor manager. Oh well, the launcher should have a visible
cursor again, knock on wood.

svn-id: r22641
2006-05-25 23:20:35 +00:00
Torbjörn Andersson
8062eb6ec3 Set and show/hide mouse cursors through a "cursor manager" (analogous to the
recently added (cursor) palette manager) so that the cursor can be properly
restored after returning from the GUI.

If there's any C++ magic that can keep the backend functions from being called
by anything else than these managing classes, that would probably be a good
idea. Also, since the cursor manager keeps a copy of the cursor image, perhaps
there are at least some backends that will no longer need to?

svn-id: r22639
2006-05-25 22:51:42 +00:00
Torbjörn Andersson
6cdd98b617 After the GUI has finished, restore the old cursor palette (if any). For this
to work, cursor palette now has to be set using the new "palette manager". See
graphics/paletteman.cpp

svn-id: r22543
2006-05-20 10:59:25 +00:00
Torbjörn Andersson
22fb1e48ef Set a cursor palette for the classic theme, as well. Otherwise we'll get the
wrong colours in many games.

svn-id: r22540
2006-05-20 08:29:50 +00:00
Johannes Schickel
9e734b0851 Adds handleScreenChanged() to NewGui, so (scumm) engine can call it when it recives a EVENT_SCREEN_CHANGED.
svn-id: r22025
2006-04-19 06:22:15 +00:00
Johannes Schickel
0a767b6467 Implements custom cursor support for the new theme and includes a standard cursor (it should be replaced though).
svn-id: r22019
2006-04-19 03:17:00 +00:00
Johannes Schickel
30787714d3 Started to prepare the gui for runtime resolution switches.
(some little things could be missing yet though)

svn-id: r22017
2006-04-19 01:05:28 +00:00
Eugene Sandulenko
5daa835cc7 - PopUpWidget (drop down list) does not shadow underlying dialog anymore
- Remove reduntant code in drawing pipeline. Topmost dialog was drawn
  up to 4 times

svn-id: r21998
2006-04-18 00:37:04 +00:00
Johannes Schickel
b99632831f This should fix wrong colors of the scummvm logo in the new theme after screen change.
svn-id: r21953
2006-04-16 20:33:52 +00:00
Max Horn
1eb526f71a Instead of calling our main them 'default-theme', call it 'modern' and reserve the gui theme name 'default' to indicate, well, the *default* theme, whatever that is
svn-id: r21887
2006-04-14 13:20:39 +00:00
Max Horn
9217472f0e With this change, backends are now responsible for instantiating their OSystem class before calling scummvm_main (Note: PalmOS and Symbian are not yet converted, and won't work currently)
svn-id: r21557
2006-04-02 14:16:31 +00:00
Johannes Schickel
d0b8efd575 - moves some code in ThemeNew.cpp (calcGradient and calcAlpha to the bottom)
- added possibility to use a shading effect on inactive dialogs (luminance and dim are builtin, and special ablility to specifiy a own expression, evaluated via the evaluator)
- adds also a color cache (atm it's generated on startup)
- uses luminance effect by default
- bumps theme config version to 7

svn-id: r21544
2006-04-02 00:56:21 +00:00
Eugene Sandulenko
7569f796ec Fix crash in Options dialog in 320xY mode. Shadow was drawn off-screen
svn-id: r21438
2006-03-24 18:10:41 +00:00
Max Horn
08ad918af6 Reduce (indirect) dependencies on gui/eval.h (and thus common/assocarray.h) to a minimum
svn-id: r21426
2006-03-24 14:15:45 +00:00
Eugene Sandulenko
dabcc4cc9b Check values loaded from theme INI and give meaningful errors instead of
bad crashes on blitting stage.

svn-id: r21422
2006-03-24 01:45:03 +00:00
Eugene Sandulenko
c3f91ca288 Converted all scumm dialogs to new scheme
svn-id: r21147
2006-03-09 01:08:25 +00:00
Eugene Sandulenko
1eff73cb41 GUI widget positions:
o Add 'true' and 'false' constants
o add .visible widget property
o allow dots to be part of section and key names in configs

svn-id: r21123
2006-03-07 13:41:36 +00:00
Eugene Sandulenko
018c93b14a More work on customizable GUI.
o Implemented special alias 'prev'
o Added new calling scheme to several widgets
o Partially converted launcher dialog to new scheme
o Converted couple widgets of chooser dialog

svn-id: r21118
2006-03-07 05:39:52 +00:00
Lars Persson
d91b49c15c Added define to disable new theme support.
svn-id: r20676
2006-02-13 21:02:31 +00:00
Max Horn
b34e207dbb Change CVS keywords to SVN keywords
svn-id: r20518
2006-02-11 10:08:56 +00:00
Paweł Kołodziejski
2ebdbbf5e0 fixes allow compile with emsvc4 again
svn-id: r20355
2006-02-03 07:30:29 +00:00
Johannes Schickel
5051b080a2 - adds the new gui renderer also a new implementation for the classic gui
- adds a ImageMan and ImageDec class for loading and managing image files
 - adds a loader for zip files which is used by the new theme and the image manager
 - changes the widgets to use the new gui code
 - changes the scumm dialogs to use the new gui code
 - fixes a #include problem in the sky debugger with the new gui code

 To use the new gui copy gui/themes/default-theme.zip to your extrapath.
If the theme zip can not be found the gui will fallback to the classic theme.
If you want to change the gui styles use "gui_theme=classic" for the classic theme
and "gui_theme=default-theme" for the new theme.

Thanks to eriktorbjorn for testing and help with the new theme and to sev for
reviewing this patch.

svn-id: r20227
2006-01-27 15:43:23 +00:00