Line 465:
Line 465:
</source>
</source>
−
Last, you ''must'' remove any GuiElements you have Append()ed in your menu (unless it was declared globally, but you should still remove it) before returning to the MainMenu function, or else the GUI will keep trying to display an image that doesn't exist any more. Use the Delete() function, which takes in a GuiElement:
+
Last, you ''must'' remove any GuiElements you have Append()ed in your menu (unless it was declared globally, but you should still remove it) before returning to the MainMenu function, or else the GUI will keep trying to display an image that doesn't exist any more. Use the Remove() function, which takes in a GuiElement:
<source lang = "cpp">
<source lang = "cpp">
−
mainWindow->Delete(&image);
+
mainWindow->Remove(&image);
</source>
</source>
Line 630:
Line 630:
}
}
−
mainWindow->Delete(&image);
+
mainWindow->Remove(&image);
return menu;
return menu;
}
}