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

Method CalculateRequisition

src/SFGUI/Scrollbar.cpp:86–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86sf::Vector2f Scrollbar::CalculateRequisition() {
87 float mimimum_slider_length( Context::Get().GetEngine().GetProperty<float>( "SliderMinimumLength", shared_from_this() ) );
88
89 // Scrollbars should always have a custom requisition set for it's shorter side.
90 // If the dev forgets to set one show him where the scrollbar slider is so
91 // it is easier for him to fix.
92 return sf::Vector2f( mimimum_slider_length, mimimum_slider_length );
93}
94
95void Scrollbar::HandleMouseButtonEvent( sf::Mouse::Button button, bool press, int x, int y ) {
96 if( button != sf::Mouse::Button::Left ) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected