latest code update
- app icon - starting with map view - code cleanup Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
@@ -15,7 +15,7 @@ enum {
|
||||
};
|
||||
|
||||
cStartScreen::cStartScreen()
|
||||
: wxFrame(nullptr, wxID_ANY, "Wherigo Player", wxDefaultPosition, wxSize(800, 600)),
|
||||
: wxFrame(nullptr, wxID_ANY, "Wherigo Player", wxDefaultPosition, wxSize(800, 800)),
|
||||
m_gameFrame(nullptr),
|
||||
m_cartridgeLoaded(false) {
|
||||
|
||||
@@ -107,6 +107,20 @@ void cStartScreen::OnOpenCartridge(wxCommandEvent& event) {
|
||||
wxString filePath = openFileDialog.GetPath();
|
||||
SetStatusText("Lade Cartridge: " + filePath);
|
||||
|
||||
// Vor dem Laden: Info-Panel zurücksetzen
|
||||
if (m_infoPanel) {
|
||||
if (m_cartridgeName) m_cartridgeName->SetLabel("");
|
||||
if (m_cartridgeAuthor) m_cartridgeAuthor->SetLabel("");
|
||||
if (m_cartridgeDesc) m_cartridgeDesc->SetPage("");
|
||||
if (m_splashImage) m_splashImage->SetBitmap(wxNullBitmap);
|
||||
}
|
||||
|
||||
// ggf. alten GameScreen schließen
|
||||
if (m_gameFrame) {
|
||||
m_gameFrame->Destroy();
|
||||
m_gameFrame = nullptr;
|
||||
}
|
||||
|
||||
// Load the cartridge via cApp
|
||||
if (wxGetApp().loadCartridge(filePath.ToStdString())) {
|
||||
m_cartridgeLoaded = true;
|
||||
|
||||
Reference in New Issue
Block a user