mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-09 12:42:11 +00:00
1718d735b5
This patch implements a custom widget that can switch its texture on-the-fly, making it obsolete having to use an atlas to get a hover animation. This also removes the predefined size restriction and should now work with all button texture sizes.
24 lines
401 B
C++
24 lines
401 B
C++
#include <openengine/gui/layout.hpp>
|
|
|
|
#include "imagebutton.hpp"
|
|
|
|
namespace MWGui
|
|
{
|
|
|
|
class MainMenu : public OEngine::GUI::Layout
|
|
{
|
|
public:
|
|
MainMenu(int w, int h);
|
|
|
|
void onResChange(int w, int h);
|
|
|
|
private:
|
|
MyGUI::Widget* mButtonBox;
|
|
|
|
std::map<std::string, MWGui::ImageButton*> mButtons;
|
|
|
|
void onButtonClicked (MyGUI::Widget* sender);
|
|
};
|
|
|
|
}
|