1 /*---------------------------------------------------------------------------* 2 3 Copyright (C) 2010-2012 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_FLOAT_H_ 14 #define __DEMOWIN_SLIDER_BAR_FLOAT_H_ 15 16 struct SliderBarFloat : public MenuItem 17 { 18 SliderBarFloat(Window* window, CVec3 position, CVec2 size, float _min, float _max, float* _target, int _decimals = 1, VoidFuncP _func = DoNothingVoidP, void* _funcExtra = NULL) MenuItemSliderBarFloat19 : MenuItem(window, position, size), min(_min), max(_max), target(_target), decimals(_decimals), func(_func), funcExtra(_funcExtra) 20 {pos = *target;} 21 22 static SliderBarFloat* Add(const SliderBarFloat& 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 float min; 35 float max; 36 37 float* target; 38 39 int decimals; 40 41 VoidFuncP func; 42 void* funcExtra; 43 44 HeldButton* minus; 45 HeldButton* plus; 46 }; 47 48 #endif 49