Added primitive update window.

Added diagonal directions (todo: add different text direcitons, primarily for Space)
Cleaned up keyword game file a bit.


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@600 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2007-08-05 00:38:12 +00:00
parent 633621558d
commit 1ce4bd9c3d
11 changed files with 275 additions and 11 deletions
+37
View File
@@ -10,6 +10,7 @@
// ----------------------------------------------------------------------------- : Includes
#include <util/prec.hpp>
#include <wx/html/htmlwin.h>
// ----------------------------------------------------------------------------- : Update checking
@@ -26,6 +27,42 @@ void check_updates_now(bool async = true);
* Call this function from an onIdle loop */
void show_update_dialog(Window* parent);
class PackageUpdateList;
DECLARE_POINTER_TYPE(PackageVersionData);
/// A window that displays the updates and allows the user to select some.
class UpdateWindow : public Frame {
public:
UpdateWindow();
void DrawTitles(wxPaintEvent&);
enum PackageStatus {
STATUS_INSTALLED,
STATUS_NOT_INSTALLED,
STATUS_UPGRADEABLE
};
enum PackageAction {
ACTION_INSTALL,
ACTION_UNINSTALL,
ACTION_UPGRADE,
ACTION_NOTHING,
ACTION_NEW_MSE
};
typedef pair<PackageStatus, PackageAction> PackageData;
map<PackageVersionDataP, PackageData> package_data;
void SetDefaultPackageStatus(wxCommandEvent&);
private:
DECLARE_EVENT_TABLE();
PackageUpdateList* package_list;
wxHtmlWindow* description_window;
wxStaticText *package_title, *status_title, *new_title;
};
/// Was update data found?
bool update_data_found();
/// Is there an update?