mirror of
https://github.com/gwdevhub/gMod.git
synced 2026-07-22 18:39:31 +00:00
uMod2 Alpha Version: known bugs: I disabled the remove device function inside the gui, because something in the event handling goes terrible wrong.
Implemented a some new features.
This commit is contained in:
+156
-30
@@ -23,19 +23,20 @@ along with Universal Modding Engine. If not, see <http://www.gnu.org/licenses/>
|
||||
#include "uMod_Main.h"
|
||||
|
||||
// this page is opened if a game is started.
|
||||
class uMod_GamePage : public wxScrolledWindow
|
||||
class uMod_GamePage : public wxPanel
|
||||
{
|
||||
public:
|
||||
uMod_GamePage( wxNotebook *parent, const wxString &exe, const wxString &save, PipeStruct &pipe);
|
||||
uMod_GamePage( wxNotebook *parent, const wxString &exe, int injection_method, const wxString &save, PipeStruct &pipe);
|
||||
virtual ~uMod_GamePage(void);
|
||||
|
||||
int AddTexture( const wxString &file_name);
|
||||
|
||||
int UpdateGame(void);
|
||||
int ReloadGame(void);
|
||||
|
||||
int SaveTemplate( const wxString &file_name);
|
||||
int SaveTemplateToString( wxString &content);
|
||||
|
||||
int LoadTemplate( const wxString &file_name);
|
||||
int LoadTemplateFromString( const wxString &content);
|
||||
|
||||
wxString GetExeName(void) {return ExeName;}
|
||||
wxString GetTemplateName(void) {return TemplateName;}
|
||||
@@ -46,15 +47,86 @@ public:
|
||||
int SetSavePath(const wxString &path);
|
||||
wxString GetSavePath(void) {return Game.GetSavePath();}
|
||||
|
||||
/**
|
||||
* User started drag
|
||||
* @param event
|
||||
*/
|
||||
void OnBeginDrag( wxDataViewEvent &event);
|
||||
/**
|
||||
* Ask if drop position is valid
|
||||
* @param event
|
||||
*/
|
||||
void OnDropPossible( wxDataViewEvent &event);
|
||||
/**
|
||||
* User dropped the item
|
||||
* @param event
|
||||
*/
|
||||
void OnDrop( wxDataViewEvent &event);
|
||||
|
||||
void OnButtonUp(wxCommandEvent& WXUNUSED(event));
|
||||
void OnButtonDown(wxCommandEvent& WXUNUSED(event));
|
||||
void OnButtonDelete(wxCommandEvent& WXUNUSED(event));
|
||||
void OnDropFile(wxDropFilesEvent& event);
|
||||
|
||||
/**
|
||||
* Gets called, when the capture texture panel is shown/hidden
|
||||
* @param WXUNUSED
|
||||
*/
|
||||
void OnCollPane(wxCollapsiblePaneEvent& WXUNUSED(event));
|
||||
|
||||
/**
|
||||
* Gets called, when the colour buttons are pressed
|
||||
* @param event
|
||||
*/
|
||||
void OnButtonColour(wxCommandEvent& event);
|
||||
|
||||
/**
|
||||
* Gets called, when one of the check boxes gets checked/unchecked
|
||||
* @param event
|
||||
*/
|
||||
void OnCheckBox(wxCommandEvent& event);
|
||||
|
||||
/**
|
||||
* Gets called, press the button to select the filtered texture formats.
|
||||
* @param event
|
||||
*/
|
||||
void OnButtonFormatFilter(wxCommandEvent& event);
|
||||
|
||||
/**
|
||||
* Gets called, when the save-path button is pressed
|
||||
* @param event
|
||||
*/
|
||||
void OnButtonSavePath(wxCommandEvent& event);
|
||||
|
||||
|
||||
/**
|
||||
* Gets called by a rigth click in the ViewCtrl
|
||||
* @param event
|
||||
*/
|
||||
void OnContextMenu( wxDataViewEvent &event );
|
||||
int OpenPackage(void);
|
||||
|
||||
|
||||
/**
|
||||
* call to change the labels of all items to the actual language
|
||||
* @return
|
||||
*/
|
||||
int UpdateLanguage(void);
|
||||
|
||||
/**
|
||||
* get the actual name of the page (displayed in the tab of the notebook window)
|
||||
* @return
|
||||
*/
|
||||
wxString GetPageName(void);
|
||||
|
||||
/**
|
||||
* The game has created a DirectX device.
|
||||
* @param version device version (e.g. DX9, DX9Ex, DX10 DX10.1
|
||||
* @return
|
||||
*/
|
||||
int AddDXDevice(int version);
|
||||
/**
|
||||
* The game hast destroyed a DirectX device.
|
||||
* @param version
|
||||
* @return
|
||||
*/
|
||||
int RemoveDXDevice(int version);
|
||||
|
||||
|
||||
@@ -62,42 +134,96 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
int CounterDX9, CounterDX9EX;
|
||||
int CounterDX10, CounterDX10EX;
|
||||
/**
|
||||
* Set the info text (which injection method is used and which kind of DirectX device is connected)
|
||||
* @return
|
||||
*/
|
||||
int SetInfo(void);
|
||||
|
||||
const int InjectionMethod;
|
||||
int CounterDX9, CounterDX9EX;
|
||||
int CounterDX10, CounterDX101;
|
||||
|
||||
/**
|
||||
* add a single package (or file)
|
||||
* @param file_name
|
||||
* @return
|
||||
*/
|
||||
int AddPackage( const wxString &file_name);
|
||||
|
||||
/**
|
||||
* adds multiple packages (or files)
|
||||
* @param files
|
||||
* @param num
|
||||
* @return
|
||||
*/
|
||||
int AddPackages(const wxString *files, int num);
|
||||
|
||||
/**
|
||||
* adds multiple packages (or files)
|
||||
* @param files
|
||||
* @return
|
||||
*/
|
||||
int AddPackages(const wxArrayString &files);
|
||||
|
||||
/**
|
||||
* ask for all values from the various control elements of this panel and updates \a Game
|
||||
* @return
|
||||
*/
|
||||
int GetSettings(void);
|
||||
int SetColour( wxTextCtrl** txt, int *colour);
|
||||
int GetColour( wxTextCtrl* txt, int def);
|
||||
|
||||
|
||||
wxString ExeName;
|
||||
wxString TemplateName;
|
||||
|
||||
wxBoxSizer *SizerKeys[2];
|
||||
wxTextCtrl *TextKeyBack;
|
||||
wxTextCtrl *TextKeySave;
|
||||
wxTextCtrl *TextKeyNext;
|
||||
wxChoice *ChoiceKeyBack;
|
||||
wxChoice *ChoiceKeySave;
|
||||
wxChoice *ChoiceKeyNext;
|
||||
|
||||
wxBoxSizer *FontColourSizer;
|
||||
wxTextCtrl *FontColour[4];
|
||||
wxBoxSizer *TextureColourSizer;
|
||||
wxTextCtrl *TextureColour[4];
|
||||
|
||||
wxBoxSizer *MainSizer;
|
||||
|
||||
wxTextCtrl *DX_DLL_Info;
|
||||
wxTextCtrl *TemplateFile;
|
||||
wxCheckBox *SaveAllTextures;
|
||||
|
||||
wxCollapsiblePane *CollPane;
|
||||
wxBoxSizer *CollSizer;
|
||||
|
||||
wxBoxSizer *TextureSizer;
|
||||
|
||||
wxPanel *SingleTexturePanel;
|
||||
wxBoxSizer *SingleTextureSizer;
|
||||
wxCheckBox *SaveSingleTexture;
|
||||
wxCheckBox *ShowSingleTextureString;
|
||||
|
||||
|
||||
uMod_KeyPanel *KeyBack;
|
||||
uMod_KeyPanel *KeySave;
|
||||
uMod_KeyPanel *KeyNext;
|
||||
|
||||
wxButton *FontColour;
|
||||
wxButton *TextureColour;
|
||||
|
||||
|
||||
wxPanel *AllTexturePanel;
|
||||
wxBoxSizer *AllTextureSizer;
|
||||
wxCheckBox *SaveAllTextures;
|
||||
|
||||
wxCheckBox *UseSizeFilter;
|
||||
|
||||
uMod_SpinPanel *SpinWidth;
|
||||
uMod_SpinPanel *SpinHeight;
|
||||
uMod_SpinPanel *SpinDepth;
|
||||
|
||||
|
||||
wxCheckBox *UseFormatFilter;
|
||||
wxButton *FormatFilter;
|
||||
|
||||
|
||||
uMod_CheckBoxArray *FileFormats;
|
||||
wxButton *SavePathButton;
|
||||
wxTextCtrl *SavePath;
|
||||
|
||||
wxBoxSizer **CheckBoxHSizers;
|
||||
wxButton **CheckButtonUp;
|
||||
wxButton **CheckButtonDown;
|
||||
wxButton **CheckButtonDelete;
|
||||
wxDataViewCtrl *ViewCtrl;
|
||||
uMod_TreeViewModel *ViewModel;
|
||||
wxDataViewItem *LastDataViewItem;
|
||||
|
||||
wxCheckBox **CheckBoxes;
|
||||
int NumberOfEntry;
|
||||
int MaxNumberOfEntry;
|
||||
|
||||
@@ -109,7 +235,7 @@ private:
|
||||
uMod_Sender Sender;
|
||||
|
||||
|
||||
//DECLARE_EVENT_TABLE();
|
||||
DECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
#endif /* uMod_GAMEPAGE_H_ */
|
||||
|
||||
Reference in New Issue
Block a user