starting playing the wherigo
Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <wx/wx.h>
|
||||
|
||||
class cFrame : public wxMDIParentFrame
|
||||
{
|
||||
public:
|
||||
cFrame();
|
||||
|
||||
private:
|
||||
void OnHello(wxCommandEvent& event);
|
||||
void OnExit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
};
|
||||
40
main/include/ui/game_screen.h
Normal file
40
main/include/ui/game_screen.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/notebook.h>
|
||||
|
||||
class cGameScreen : public wxFrame
|
||||
{
|
||||
public:
|
||||
cGameScreen(wxWindow *parent);
|
||||
|
||||
void refreshUI();
|
||||
|
||||
private:
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void OnExit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnSaveGame(wxCommandEvent& event);
|
||||
void OnLoadGame(wxCommandEvent& event);
|
||||
void OnExportCompletion(wxCommandEvent& event);
|
||||
void OnGameStateChanged(wxEvent& event);
|
||||
void OnZoneSelected(wxCommandEvent& event);
|
||||
void OnTaskSelected(wxCommandEvent& event);
|
||||
void OnInventorySelected(wxCommandEvent& event);
|
||||
void OnCharacterSelected(wxCommandEvent& event);
|
||||
void OnItemSelected(wxCommandEvent& event);
|
||||
|
||||
void populateZones();
|
||||
void populateTasks();
|
||||
void populateInventory();
|
||||
void populateCharacters();
|
||||
void populateItems();
|
||||
|
||||
wxNotebook* m_notebook;
|
||||
wxListBox* m_zoneList;
|
||||
wxListBox* m_taskList;
|
||||
wxListBox* m_inventoryList;
|
||||
wxListBox* m_characterList;
|
||||
wxListBox* m_itemList;
|
||||
};
|
||||
33
main/include/ui/start_screen.h
Normal file
33
main/include/ui/start_screen.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/statbmp.h>
|
||||
#include <wx/html/htmlwin.h>
|
||||
|
||||
class cGameScreen;
|
||||
|
||||
class cStartScreen : public wxFrame
|
||||
{
|
||||
public:
|
||||
cStartScreen();
|
||||
|
||||
void showCartridgeInfo();
|
||||
void onGameClosed();
|
||||
|
||||
private:
|
||||
void OnOpenCartridge(wxCommandEvent& event);
|
||||
void OnStartGame(wxCommandEvent& event);
|
||||
void OnExit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
|
||||
wxPanel* m_infoPanel;
|
||||
wxStaticText* m_cartridgeName;
|
||||
wxStaticText* m_cartridgeAuthor;
|
||||
wxHtmlWindow* m_cartridgeDesc;
|
||||
wxStaticBitmap* m_splashImage;
|
||||
wxButton* m_openButton;
|
||||
wxButton* m_startButton;
|
||||
|
||||
cGameScreen* m_gameFrame;
|
||||
bool m_cartridgeLoaded;
|
||||
};
|
||||
50
main/include/ui/wherigo_dialog.h
Normal file
50
main/include/ui/wherigo_dialog.h
Normal file
@@ -0,0 +1,50 @@
|
||||
#ifndef WHERIGO_DIALOG_H
|
||||
#define WHERIGO_DIALOG_H
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
|
||||
namespace wherigo {
|
||||
|
||||
struct DialogEntry {
|
||||
std::string text;
|
||||
std::string mediaName;
|
||||
std::vector<std::string> buttons;
|
||||
};
|
||||
|
||||
class WherigoMessageDialog : public wxDialog {
|
||||
public:
|
||||
WherigoMessageDialog(wxWindow *parent, const wxString &text,
|
||||
const wxString &title = "Wherigo",
|
||||
const std::vector<wxString> &buttons = {},
|
||||
const wxString &mediaName = "");
|
||||
|
||||
int getSelectedButton() const { return m_selectedButton; }
|
||||
|
||||
private:
|
||||
void onButton(wxCommandEvent &event);
|
||||
|
||||
int m_selectedButton = -1;
|
||||
};
|
||||
|
||||
class WherigoDialogRunner {
|
||||
public:
|
||||
static WherigoDialogRunner& getInstance();
|
||||
|
||||
void showMessageBox(const wxString &text, const wxString &title = "Wherigo",
|
||||
std::function<void(int)> callback = nullptr);
|
||||
|
||||
void showDialog(const std::vector<DialogEntry> &entries,
|
||||
std::function<void(int)> callback = nullptr);
|
||||
|
||||
private:
|
||||
WherigoDialogRunner() = default;
|
||||
};
|
||||
|
||||
} // namespace wherigo
|
||||
|
||||
#endif // WHERIGO_DIALOG_H
|
||||
|
||||
Reference in New Issue
Block a user