1 /*---------------------------------------------------------------------------*
2 
3   Copyright (C) Nintendo.  All rights reserved.
4 
5   These coded instructions, statements, and computer programs contain
6   proprietary information of Nintendo of America Inc. and/or Nintendo
7   Company Ltd., and are protected by Federal copyright law.  They may
8   not be disclosed to third parties or copied or duplicated in any form,
9   in whole or in part, without the prior written consent of Nintendo.
10 
11  *---------------------------------------------------------------------------*/
12 
13 #ifndef __DEMOWIN_HELD_BUTTON_H
14 #define __DEMOWIN_HELD_BUTTON_H
15 
16 struct HeldButton : public MenuItem
17 {
18     HeldButton(Window* window, CVec3 position, CVec2 size, ColorFunc _colorFunc = BlackLighter, VoidFuncP _func = DoNothingVoidP, void* _funcExtra = NULL)
MenuItemHeldButton19         : MenuItem(window, position, size), text(""), tex(NULL), colorFunc(_colorFunc), func(_func), funcExtra(_funcExtra) {}
20 
21     HeldButton(Window* window, CVec3 position, CVec2 size, const char* _text, ColorFunc _colorFunc = BlackLighter, VoidFuncP _func = DoNothingVoidP, void* _funcExtra = NULL)
MenuItemHeldButton22         : MenuItem(window, position, size), text(_text), tex(NULL), colorFunc(_colorFunc), func(_func), funcExtra(_funcExtra) {}
23 
24     HeldButton(Window* window, CVec3 position, CVec2 size, GX2Texture** _tex, ColorFunc _colorFunc = BlackLighter, VoidFuncP _func = DoNothingVoidP, void* _funcExtra = NULL)
MenuItemHeldButton25         : MenuItem(window, position, size), text(""), tex(_tex), colorFunc(_colorFunc), func(_func), funcExtra(_funcExtra) {}
26 
27     static HeldButton* Add(const HeldButton& item);
28 
29     bool Update();
30     void Draw();
31     void Reset();
32 
33     String<MAX_NAME_LENGTH> text;
34     GX2Texture** tex;
35 
36     ColorFunc colorFunc;
37 
38     VoidFuncP func;
39     void* funcExtra;
40 };
41 
42 #endif
43