Fix `Save` button on OAM Viewer for GB and GBA.

No idea why this was not implemented yet...
This commit is contained in:
Edênis Freindorfer Azevedo 2020-02-17 00:55:18 -03:00 committed by Rafael Kitover
parent dcaa1b9abc
commit c789020e93
3 changed files with 5 additions and 3 deletions

View File

@ -1174,7 +1174,7 @@ void GfxViewer::SaveBMP(wxCommandEvent& ev)
if (ret != wxID_OK) if (ret != wxID_OK)
return; return;
wxBitmap obmp = gv->bm->GetSubBitmap(wxRect(0, 0, gv->bmh, gv->bmh)); wxBitmap obmp = gv->bm->GetSubBitmap(wxRect(0, 0, gv->bmw, gv->bmh));
wxString fn = dlg.GetPath(); wxString fn = dlg.GetPath();
wxBitmapType fmt = dlg.GetFilterIndex() ? wxBITMAP_TYPE_BMP : wxBITMAP_TYPE_PNG; wxBitmapType fmt = dlg.GetFilterIndex() ? wxBITMAP_TYPE_BMP : wxBITMAP_TYPE_PNG;
@ -1200,6 +1200,8 @@ BEGIN_EVENT_TABLE(GfxViewer, Viewer)
EVT_CHECKBOX(XRCID("Stretch"), GfxViewer::StretchTog) EVT_CHECKBOX(XRCID("Stretch"), GfxViewer::StretchTog)
EVT_BUTTON(XRCID("Refresh"), GfxViewer::RefreshEv) EVT_BUTTON(XRCID("Refresh"), GfxViewer::RefreshEv)
EVT_BUTTON(XRCID("Save"), GfxViewer::SaveBMP) EVT_BUTTON(XRCID("Save"), GfxViewer::SaveBMP)
EVT_BUTTON(XRCID("SaveGBOAM"), GfxViewer::SaveBMP)
EVT_BUTTON(XRCID("SaveGBAOAM"), GfxViewer::SaveBMP)
END_EVENT_TABLE() END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(DispCheckBox, wxCheckBox) IMPLEMENT_DYNAMIC_CLASS(DispCheckBox, wxCheckBox)

View File

@ -145,7 +145,7 @@
<border>5</border> <border>5</border>
</object> </object>
<object class="sizeritem"> <object class="sizeritem">
<object class="wxButton" name="wxID_SAVE"> <object class="wxButton" name="SaveGBOAM">
<label>_Save...</label> <label>_Save...</label>
</object> </object>
<flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag> <flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag>

View File

@ -158,7 +158,7 @@
<border>5</border> <border>5</border>
</object> </object>
<object class="sizeritem"> <object class="sizeritem">
<object class="wxButton" name="wxID_SAVE"> <object class="wxButton" name="SaveGBAOAM">
<label>_Save...</label> <label>_Save...</label>
</object> </object>
<flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag> <flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag>