/*---------------------------------------------------------------------------* Copyright (C) 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_DOUBLE_COMBO_BOX_H_ #define __DEMOWIN_DOUBLE_COMBO_BOX_H_ struct DoubleComboBox : public MenuItem { DoubleComboBox(Window* window, CVec3 position, CVec2 size, SubCombo** _data, int _count, int* _target1, int* _target2, VoidFuncP _func = DoNothingVoidP, void* _funcExtra = NULL) : MenuItem(window, position, size), data(_data), count(_count), over1(-1), over2(-1), pos1(0), pos2(0), target1(_target1), target2(_target2), func(_func), funcExtra(_funcExtra), flipped(false), offset(0), bar1(window, CVec3(size.x / 4 - SCROLLBAR_WIDTH / 2, 0, position.z + 0.55), CVec2(SCROLLBAR_WIDTH, size.y * COMBOBOX_COUNT), 0, COMBOBOX_COUNT), bar2(window, CVec3(size.x * 3 / 4 - SCROLLBAR_WIDTH / 2, 0, position.z + 0.55), CVec2(SCROLLBAR_WIDTH, size.y * COMBOBOX_COUNT), 0, COMBOBOX_COUNT) {} static DoubleComboBox* Add(const DoubleComboBox& item); bool CursorOver(); bool Update(); void Draw(); void Reset(); SubCombo** data; int count; int over1; int over2; int pos1; int pos2; int* target1; int* target2; VoidFuncP func; void* funcExtra; int off; bool flipped; float offset; ScrollBar bar1; ScrollBar bar2; }; #endif