| 308 | } |
| 309 | |
| 310 | sf::Vector2f Entry::CalculateRequisition() { |
| 311 | const std::string& font_name( Context::Get().GetEngine().GetProperty<std::string>( "FontName", shared_from_this() ) ); |
| 312 | unsigned int font_size( Context::Get().GetEngine().GetProperty<unsigned int>( "FontSize", shared_from_this() ) ); |
| 313 | float border_width( Context::Get().GetEngine().GetProperty<float>( "BorderWidth", shared_from_this() ) ); |
| 314 | float text_padding( Context::Get().GetEngine().GetProperty<float>( "Padding", shared_from_this() ) ); |
| 315 | const sf::Font& font( *Context::Get().GetEngine().GetResourceManager().GetFont( font_name ) ); |
| 316 | auto line_height = Context::Get().GetEngine().GetFontLineHeight( font, font_size ); |
| 317 | |
| 318 | return sf::Vector2f( 2 * (border_width + text_padding), line_height + 2 * ( border_width + text_padding ) ); |
| 319 | } |
| 320 | |
| 321 | bool Entry::IsCursorVisible() const { |
| 322 | return m_cursor_status; |
nothing calls this directly
no test coverage detected