GUI: Add GridWidget destructor

This commit is contained in:
av-dx 2021-06-26 17:21:58 +05:30 committed by Eugene Sandulenko
parent 674e548d1b
commit 8f28b5f55f
2 changed files with 10 additions and 1 deletions

View File

@ -301,6 +301,14 @@ GridWidget::GridWidget(GuiObject *boss, const String &name)
}
}
GridWidget::~GridWidget() {
_platformIcons.clear();
_loadedSurfaces.clear();
_gridItems.clear();
_allEntries.clear();
_visibleEntries.clear();
}
const Graphics::ManagedSurface *GridWidget::filenameToSurface(const String &name) {
String path = String("./icons/")+name;

View File

@ -37,7 +37,7 @@ class ScrollBarWidget;
class GridItemWidget;
class GridWidget;
const Graphics::ManagedSurface *scaleGfx(Graphics::ManagedSurface *gfx, int w, int h);
const Graphics::ManagedSurface *scaleGfx(const Graphics::ManagedSurface *gfx, int w, int h);
// TODO: Add more platforms
enum Platform {
@ -155,6 +155,7 @@ public:
GridWidget(GuiObject *boss, int x, int y, int w, int h);
GridWidget(GuiObject *boss, const String &name);
~GridWidget();
const Graphics::ManagedSurface *filenameToSurface(const String &name);
const Graphics::ManagedSurface *languageToSurface(const String &lang);