| 91 | } |
| 92 | |
| 93 | void ComboBox::PrependItem( const sf::String& text ) { |
| 94 | m_entries.insert( m_entries.begin(), text ); |
| 95 | |
| 96 | if( m_active_item != NONE ) { |
| 97 | ++m_active_item; |
| 98 | } |
| 99 | |
| 100 | if( IsMouseInWidget() ) { |
| 101 | SetState( State::PRELIGHT ); |
| 102 | } |
| 103 | else { |
| 104 | SetState( State::NORMAL ); |
| 105 | } |
| 106 | |
| 107 | RequestResize(); |
| 108 | } |
| 109 | |
| 110 | void ComboBox::ChangeItem( IndexType index, const sf::String& text ) { |
| 111 | if( index >= static_cast<IndexType>( m_entries.size() ) || index < 0 ) { |