Revision 1281269
Go back to digest for 26th February 2012Features in Games
Import KgDifficulty class (coming from Project Tagaro).
This is the GUI-independent essence of KGameDifficulty, and a bit more:
* KgDifficulty automatically saves and restores the level selection
across application restarts.
* The levels are virtual base classes, so applications can add more
metadata to them if desired.
* Instead of addStandardLevel (which can be replicated in a one-liner),
there is the incredibly useful addStandardLevelRange call.
* All KgDifficulty capabilities are exposed through Q_PROPERTY, so it's
QML-ready.
Where possible, I tried to retain compatibility to KGameDifficulty, e.g.
in the StandardLevel enum. There are some intentional incompatibilites
though, most notably:
* KGameDifficulty::Configurable has been removed from the StandardLevel
enum. There's only ::Custom.
* setRestartOnChange() has been removed. If you want that behavior, use
setGameRunning(), otherwise just don't.
* The whole localization API has been removed. Iterate over the levels
to retrieve that information if necessary.
File Changes
- /trunk/KDE/kdegames/libkdegames
- /kgdifficulty.cpp
- /kgdifficulty.h
- /includes/KgDifficulty
- /trunk/KDE/kdegames/libkdegames
- /CMakeLists.txt
- /includes/CMakeLists.txt