Maarten ter Huurne
60183e539d
Removed most uses of naked Surface pointers
...
However, SurfaceCollection remains a very important user.
2014-08-10 14:21:14 +02:00
Maarten ter Huurne
4bd1c799bd
Created separate subclasses for output and off-screen surfaces
...
There are a few exclusive operations for each type. Also we no longer
need the freeWhenDone flag since the class now determines whether the
surface should be freed or not.
2014-08-10 13:25:54 +02:00
Maarten ter Huurne
aff5f53f7d
Don't pass around naked Surface pointers when drawing
...
Use references instead.
2014-08-10 04:26:59 +02:00
Maarten ter Huurne
20c5ec4eb6
Put Surface argument first in Dialog paint methods
...
This is the convention that most classes stick to. The likely reason
why Dialog didn't stick to the convention was to be able to provide
a default value for this argument, but that feature wasn't very useful
since every caller already had access to the default surface.
2014-08-10 04:02:10 +02:00
Maarten ter Huurne
902145b698
Removed Surface::write method
...
All it did was redirect to Font::write, so it's better to call that
method directly.
2014-07-31 23:16:51 +02:00
Maarten ter Huurne
0810a26589
Removed unnecessary includes of SDL_gfx header
...
Only surface.cpp actually uses SDL_gfx functions.
2014-07-19 00:43:05 +02:00
Nebuleon Fumika
099bd24556
Use the font's suggested line height instead of its ascent and descent.
...
In well-described fonts, this enables multi-line text (e.g. in manuals) to be
more readable.
The term "height" is also replaced with "line spacing" in Font's code.
2014-07-17 02:03:02 +02:00
Paul Cercueil
ae6f52a0a3
Fix BrowseDialog and InputDialog rendering incorrectly
...
Parts of the background were still visible when the upper and
lower bars were transparent.
2014-01-16 01:19:34 +01:00
Paul Cercueil
cfb96dd697
Pass a Surface to ButtonBox' and IconButton's paint function
2014-01-16 01:19:34 +01:00
Paul Cercueil
61a79cd3d9
InputDialog: Make SETTINGS button confirm and MENU button cancel
2013-11-30 02:27:45 +01:00
Maarten ter Huurne
6c80a663e1
Check for empty strings using empty() instead of comparing to ""
2013-08-16 09:16:04 +02:00
Maarten ter Huurne
724aefe482
Renamed ASFont class to just Font
...
Originally the font implementation was based on SFont, but it was
recently replaced by an SDL_ttf based implementation, so the name
no longer made sense.
2013-08-03 22:30:12 +02:00
Maarten ter Huurne
0046fa9e19
Made ASFont::utf8Code() a function in inputdialog.cpp instead
...
The implementation doesn't make sense to me, but that's something for
another day; at least it is together with the code that calls it now.
2013-08-03 22:02:50 +02:00
Paul Cercueil
88f54e1ccc
Drop incredibly dirty and huge file FastDelegate.h
...
It's way too over-engineered for what we need to do, and we can
do much simpler using C++11.
2013-07-29 12:58:25 -04:00
Maarten ter Huurne
8f57afcf53
Explicitly convert 32-bit integers to 16-bit.
...
GCC 4.7.0 warns that C++11 considers doing this implicitly ill-formed.
2012-04-10 23:01:16 +02:00
Maarten ter Huurne
1ad6b2f25a
Made GMenu2X::ts private.
...
Pass Touchscreen reference to constructors instead of pulling it from
the GMenu2X class.
2011-12-23 14:03:05 +01:00
Maarten ter Huurne
944ab86f9c
Cleanup of touch screen code.
...
Initialize in constructor and clean up in destructor instead of having separate init() and deinit() methods.
Don't close file descriptor if open failed (ts_fd == -1).
Renamed initialized() to available(), since it tests whether the touch screen was found, not whether an initialization was attempted.
Improved code layout and minor other cleanups.
2011-12-23 12:30:15 +01:00
Maarten ter Huurne
f28e4f6d89
Minimized gmenu2x.h.
...
Everything that does not need to be shared was moved to gmenu2x.cpp.
2011-10-23 17:27:29 +02:00
Maarten ter Huurne
40fcd5137e
InputDialog: header cleanup.
2011-10-23 12:46:52 +02:00
Maarten ter Huurne
55cabcea49
InputDialog: do not return anything from drawVirtualKeyboard().
...
The returned value (action) was ignored, so don't bother returning it.
2011-10-23 12:00:46 +02:00
Maarten ter Huurne
fa5a9816db
InputDialog: re-layouted code.
...
No functional changes.
2011-10-23 11:57:50 +02:00
Maarten ter Huurne
315bf0a180
InputManager: C++-style type definitions.
...
There is no need to typedef enums and structs in C++.
Put types defined by InputManager inside the class namespace.
Changed type names to CamelCase.
2011-10-23 09:04:12 +02:00
Ayla
759eefd676
The files "a.png" and "b.png" have been renamed to "cancel.png" and "accept.png".
2011-09-18 03:40:33 +02:00
Ayla
b5131c1db9
Modified the key shortcuts of the text input dialog, so that the X and Y keys are not used.
2011-09-18 02:05:15 +02:00
Ayla
5f77e3baf7
Cleaned GP2X-specific code that was built on all platforms.
...
There was a lot of gp2x-specific code which was built for
all platform. For instance, the code was compiled for all
the platforms with the constant "TARGET_GP2X" defined.
This obviously had to be fixed.
2011-07-29 01:13:35 +02:00
Maarten ter Huurne
a35a7e2c35
Introduced enums for text alignment in the ASFont class.
2011-05-09 05:17:25 +02:00
Ayla
563cb34a89
Rewrote the whole input system.
...
Gmenu2X will no longer eat 100% CPU ;)
2010-09-17 22:34:26 +02:00
Maarten ter Huurne
d03dbea9bd
Give InputDialog a direct reference to the Touchscreen and InputManager objects instead of fetching them from the GMenu2X object.
2010-07-27 22:56:03 +02:00
Maarten ter Huurne
b78ffa704a
Converted public fields of Touchscreen to private.
2010-07-26 05:45:56 +02:00
Lars-Peter Clausen
6da573f303
Move methods only used by dialogs from the GMenu2x class to a common base class
...
for all dialog classes.
2010-05-05 14:35:52 +02:00
Lars-Peter Clausen
7fd1ab032a
Use a simple array instead of a hashmap for the colors.
2010-05-02 19:53:06 +02:00
Lars-Peter Clausen
40a26e1a9c
pass strings by reference where possible
2010-05-02 14:38:16 +02:00
Mirko Lindner
cddcd72e33
initial commit - needs clean-up
...
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-04 12:33:47 +01:00