[Project64] Cleanup CheatClassUI.cpp

This commit is contained in:
zilmar 2015-12-24 06:26:17 +11:00
parent a7fbfd03cc
commit 9dd34caf87
2 changed files with 1329 additions and 1329 deletions

File diff suppressed because it is too large Load Diff

View File

@ -13,59 +13,59 @@
class CCheatsUI class CCheatsUI
{ {
public: public:
CCheatsUI(void); CCheatsUI(void);
~CCheatsUI(void); ~CCheatsUI(void);
bool IsCheatMessage(MSG * msg); bool IsCheatMessage(MSG * msg);
void SelectCheats(HWND hParent, bool BlockExecution); void SelectCheats(HWND hParent, bool BlockExecution);
private: private:
static int CALLBACK CheatAddProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, uint32_t lParam); static int CALLBACK CheatAddProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, uint32_t lParam);
static int CALLBACK CheatListProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, uint32_t lParam); static int CALLBACK CheatListProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, uint32_t lParam);
static int CALLBACK ManageCheatsProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, uint32_t lParam); static int CALLBACK ManageCheatsProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, uint32_t lParam);
static int CALLBACK CheatsCodeExProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, uint32_t lParam); static int CALLBACK CheatsCodeExProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, uint32_t lParam);
static int CALLBACK CheatsCodeQuantProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, uint32_t lParam); static int CALLBACK CheatsCodeQuantProc(HWND hDlg, uint32_t uMsg, uint32_t wParam, uint32_t lParam);
//information about the gui for selecting cheats //information about the gui for selecting cheats
HWND m_Window, m_hSelectCheat, m_AddCheat, m_hCheatTree, m_hSelectedItem; HWND m_Window, m_hSelectCheat, m_AddCheat, m_hCheatTree, m_hSelectedItem;
void * const m_rcList, *const m_rcAdd; void * const m_rcList, *const m_rcAdd;
int m_MinSizeDlg, m_MaxSizeDlg; int m_MinSizeDlg, m_MaxSizeDlg;
int m_EditCheat; int m_EditCheat;
bool m_DeleteingEntries; bool m_DeleteingEntries;
//Information about the current cheat we are editing //Information about the current cheat we are editing
stdstr m_EditName; stdstr m_EditName;
stdstr m_EditCode; stdstr m_EditCode;
stdstr m_EditOptions; stdstr m_EditOptions;
stdstr m_EditNotes; stdstr m_EditNotes;
enum Dialog_State { CONTRACTED, EXPANDED } m_DialogState; enum Dialog_State { CONTRACTED, EXPANDED } m_DialogState;
enum TV_CHECK_STATE { TV_STATE_UNKNOWN, TV_STATE_CLEAR, TV_STATE_CHECKED, TV_STATE_INDETERMINATE }; enum TV_CHECK_STATE { TV_STATE_UNKNOWN, TV_STATE_CLEAR, TV_STATE_CHECKED, TV_STATE_INDETERMINATE };
enum { IDC_MYTREE = 0x500 }; enum { IDC_MYTREE = 0x500 };
void AddCodeLayers(int CheatNumber, const stdstr &CheatName, HWND hParent, bool CheatActive); void AddCodeLayers(int CheatNumber, const stdstr &CheatName, HWND hParent, bool CheatActive);
//Reload the cheats from the ini file to the select gui //Reload the cheats from the ini file to the select gui
void RefreshCheatManager(); void RefreshCheatManager();
void ChangeChildrenStatus(HWND hParent, bool Checked); void ChangeChildrenStatus(HWND hParent, bool Checked);
void CheckParentStatus(HWND hParent); void CheckParentStatus(HWND hParent);
static stdstr ReadCodeString(HWND hDlg, bool &validcodes, bool &validoption, bool &nooptions, int &codeformat); static stdstr ReadCodeString(HWND hDlg, bool &validcodes, bool &validoption, bool &nooptions, int &codeformat);
static stdstr ReadOptionsString(HWND hDlg, bool &validcodes, bool &validoptions, bool &nooptions, int &codeformat); static stdstr ReadOptionsString(HWND hDlg, bool &validcodes, bool &validoptions, bool &nooptions, int &codeformat);
void RecordCheatValues(HWND hDlg); void RecordCheatValues(HWND hDlg);
bool CheatChanged(HWND hDlg); bool CheatChanged(HWND hDlg);
void DeleteCheat(int Index); void DeleteCheat(int Index);
//Get Information about the Cheat //Get Information about the Cheat
stdstr GetCheatName(int CheatNo, bool AddExtension) const; stdstr GetCheatName(int CheatNo, bool AddExtension) const;
static bool CheatUsesCodeExtensions(const stdstr &LineEntry); static bool CheatUsesCodeExtensions(const stdstr &LineEntry);
//Working with treeview //Working with treeview
static bool TV_SetCheckState(HWND hwndTreeView, HWND hItem, TV_CHECK_STATE state); static bool TV_SetCheckState(HWND hwndTreeView, HWND hItem, TV_CHECK_STATE state);
static int TV_GetCheckState(HWND hwndTreeView, HWND hItem); static int TV_GetCheckState(HWND hwndTreeView, HWND hItem);
static void MenuSetText(HMENU hMenu, int MenuPos, const wchar_t * Title, const wchar_t * ShortCut); static void MenuSetText(HMENU hMenu, int MenuPos, const wchar_t * Title, const wchar_t * ShortCut);
//UI Functions //UI Functions
static stdstr GetDlgItemStr(HWND hDlg, int nIDDlgItem); static stdstr GetDlgItemStr(HWND hDlg, int nIDDlgItem);
}; };
extern CCheatsUI * g_cheatUI; extern CCheatsUI * g_cheatUI;