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_SLIDER_BAR_H_
14 #define __DEMOWIN_SLIDER_BAR_H_
15 
16 struct SliderBar : public MenuItem
17 {
18     SliderBar(Window* window, CVec3 position, CVec2 size, int _min, int _max, int* _target, VoidFuncP _func = DoNothingVoidP, void* _funcExtra = NULL)
MenuItemSliderBar19         : MenuItem(window, position, size), min(_min), max(_max), target(_target), func(_func), funcExtra(_funcExtra)
20         {pos = *target;}
21 
22     static SliderBar* Add(const SliderBar& item);
23 
24     static void Increment(void* data);
25     static void Decrement(void* data);
26 
27     bool Update();
28     void Draw();
29     void Reset();
30 
31     float pos;
32     float oldX;
33 
34     int min;
35     int max;
36 
37     int* target;
38 
39     VoidFuncP func;
40     void* funcExtra;
41 
42     HeldButton* minus;
43     HeldButton* plus;
44 };
45 
46 #endif
47