]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/preferences.h
basic architecture for game configuration at runtime. writes out a .game, no sanity...
[xonotic/netradiant.git] / radiant / preferences.h
index 581c8fe780dcfc464b494553c33d33ab02510d3b..908616adc5eea9bd889d0428daddd25fb8b97253 100644 (file)
@@ -193,6 +193,27 @@ public:
   void Dump();
 };
 
+/*!
+select games, copy editing assets and write out configuration files
+ */
+class CGameInstall : public Dialog {
+public:
+       void Run();
+       void BuildDialog();
+
+       enum gameType_e {
+               GAME_Q3,
+               GAME_URT,
+               GAME_WARSOW
+       };
+
+protected:
+       Str m_strName;
+       Str     m_strMod;
+       Str m_strEngine;
+       int m_nComboSelect;
+};
+
 /*!
 standalone dialog for games selection, and more generally global settings
 */
@@ -217,6 +238,10 @@ class CGameDialog : public Dialog
   static bool m_bNetRun;
 #endif
 
+  bool m_bDoGameInstall;
+
+  CGameInstall mGameInstall;
+
 protected:
   
   int m_nComboSelect; ///< intermediate int value for combo in dialog box
@@ -258,10 +283,16 @@ public:
   */
   list<CGameDescription *> mGames;
 
-  CGameDialog() { mFrame = NULL; m_pCurrentGameDescription = NULL; m_bLogConsole = false; m_bForceLogConsole = false; }
+  CGameDialog() {
+         mFrame = NULL;
+         m_pCurrentGameDescription = NULL;
+         m_bLogConsole = false;
+         m_bForceLogConsole = false;
+         m_bDoGameInstall = true;      // go through DoModal at least once
+  }
   virtual ~CGameDialog(); 
 
-  void AddPacksURL(Str &s);  
+  void AddPacksURL( Str &s );
     
   /*!
   intialize the game dialog, called at CPrefsDlg::Init
@@ -279,12 +310,17 @@ public:
   */
   void DoGameDialog();
 
+  /*!
+       call out to the game installation dialog
+  */
+  void DoGameInstall();
+
   /*!
   Dialog API
   this is only called when the dialog is built at startup for main engine select
   */
-  void BuildDialog ();
-  void UpdateData (bool retrieve);
+  void BuildDialog();
+  void UpdateData( bool retrieve );
 
   /*!
   construction of the dialog frame
@@ -335,6 +371,11 @@ private:
   uses m_nComboItem to find the right mGames
   */
   CGameDescription *GameDescriptionForComboItem();
+
+  /*!
+       callback for the game install button
+  */
+  static void SInstallCallback( GtkWidget *widget, gpointer data );
 };
 
 typedef struct {