Fixed anchors.

Some minor changes to the UI.
Added cUICommonDialog control.
This commit is contained in:
spartanj
2011-05-07 20:44:56 -03:00
parent 1b5e82db21
commit d72cdd9e1b
21 changed files with 461 additions and 56 deletions

View File

@@ -136,10 +136,6 @@ Uint32 cUIListBox::AddListBoxItem( cUIListBoxItem * Item ) {
return (Uint32)(mItems.size() - 1);
}
Uint32 cUIListBox::AddListBoxItem( const std::string& Text ) {
return AddListBoxItem( String( Text ) );
}
Uint32 cUIListBox::AddListBoxItem( const String& Text ) {
mTexts.push_back( Text );
mItems.push_back( NULL );
@@ -222,6 +218,17 @@ void cUIListBox::RemoveListBoxItems( std::vector<Uint32> ItemsIndex ) {
}
}
void cUIListBox::Clear() {
mTexts.clear();
mItems.clear();
mSelected.clear();
mVScrollBar->Value(0);
UpdateScroll();
FindMaxWidth();
UpdateListBoxItemsSize();
}
Uint32 cUIListBox::RemoveListBoxItem( Uint32 ItemIndex ) {
RemoveListBoxItems( std::vector<Uint32>( 1, ItemIndex ) );
@@ -561,6 +568,9 @@ void cUIListBox::ItemClicked( cUIListBoxItem * Item ) {
}
Uint32 cUIListBox::OnSelected() {
cUIMessage tMsg( this, cUIMessage::MsgSelected, 0 );
MessagePost( &tMsg );
SendCommonEvent( cUIEvent::EventOnSelected );
return 1;