MCPcopy Create free account
hub / github.com/TankOs/SFGUI / PrependItem

Method PrependItem

src/SFGUI/ComboBox.cpp:93–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void 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
110void ComboBox::ChangeItem( IndexType index, const sf::String& text ) {
111 if( index >= static_cast<IndexType>( m_entries.size() ) || index < 0 ) {

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected