From 74ac6060ccb68e6ae80dbcb44d11f07a17e26034 Mon Sep 17 00:00:00 2001 From: that Date: Wed, 4 Mar 2015 22:39:34 +0100 Subject: gui: type safe resources part 2 - separate collections for fonts, images, animations - no more ugly casts - fix crash if main ui.xml did not define any resources but include did - don't stop loading resources if one "type" attribute is missing Change-Id: I70c1c9ca66ca65d9fba1ba3eded34f3d8a07488e --- gui/pages.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gui/pages.hpp') diff --git a/gui/pages.hpp b/gui/pages.hpp index 8eec9a951..50155d0e9 100644 --- a/gui/pages.hpp +++ b/gui/pages.hpp @@ -88,7 +88,7 @@ public: Page* FindPage(std::string name); int SetPage(std::string page); int SetOverlay(Page* page); - Resource* FindResource(std::string name); + const ResourceManager* GetResources(); // Helper routine for identifing if we're the current page int IsCurrentPage(Page* page); @@ -131,8 +131,7 @@ public: // Used for actions and pages static int ChangePage(std::string name); static int ChangeOverlay(std::string name); - static Resource* FindResource(std::string name); - static Resource* FindResource(std::string package, std::string name); + static const ResourceManager* GetResources(); // Used for console-only mode static int SwitchToConsole(void); -- cgit v1.2.3