96 Commits

Author SHA1 Message Date
Torbjörn Andersson
2265872a83 Delete the old cursor buffer before allocating a new one. If the theme is
enabled by the time it's refreshed, replace the cursor.

svn-id: r23122
2006-06-15 08:07:20 +00:00
Eugene Sandulenko
021159724d Fix drawing of tab widget. Now it matches mock-ups. Added tab scrolling.
svn-id: r23116
2006-06-15 02:14:40 +00:00
Johannes Schickel
793151a0aa Implements new Tab drawing for modern theme (nearlly matches mockups now)
svn-id: r23106
2006-06-14 16:29:56 +00:00
Torbjörn Andersson
61c5281454 Removed printf() debug message.
svn-id: r23085
2006-06-13 10:20:59 +00:00
Torbjörn Andersson
df4f95f805 Let the [cursor] palette manager handle disableCursorPalette() too, to avoid
cursor glitch in at least some HE games which first set a cursor palette, and
then disable it. (The disabled palette would be re-enabled after dismissing the
GUI.)

svn-id: r23081
2006-06-13 09:48:46 +00:00
Eugene Sandulenko
6aaafb47eb oops. More appropriate place for loading fonts. Avoids loading fonts on
each GUI start

svn-id: r22968
2006-06-07 02:55:08 +00:00
Eugene Sandulenko
e51d7fcc35 Fix regression with console having wrong font on startup.
svn-id: r22967
2006-06-07 02:53:03 +00:00
Eugene Sandulenko
6f8c4250f9 Move whole theme ini file to evaluator. Next step is caching. Also now it is
possible to use per-resolution gfx and colors, i.e. complete customization.

svn-id: r22964
2006-06-06 23:57:14 +00:00
Max Horn
0f18020010 Some more string usage tweaks
svn-id: r22936
2006-06-05 17:43:30 +00:00
Max Horn
5f76cd0d9e cleanup
svn-id: r22930
2006-06-05 12:35:33 +00:00
Max Horn
110718603c Fixing some more typenames to comply to the ScummVM coding guidelines
svn-id: r22929
2006-06-05 12:29:21 +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
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
Johannes Schickel
94272b6ba8 Should fix drawing on systems with alpha mask.
svn-id: r22773
2006-05-30 16:48:15 +00:00
Eugene Sandulenko
a46fe65378 A quick hack to let PSP gui use bigger fonts. Proper solution is to add
possibility to specify font for each widget class

svn-id: r22770
2006-05-30 12:29:32 +00:00
Johannes Schickel
1d72b954c7 Introduces special switch for GraphicsWidget for use of theme transparency again.
svn-id: r22746
2006-05-29 14:55:43 +00:00
Johannes Schickel
2dd94dd247 Oops this reverts my last commit. :/
svn-id: r22742
2006-05-29 14:30:21 +00:00
Johannes Schickel
c37d69df56 - comments out getColorAlphaImp2
- adds note in getColorAlpha about we handle negative alpha values currently (could be removed when getColorAlphaImp2 get's fixed)

svn-id: r22741
2006-05-29 14:21:07 +00:00
Johannes Schickel
bdceb581fd - cleanup
- uses working getColorAlphaImpl for alpha == 0 in getColorAlpha

svn-id: r22740
2006-05-29 14:16:52 +00:00
Johannes Schickel
0a557cf2a4 - changes transparency parameter of Theme::drawSurface to alpha parameter.
- adds possibility to draw GraphicsWidgets with alpha values.

svn-id: r22738
2006-05-29 14:00:00 +00:00
Johannes Schickel
1b2485f4af Don't draw the shadow outside the scrollbar (should fix 'garbage' when moving the scrollbar)
svn-id: r22680
2006-05-27 12:48:31 +00:00
Johannes Schickel
ae191feb21 Fixes caret drawing in EditTextWidgets.
svn-id: r22678
2006-05-27 12:37: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
Eugene Sandulenko
7f8b79d5d0 Use Courier 12pt (free one) for 2x and 3x console. Looks much more useable now.
svn-id: r22644
2006-05-26 01:05:19 +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
Eugene Sandulenko
fac7a13cf5 Proper rendering of slider widget.
svn-id: r22527
2006-05-18 21:48:47 +00:00
Eugene Sandulenko
4ead8dff26 - Fix spelling in theme config
- Introduce embossing shadow
- Less round corners in popup widget
- Custom border in editable text widget
- Matched color in popup widget and editable text widget with mock-ups
- Less round corners in editable text widget
- Text padding in editable text widget

svn-id: r22525
2006-05-18 20:53:28 +00:00
Eugene Sandulenko
4dfbfe7eca - Revert additional setUpCursor() call as it broke in-game cursor palette
- Disable scaling for cursors which have target scale defined

svn-id: r22509
2006-05-18 02:03:43 +00:00
Eugene Sandulenko
71e341ba39 Better cursor image
svn-id: r22507
2006-05-18 01:36:06 +00:00
Johannes Schickel
6b225b40fa Uses the special cursor color palette for the cursor now (this fixes problems with creation of thumbnails of the scumm engine)
svn-id: r22152
2006-04-25 15:20:46 +00:00
Travis Howell
d474595629 Fix valgrind warning
svn-id: r22065
2006-04-21 04:06:44 +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
1c65f3417a Fixes problems with wrong colors on the overlay in scumm engine.
svn-id: r22024
2006-04-19 06:00:34 +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
Johannes Schickel
58af73b344 Restores background before drawing a popupwidget.
svn-id: r22015
2006-04-18 19:52:12 +00:00
Johannes Schickel
96d23871b6 Oops forgot to use shadows for the PopUpWidget.
svn-id: r22013
2006-04-18 18:57:43 +00:00
Johannes Schickel
a9431edca2 - Fixed popup widget for --force-1x-overlay with new theme
- adds support for highlightened popupwidgets

svn-id: r22012
2006-04-18 18:50:07 +00:00
Johannes Schickel
1ae205a241 - adds own drawing function for (not expanded) popup widgets
- adds pixmaps, colorfades, and gradient factor for the (not expanded) popup widget in new theme
- bumps themeconfig version

svn-id: r22011
2006-04-18 18:40:33 +00:00
Max Horn
ea85e8c986 Moved ColorMasks to their own new header graphics/colormasks.h, so that both the scalers and the GUI code can access them. Also added (untested) entries for 1555, 444, 888 and 8888 modes
svn-id: r21966
2006-04-17 10:22:05 +00:00
Johannes Schickel
e9cbf5fcbd - Moves Graphics::loadFont to Graphics::NewFont::loadFont
- adds code for caching of fonts (just for Graphics::NewFont)
- implements cache using in the modern theme for custom fonts
- adds cache file for current normal font in the theme zip file

svn-id: r21952
2006-04-16 19:54:39 +00:00
Eugene Sandulenko
924ec172ff - Implemented text padding in ListWidget and PopUpWidget. Right padding does not work yet.
- Implemented highlisght padding in ListWidget
- Eval::getVar() method with default value
- Removed unused constructors for ListWidget and PoUpWidget
- cleanup
- bumped theme version

svn-id: r21934
2006-04-16 10:23:36 +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
Johannes Schickel
1444a1ab9f - No longer draws full shadows for disabled widgets
- Implements 'negativ alpha' values for drawSurfaceMasked (from -1 to -100, used to dim the pixels -1 means very very small dim -100 should be black)
- Changes drawSurfaceMasked to use macros for easy changing drawing code

svn-id: r21852
2006-04-13 22:47:22 +00:00
Johannes Schickel
f2370a0560 Deletes color cache and custom dialog shading.
svn-id: r21850
2006-04-13 22:20:50 +00:00
Johannes Schickel
e02625db6a Speeds up calcGradient again a little bit.
Also this should fix a bug in getColorAlphaImpl (I'm not 100% sure if it was wrong before though)

svn-id: r21818
2006-04-12 03:01:06 +00:00
Johannes Schickel
3fab2f4898 - some little clean ups
- improves speed of the dimming effect (get's rid of divisions in favour of shifts)
- improves speed of calcGradient (nearlly twice as fast in my tests now)

svn-id: r21817
2006-04-12 02:27:56 +00:00
Johannes Schickel
4b8b7e2aed Checks if something is drawn out of the screen in drawSurfaceMasked (fixes crashes with --force-1x-overlay)
svn-id: r21794
2006-04-11 16:05:59 +00:00