/*---------------------------------------------------------------------------* Copyright (C) Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. *---------------------------------------------------------------------------*/ #ifndef __DEMOWIN_HELD_BUTTON_H #define __DEMOWIN_HELD_BUTTON_H struct HeldButton : public MenuItem { HeldButton(Window* window, CVec3 position, CVec2 size, ColorFunc _colorFunc = BlackLighter, VoidFuncP _func = DoNothingVoidP, void* _funcExtra = NULL) : MenuItem(window, position, size), text(""), tex(NULL), colorFunc(_colorFunc), func(_func), funcExtra(_funcExtra) {} HeldButton(Window* window, CVec3 position, CVec2 size, const char* _text, ColorFunc _colorFunc = BlackLighter, VoidFuncP _func = DoNothingVoidP, void* _funcExtra = NULL) : MenuItem(window, position, size), text(_text), tex(NULL), colorFunc(_colorFunc), func(_func), funcExtra(_funcExtra) {} HeldButton(Window* window, CVec3 position, CVec2 size, GX2Texture** _tex, ColorFunc _colorFunc = BlackLighter, VoidFuncP _func = DoNothingVoidP, void* _funcExtra = NULL) : MenuItem(window, position, size), text(""), tex(_tex), colorFunc(_colorFunc), func(_func), funcExtra(_funcExtra) {} static HeldButton* Add(const HeldButton& item); bool Update(); void Draw(); void Reset(); String text; GX2Texture** tex; ColorFunc colorFunc; VoidFuncP func; void* funcExtra; }; #endif