157 Commits

Author SHA1 Message Date
Johannes Schickel
4f7c65af0e Merge pull request #260 from lordhoto/new-chooser.
New save/load chooser

Conflicts:
	gui/saveload.cpp
2012-08-12 14:49:28 +02:00
Johannes Schickel
b4196e48b1 GRAPHICS: Add a DPI parameter to loadTTFFont.
Will be used by WME.
2012-08-09 03:13:00 +02:00
Johannes Schickel
d3e5763276 GUI: Allow the user to switch between list and thumbnail based load chooser. 2012-06-29 15:52:56 +02:00
Johannes Schickel
aec9b9e22a ALL: Let overlay related methods in OSystem take a void * and use a proper pitch values.
This is a first step to get rid of OverlayColor, which is a requirement for
proper 4Bpp overlay support.
2012-06-16 04:17:14 +02:00
Johannes Schickel
a401f0a19e ALL: Replace cursorTargetScale in OSystem API with a simple "do not scale" logic.
All uses of the old target scale API actually wanted to disallow scaling of
the mouse cursor. This commit adapts our API to this and thus simplifies
backend implementations.

Some backends, most notable the Wii and Android, did some implementation of
the cursor target scale, which I didn't adapt yet. I added a TODO for the
porters there.
2012-06-03 02:02:57 +02:00
Oleksiy Kurochko
e6c317a922 GUI: Implemented pressed state for buttons 2012-05-03 19:32:08 +03:00
Oleksiy Kurochko
ec32ccb6d6 GUI: Move predictive dialog to common gui 2012-03-25 12:21:38 +03:00
Matthew Hoops
426c81a7a7 GRAPHICS: Rewrite ImageDecoder to have an improved API
The new bitmap decoder class is based off the Mohawk one, and now has 8bpp decoding capability.
2012-03-20 01:06:47 +01:00
Johannes Schickel
8b172f0cef GUI: Put bitmap items in the on-screen draw queue when doing buffering.
This fixes bug #3482461 "GUI: X image on clear buttons might be vanishing".

I am afraid I can't really tell why this fixes the bug though.

This is a backport of a small part of MaximRussia's changes to the queueing
code. So thanks to him for this fix.
2012-02-03 19:15:09 +01:00
Johannes Schickel
6895ea9ea1 GUI: Fix compilation with --disable-translation. 2012-01-29 19:18:36 +01:00
Johannes Schickel
b0dfd08ff9 GUI: Fix anti-aliased font drawing of checkbox/radio button texts.
Formerly the text background was not restored thus every time it got redrawn
the text got thicker.
2012-01-29 16:26:20 +01:00
Johannes Schickel
f63df3bf7b GRAPHICS/GUI: Implement charset mapping for TTF fonts.
The charsets used by the translations now need to have a "$(name).cp" file,
which contains an charset index => unicode mapping. Otherwise
create_translations will fail.
2012-01-29 16:26:20 +01:00
Johannes Schickel
9f3fbe1bd7 GRAPHICS/GUI: Implement kerning support for Font.
This adapts the related graphics code, which is the generic Font API and the
TTF font implementation.

It furthermore adapts the GUI to properly take care of kerning in text input
widgets.
2012-01-29 16:26:20 +01:00
Johannes Schickel
d21ae1aa40 GUI: Add support for loading TTF files with ISO-8859-1 charset. 2012-01-29 16:26:20 +01:00
Johannes Schickel
050b8e3360 GUI: Rework how the default localized font is managed.
Now we set the default localized font to the "text_default" font of the
currently active theme and default to the big GUI font in case none is
specified properly.
2012-01-07 01:03:07 +01:00
Johannes Schickel
0d3e79cf77 GUI: Simplify font loading a bit more. 2012-01-07 00:35:26 +01:00
Johannes Schickel
47edab71e8 GUI: Do an case-insensitive filename comparison.
Should be a bit safer, in case there's files with different cases, which match
by chance.
2012-01-06 22:27:26 +01:00
Johannes Schickel
4531f0173e GUI: Slight cleanup for font/image loading. 2012-01-06 22:24:12 +01:00
MaximRussia
ad4471f70c GUI: Improved pop up and scrollbar arrows look
Previous triangle drawing was all wrong, rewrote it from the scratch.
Added padding to drawsteps in stx files
2011-12-07 14:04:10 +00:00
Eugene Sandulenko
5b3b73c523 GUI: Added icon to clear button. Reverted PNG support 2011-10-24 05:18:49 +01:00
Eugene Sandulenko
59474ca128 GUI: Replaced search icon with a better looking one.
Icons are by Yusuke Kamiyamane. http://p.yusukekamiyamane.com/
2011-10-23 23:44:14 +01:00
Eugene Sandulenko
4c08fccf58 GUI: Add support for PNG images in themes 2011-10-23 23:44:14 +01:00
Eugene Sandulenko
ed2cb9a6b3 GUI: Added debug ouput for determining loaded theme 2011-10-19 13:48:01 +01:00
Chris Warren-Smith
ed07b99b22 BADA: Misc changes merged from appstore release 2011-10-18 23:22:25 +10:00
Johannes Schickel
fa5f8dc703 GRAPHICS: Rename NewFont to BdfFont. 2011-07-01 21:53:01 +02:00
Johannes Schickel
8201df7bb6 GRAPHICS: Move NewFont code to a separate file. 2011-07-01 21:10:25 +02:00
Thierry Crozat
6b13782967 GRAPHICS: Move genLocalizedFontFilename() to FontManager class
It was defined in ThemeEngine class , but I moved it to make it
possible to use localized font in other places.
2011-06-06 23:20:09 +01:00
Max Horn
91b889e2d3 COMMON: Rename kFeatureCursorHasPalette -> kFeatureCursorPalette 2011-06-04 11:55:56 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Johannes Schickel
473337effd GUI: Allow .zip files with case differing from ".zip" as theme files too.
Formerly our code used "hasSuffix" to check for a ".zip" suffix. Since
hasSuffix does a case-sensitive match that would not work, in case the file
was called "scummmodern.ZIP" instead of "scummmodern.zip" for example.

To fix that I am using a case-insensitive matchString instead now.
2011-05-07 15:49:57 +02:00
Johannes Schickel
16f1b51e2a GUI: Clean up localized font filename generation. 2011-05-05 20:07:37 +02:00
Johannes Schickel
71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn
759cac0abc GUI: Fix warning on systems where char is unsigned 2011-04-26 14:24:47 +02:00
Littleboy
ea9774f689 GUI: Add basic validity check to ThemeEngine::themeConfigParseHeader (workaround for #3103051)
When loading a corrupted zip, the data returned for THEMERC will be garbage, which will cause an assert in isspace() when trying to trim the data.
This checks that the first character of the header is in the range [0;127] and bails out if not.
2011-04-24 22:45:36 -04:00
Johannes Schickel
2329a00873 GUI: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. 2011-04-17 16:34:58 +02:00
Johannes Schickel
28e6859a69 GUI: ThemeEngine.cpp/.h formatting fixes. 2011-04-03 15:04:20 +02:00
dhewg
ff11ab284a Revert "GUI: Properly clear the screen buffer"
This reverts commit c8551b80dd917c35d367c1f15f4b9c2618da3684.

Turns out the flicking comes from an updateScreen() call in
android's clearScreen(). Besides, this broke GMM... a little
2011-02-25 00:08:46 +01:00
dhewg
a017cb3d00 GUI: Fix two-step rendering
This is used when changing directories in the 'add game' dialog or when
choosing another tab in the option dialog. Only blit to the overlay on
the final pass. Gets rid of highly annoying flickers on androids
2011-02-24 23:18:34 +01:00
dhewg
c8551b80dd GUI: Properly clear the screen buffer
Don't operate on the overlay, it might be a pointer to a texture
used by the hardware. This get's rid of some annoying flickers on
androids
2011-02-24 23:18:34 +01:00
Johannes Schickel
7b8b73f64a GUI: Update cursor palette handling for RGBA->RGB change. 2011-02-14 17:08:32 +01:00
Jordi Vilalta Prat
8393bc5b5f I18N: Don't build TranslationManager when translation is disabled.
svn-id: r54684
2010-11-30 18:50:19 +00:00
Max Horn
3450f47667 GUI: Fix bug in ThemeEngine::addFont related to localized fonts
Basically, it was remembering the font under its non-localized name.
This resulted in a leak, and potentially could have caused the wrong
font to be used in a localization.

svn-id: r54256
2010-11-15 23:52:06 +00:00
Max Horn
8799db594e GUI: Tweak ThemeEngine methods to use Common::String params & const qualifier
svn-id: r54255
2010-11-15 23:51:46 +00:00
Jordi Vilalta Prat
8388e0dfea JANITORAL: Clean trailing whitespaces.
svn-id: r53160
2010-10-12 02:18:11 +00:00
Max Horn
a0c0b934c7 GUI: Replace GUI_ENABLE_BUILTIN_THEME by DISABLE_GUI_BUILTIN_THEME
svn-id: r52936
2010-09-28 20:31:17 +00:00
Thierry Crozat
b1f63deba3 GUI: Partial fix to bug #3075649 Fonts not found with buit-in theme
When the locale font are not found when loading the theme, it now
fallbacks to default language (i.e. English) and default font. For this to work
I had to move the TranslationManager initialization before the Theme is
loaded. Therefore it is now initialized when the GuiManager is constructed.

svn-id: r52896
2010-09-25 22:47:00 +00:00
Johannes Schickel
2a353089aa GUI: Remove dead code.
This code was added when tooltip support was added. Since we changed the way
how tooltips are drawn later on, this code is not required anymore. Actually
it was never used, but it could've been used to save/restore the state of the
GUI for the tooltips.

svn-id: r52717
2010-09-14 00:34:12 +00:00
Thierry Crozat
1f986e14af i18n: Add lowres context in a few places.
I also changed the english text for the GUI Renderer items in 1x mode
as the text was tool long and cut.

svn-id: r52683
2010-09-12 11:43:51 +00:00
Thierry Crozat
37027d6531 I18N: Add "lowres" context for several GUI strings when in 1x mode.
This enables translators to use a different translation for these strings in
1x mode (e.g. 320x200 or 320x240) and in 2x or 3x modes.

svn-id: r52461
2010-08-30 22:24:40 +00:00