mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 22:24:33 +00:00
* Adjustment: Update Bullet version to 3.24.
This commit is contained in:
parent
35de012ee7
commit
4a3f31df2a
6148 changed files with 2112532 additions and 56873 deletions
52
Engine/lib/bullet/test/GwenOpenGLTest/ComboBox.cpp
Normal file
52
Engine/lib/bullet/test/GwenOpenGLTest/ComboBox.cpp
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#include "UnitTest.h"
|
||||
#include "Gwen/Controls/ComboBox.h"
|
||||
|
||||
using namespace Gwen;
|
||||
|
||||
class ComboBox : public GUnit
|
||||
{
|
||||
public:
|
||||
GWEN_CONTROL_INLINE(ComboBox, GUnit)
|
||||
{
|
||||
{
|
||||
Gwen::Controls::ComboBox* combo = new Gwen::Controls::ComboBox(this);
|
||||
combo->SetKeyboardInputEnabled(true);
|
||||
combo->SetPos(50, 50);
|
||||
combo->SetWidth(200);
|
||||
|
||||
combo->AddItem(L"Option One", "one");
|
||||
combo->AddItem(L"Number Two", "two");
|
||||
combo->AddItem(L"Door Three", "three");
|
||||
combo->AddItem(L"Four Legs", "four");
|
||||
combo->AddItem(L"Five Birds", "five");
|
||||
|
||||
combo->onSelection.Add(this, &ComboBox::OnComboSelect);
|
||||
}
|
||||
|
||||
{
|
||||
// Empty..
|
||||
Gwen::Controls::ComboBox* combo = new Gwen::Controls::ComboBox(this);
|
||||
combo->SetPos(50, 80);
|
||||
combo->SetWidth(200);
|
||||
}
|
||||
|
||||
{
|
||||
// Empty..
|
||||
Gwen::Controls::ComboBox* combo = new Gwen::Controls::ComboBox(this);
|
||||
combo->SetPos(50, 110);
|
||||
combo->SetWidth(200);
|
||||
|
||||
for (int i = 0; i < 500; i++)
|
||||
combo->AddItem(L"Lots Of Options");
|
||||
}
|
||||
}
|
||||
|
||||
void OnComboSelect(Gwen::Controls::Base* pControl)
|
||||
{
|
||||
Gwen::Controls::ComboBox* combo = (Gwen::Controls::ComboBox*)pControl;
|
||||
|
||||
UnitPrint(Utility::Format(L"Combo Changed: %s", combo->GetSelectedItem()->GetText().c_str()));
|
||||
}
|
||||
};
|
||||
|
||||
DEFINE_UNIT_TEST(ComboBox, L"ComboBox");
|
||||
Loading…
Add table
Add a link
Reference in a new issue