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

Method HandleKeyEvent

src/SFGUI/SpinButton.cpp:185–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185void SpinButton::HandleKeyEvent( sf::Keyboard::Key key, sf::Keyboard::Scancode scancode, bool press ) {
186 Entry::HandleKeyEvent( key, scancode, press );
187
188 if( !press || !HasFocus() ) {
189 return;
190 }
191
192 if( scancode == sf::Keyboard::Scancode::Enter ) {
193 GrabFocus( Widget::Ptr() );
194 }
195}
196
197void SpinButton::HandleSizeChange() {
198 float stepper_aspect_ratio( Context::Get().GetEngine().GetProperty<float>( "StepperAspectRatio", shared_from_this() ) );

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected