Commit Graph

91 Commits

Author SHA1 Message Date
Vicent Marti
e0592c7d25 Fixed severe bottleneck in the XML Parser code.
Applied Max's patch for character drawing.
Added new FP squareroot function.

svn-id: r34354
2008-09-05 14:48:47 +00:00
Vicent Marti
dcc72fe29e Massive refactoring/cleanup on the theme engine/parser.
svn-id: r34285
2008-09-02 17:51:08 +00:00
Vicent Marti
1b0c29cb01 Added popup widget in Options menu to change GUI renderer on the fly.
svn-id: r33898
2008-08-15 11:05:25 +00:00
Vicent Marti
1d9f98d121 Massive API cleanup (removed legacy code).
Improved theme loading support.

svn-id: r33832
2008-08-13 16:50:50 +00:00
Vicent Marti
70ef503434 Massive refactoring on the layout parsing API.
Added support for layout spacings.
Fixed bug in theme conversion python script.

svn-id: r33630
2008-08-05 09:54:36 +00:00
Vicent Marti
4645e706a8 Rendering pipeline (almost) fixed. This time for real.
svn-id: r33092
2008-07-17 21:58:43 +00:00
Max Horn
9287ea8376 Patch #1926787: small memory leak and cleanup
svn-id: r31261
2008-03-27 11:06:29 +00:00
Jordi Vilalta Prat
66e9d4f5e8 Removed trailing spaces.
svn-id: r30664
2008-01-27 19:47:41 +00:00
Max Horn
218e132e37 Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots
svn-id: r27024
2007-05-30 21:56:52 +00:00
Torbjörn Andersson
53624376b4 Applied my re-revised patch #1487149 ("Simplified keyboard repeat"), with
Fingolfin's blessings. Keyboard repeat is now handled by the event manager,
rather than by individual engines.

Since this can cause problems with some engines (see the AGI engine), the extra
"key down" events are marked as "synthetic", so that they can be ignored if
necessary.

svn-id: r26170
2007-03-17 15:44:26 +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
Eugene Sandulenko
3be9c44dc4 Fix bug #1590596: "HE: When 3x graphics are choosen, F5 crashes game"
svn-id: r24656
2006-11-08 10:06:42 +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
3a81941981 - Added dialog for selecting the theme to use
- Added runtime theme switching

svn-id: r24213
2006-10-08 18:22:28 +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
c0805830eb Fix various typenames to comply to the ScummVM coding guidelines
svn-id: r22928
2006-06-05 12:22:51 +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
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
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
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
96cf7028b9 - implements .bdf font loader based on convbdf (sure could have some clean up)
- adds three different font styles to the themes (normal, bold (default one), italic)
- implements code for specifing the font files in the theme config ('fontfile_normal','fontfile_bold' and 'fontfile_italic' in the 'extra' section)
- changes EditTextWidget to use the normal font (has some minor aligment problems with the caret now, though)
- extends the FontManager (new functions: getFontByName, assignFontToName, removeFontName)
- adds the font style constans to the builtin constants for the evaluator)

svn-id: r21868
2006-04-14 02:16:55 +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
a8a8624511 o Converted most (all?) widgets to new scheme.
o Converted global options dialog to new scheme.

svn-id: r21137
2006-03-08 01:42:02 +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
Max Horn
b34e207dbb Change CVS keywords to SVN keywords
svn-id: r20518
2006-02-11 10:08:56 +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
Eugene Sandulenko
ea42bad781 Update copyright notice
svn-id: r20088
2006-01-18 17:39:49 +00:00
Eugene Sandulenko
b36677af71 Update FSF address. Eek. Actually that took place on May 1, 2005
svn-id: r19142
2005-10-18 01:30:26 +00:00
Eugene Sandulenko
6b4484472b Remove trailing whitespaces.
svn-id: r18604
2005-07-30 21:11:48 +00:00
Torbjörn Andersson
63984c3a23 The alternative form of drawString() is no longer needed.
svn-id: r18326
2005-06-03 13:09:24 +00:00
Torbjörn Andersson
bf89c8a4b9 The GUI has reached the point where I think it's safe to begin removing the
old auto-scaling hack. Removed wantsScaling(), USE_AUTO_SCALING,
_scaleFactor and _scaleEnable.

Also removed drawBitmap() since we no longer use bitmaps for widget
decorations.

svn-id: r18310
2005-06-02 12:29:01 +00:00
Torbjörn Andersson
801db4a515 Added big editable text widget, and removed some cruft. I think this means
that all our widgets are able to scale themselves now, but I could be
mistaken.

svn-id: r18192
2005-05-20 15:03:26 +00:00
Torbjörn Andersson
8e7c4ffa37 Quick fix to make button texts etc. draw at the correct position. (They
were being drawn at unscaled coordinates.) I don't know if this is the
correct fix, but the change is small and easy to revert, if need be.

svn-id: r18072
2005-05-12 15:46:03 +00:00
Max Horn
79241d323f Start work on support for 'big' widgets
svn-id: r18060
2005-05-11 19:30:30 +00:00
Max Horn
919af98314 Added Dialog::wantsScaling(), to allow dialogs to turn off automatic scaling
svn-id: r17646
2005-04-17 11:20:59 +00:00
Max Horn
7aebedcc14 Patch #1183808 (GUI: Less CPU-intensive credits scroll), with some tweaks by me
svn-id: r17620
2005-04-16 11:40:15 +00:00
Max Horn
cffd917165 system.h was being included in tons of places, without any good reason; reduced this (total dependencies on system.h went down from 193 to 85 files)
svn-id: r16527
2005-01-10 22:06:49 +00:00
Max Horn
858c6c4d5b Switching GUI to an alternate font; using a second, bigger, font for 640x480 games like COMI. Note: we can always easily switch back to the SCUMM font or any other font, if we want to
svn-id: r16467
2005-01-06 22:48:42 +00:00
Max Horn
c6e0d31e76 Added a font manager (work in progress)
svn-id: r16460
2005-01-06 21:15:52 +00:00
Max Horn
4fae197c67 Patch #1092994 (Selfscaling GUI)
svn-id: r16455
2005-01-06 19:09:34 +00:00
Max Horn
5d88c39549 Modify the singleton code once more to help overcome an issue with MSVC 7 (see also patch #1095133)
svn-id: r16454
2005-01-06 18:38:34 +00:00
Max Horn
74bf578bda Changed the singleton code to allow for custom object factories; this allowed me to change OSystem to use the singleton base class, too
svn-id: r16404
2005-01-01 19:19:06 +00:00
Max Horn
47280d9433 Updated copyright
svn-id: r16398
2005-01-01 16:09:25 +00:00
Max Horn
5ad29fd7e0 Make use of the new graphic primitives
svn-id: r15886
2004-11-25 23:35:02 +00:00
Max Horn
0f142572f7 Allow char drawing with a custom font
svn-id: r14624
2004-08-15 13:49:13 +00:00
Max Horn
e27f2c5592 Removed some obsolete stuff; made switching to the alt font less intrusive (you only have to recompile a single file now); foundation for future run-time font switching...
svn-id: r14623
2004-08-15 13:15:55 +00:00
Max Horn
5d0f0ea0c6 Added generic variable size stack class - COMPLETELY UNTESTED. Really should add some unit tests for this...
svn-id: r13776
2004-05-05 01:19:42 +00:00
Max Horn
178bf539b4 Make use of Stack template
svn-id: r13430
2004-03-29 22:29:30 +00:00
Max Horn
7b158941e7 cleanup
svn-id: r13364
2004-03-22 22:01:10 +00:00