Code-style consistency improvement:
Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files. make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type. This commit contains no other changes aside from adding and applying clang-format-all.sh
This commit is contained in:
@@ -5,54 +5,48 @@ using namespace Gwen;
|
||||
|
||||
class ComboBox : public GUnit
|
||||
{
|
||||
public:
|
||||
|
||||
GWEN_CONTROL_INLINE( ComboBox, GUnit )
|
||||
public:
|
||||
GWEN_CONTROL_INLINE(ComboBox, GUnit)
|
||||
{
|
||||
|
||||
{
|
||||
Gwen::Controls::ComboBox* combo = new Gwen::Controls::ComboBox( this );
|
||||
Gwen::Controls::ComboBox* combo = new Gwen::Controls::ComboBox(this);
|
||||
combo->SetKeyboardInputEnabled(true);
|
||||
combo->SetPos( 50, 50 );
|
||||
combo->SetWidth( 200 );
|
||||
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->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 );
|
||||
combo->onSelection.Add(this, &ComboBox::OnComboSelect);
|
||||
}
|
||||
|
||||
{
|
||||
// Empty..
|
||||
Gwen::Controls::ComboBox* combo = new Gwen::Controls::ComboBox( this );
|
||||
combo->SetPos( 50, 80 );
|
||||
combo->SetWidth( 200 );
|
||||
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 );
|
||||
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" );
|
||||
for (int i = 0; i < 500; i++)
|
||||
combo->AddItem(L"Lots Of Options");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void OnComboSelect( Gwen::Controls::Base* pControl )
|
||||
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() ) );
|
||||
UnitPrint(Utility::Format(L"Combo Changed: %s", combo->GetSelectedItem()->GetText().c_str()));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
DEFINE_UNIT_TEST( ComboBox, L"ComboBox" );
|
||||
DEFINE_UNIT_TEST(ComboBox, L"ComboBox");
|
||||
Reference in New Issue
Block a user