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_DOUBLE_COMBO_BOX_H_ 14 #define __DEMOWIN_DOUBLE_COMBO_BOX_H_ 15 16 struct DoubleComboBox : public MenuItem 17 { 18 DoubleComboBox(Window* window, CVec3 position, CVec2 size, SubCombo** _data, int _count, int* _target1, int* _target2, VoidFuncP _func = DoNothingVoidP, void* _funcExtra = NULL) MenuItemDoubleComboBox19 : 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) {} 20 21 static DoubleComboBox* Add(const DoubleComboBox& item); 22 23 bool CursorOver(); 24 bool Update(); 25 void Draw(); 26 void Reset(); 27 28 SubCombo** data; 29 int count; 30 31 int over1; 32 int over2; 33 int pos1; 34 int pos2; 35 36 int* target1; 37 int* target2; 38 39 VoidFuncP func; 40 void* funcExtra; 41 42 int off; 43 44 bool flipped; 45 float offset; 46 47 ScrollBar bar1; 48 ScrollBar bar2; 49 }; 50 51 #endif 52