/*---------------------------------------------------------------------------* Copyright (C) 2010-2012 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_SLIDER_BAR_FLOAT_H_ #define __DEMOWIN_SLIDER_BAR_FLOAT_H_ struct SliderBarFloat : public MenuItem { SliderBarFloat(Window* window, CVec3 position, CVec2 size, float _min, float _max, float* _target, int _decimals = 1, VoidFuncP _func = DoNothingVoidP, void* _funcExtra = NULL) : MenuItem(window, position, size), min(_min), max(_max), target(_target), decimals(_decimals), func(_func), funcExtra(_funcExtra) {pos = *target;} static SliderBarFloat* Add(const SliderBarFloat& item); static void Increment(void* data); static void Decrement(void* data); bool Update(); void Draw(); void Reset(); float pos; float oldX; float min; float max; float* target; int decimals; VoidFuncP func; void* funcExtra; HeldButton* minus; HeldButton* plus; }; #endif