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

Method InsertItem

src/SFGUI/ComboBox.cpp:76–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void ComboBox::InsertItem( IndexType index, const sf::String& text ) {
77 m_entries.insert( m_entries.begin() + index, text );
78
79 if( m_active_item != NONE && m_active_item >= index ) {
80 ++m_active_item;
81 }
82
83 if( IsMouseInWidget() ) {
84 SetState( State::PRELIGHT );
85 }
86 else {
87 SetState( State::NORMAL );
88 }
89
90 RequestResize();
91}
92
93void ComboBox::PrependItem( const sf::String& text ) {
94 m_entries.insert( m_entries.begin(), text );

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected