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