| 166 | } |
| 167 | |
| 168 | void SpinButton::HandleTextEvent( char32_t character ) { |
| 169 | if( isdigit( static_cast<int>( character ) ) ) { |
| 170 | Entry::HandleTextEvent( character ); |
| 171 | return; |
| 172 | } |
| 173 | |
| 174 | if( ( character == '.' ) && ( GetText().find( "." ) == sf::String::InvalidPos ) ) { |
| 175 | Entry::HandleTextEvent( character ); |
| 176 | return; |
| 177 | } |
| 178 | |
| 179 | if( ( character == '-' ) && ( GetText().find( "-" ) == sf::String::InvalidPos ) && ( GetCursorPosition() == 0 ) ) { |
| 180 | Entry::HandleTextEvent( character ); |
| 181 | return; |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | void SpinButton::HandleKeyEvent( sf::Keyboard::Key key, sf::Keyboard::Scancode scancode, bool press ) { |
| 186 | Entry::HandleKeyEvent( key, scancode, press ); |
nothing calls this directly
no outgoing calls
no test coverage detected