2022-09-15

Only last wxStaticBitmap is showing

The same image is meant to be shown in different locations but only the second one is shown, why?

void AppFrame::OnButtonClicked(wxCommandEvent& evt) {

    Tiles* knots = new Tiles(panel, 1);
    string tile = knots->firstTile();
    ImagePanel* drawPane = new ImagePanel(panel, tile, wxBITMAP_TYPE_PNG);

    wxStaticBitmap* image1 = new wxStaticBitmap(panel, wxID_ANY, drawPane->getImage(),wxPoint(Background::defaultStartX, Background::defaultStartY), wxSize(100, 100));
  
    wxStaticBitmap* image2 = new wxStaticBitmap(panel, wxID_ANY, drawPane->getImage(),wxPoint(Background::defaultStartX+100, Background::defaultStartY), wxSize(100, 100));

}


No comments:

Post a Comment