mirror of
https://github.com/gwdevhub/gMod.git
synced 2026-07-16 15:39:31 +00:00
071ac3ece5
known bugs: I disabled the remove device function inside the gui, because something in the event handling goes terrible wrong. Changes: - hashing algorithm is now a CRC64 value - changed CRC32 algorithm to a faster one - in save single texture mode, the selected texture can now be displayed - the way how uMod get the raw data of the texture was changed
156 lines
3.9 KiB
C++
156 lines
3.9 KiB
C++
/*
|
|
This file is part of Universal Modding Engine.
|
|
|
|
|
|
Universal Modding Engine is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
Universal Modding Engine is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with Universal Modding Engine. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
|
|
|
|
#ifndef uMod_GUI_H_
|
|
#define uMod_GUI_H_
|
|
|
|
|
|
#include "uMod_Main.h"
|
|
|
|
class uMod_Frame : public wxFrame
|
|
{
|
|
public:
|
|
uMod_Frame(const wxString& title, uMod_Settings &set);
|
|
~uMod_Frame(void);
|
|
|
|
|
|
/**
|
|
* A game has started and opend a pipe to the GUI. The Server thus create an event and send it to the main frame.
|
|
* @param event
|
|
*/
|
|
void OnAddGame( wxCommandEvent &event);
|
|
/**
|
|
* A game has quite and closed it pipe to the GUI. The Server thus create an event and send it to the main frame.
|
|
* @param event
|
|
*/
|
|
void OnDeleteGame( wxCommandEvent &event);
|
|
|
|
/**
|
|
* A game has created a DX device. The Server thus create an event and send it to the main frame.
|
|
* @param event
|
|
*/
|
|
void OnAddDevice( wxCommandEvent &event);
|
|
/**
|
|
* A game has deleted a DX device. The Server thus create an event and send it to the main frame.
|
|
* @param event
|
|
*/
|
|
void OnRemoveDevice( wxCommandEvent &event);
|
|
|
|
|
|
/**
|
|
* The user tries to close the GUI.
|
|
* @param WXUNUSED
|
|
*/
|
|
void OnClose(wxCloseEvent& WXUNUSED(event));
|
|
|
|
/*
|
|
void OnButtonOpen(wxCommandEvent& WXUNUSED(event));
|
|
void OnButtonPath(wxCommandEvent& WXUNUSED(event));
|
|
void OnButtonUpdate(wxCommandEvent& WXUNUSED(event));
|
|
void OnButtonReload(wxCommandEvent& WXUNUSED(event));
|
|
*/
|
|
void OnMenuStartGame( wxCommandEvent &event);
|
|
|
|
void OnMenuUseHook( wxCommandEvent &event);
|
|
void OnMenuAddGame(wxCommandEvent& WXUNUSED(event));
|
|
void OnMenuDeleteGame(wxCommandEvent& WXUNUSED(event));
|
|
|
|
void OnMenuOpenTemplate(wxCommandEvent& WXUNUSED(event));
|
|
void OnMenuSaveTemplate(wxCommandEvent& WXUNUSED(event));
|
|
void OnMenuSetDefaultTemplate(wxCommandEvent& WXUNUSED(event));
|
|
void OnMenuLanguage(wxCommandEvent& WXUNUSED(event));
|
|
|
|
void OnMenuExit(wxCommandEvent& WXUNUSED(event));
|
|
|
|
void OnMenuHelp(wxCommandEvent& WXUNUSED(event));
|
|
void OnMenuAbout(wxCommandEvent& WXUNUSED(event));
|
|
void OnMenuAcknowledgement(wxCommandEvent& WXUNUSED(event));
|
|
|
|
private:
|
|
|
|
int ChooseTemplate( const wxString &message, wxString &file);
|
|
|
|
int ActivateGamesControl(void);
|
|
int DeactivateGamesControl(void);
|
|
|
|
uMod_Settings Settings;
|
|
int KillServer(void);
|
|
int GetHookedGames( wxArrayString &array);
|
|
int SetHookedGames( const wxArrayString &array);
|
|
|
|
int GetInjectedGames( wxArrayString &games, wxArrayString &cmd);
|
|
int SetInjectedGames( wxArrayString &games, wxArrayString &cmd);
|
|
|
|
|
|
|
|
uMod_Server *Server;
|
|
|
|
wxNotebook *Notebook;
|
|
|
|
/*
|
|
wxButton *OpenButton;
|
|
wxButton *DirectoryButton;
|
|
wxButton *UpdateButton;
|
|
wxButton *ReloadButton;
|
|
*/
|
|
|
|
wxMenuBar *MenuBar;
|
|
wxMenu *MenuMain;
|
|
wxMenu *MenuHelp;
|
|
|
|
wxBoxSizer *MainSizer;
|
|
//wxBoxSizer *ButtonSizer;
|
|
|
|
|
|
int NumberOfGames;
|
|
int MaxNumberOfGames;
|
|
uMod_Client **Clients;
|
|
|
|
int LoadTemplate(void);
|
|
int SaveTemplate(void);
|
|
wxArrayString SaveFile_Exe;
|
|
wxArrayString SaveFile_Name;
|
|
|
|
|
|
void InstallHook(void);
|
|
void RemoveHook(void);
|
|
|
|
HMODULE H_DX9_DLL;
|
|
|
|
wxString LastError;
|
|
|
|
DECLARE_EVENT_TABLE();
|
|
};
|
|
|
|
class MyApp : public wxApp
|
|
{
|
|
public:
|
|
virtual ~MyApp();
|
|
virtual bool OnInit();
|
|
|
|
private:
|
|
HANDLE CheckForSingleRun;
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|