My Fishing World
/// 用於設定文字物件的字型、大小、顏色、位置和文字的建構函式。 /// 要使用的文字字型 /// 要使用的文字字串 /// 要使用的文字大小 /// 文字物件原點的 X 座標 /// 文字物件原點的 Y 座標 /// 文字物件的顏色 Text::Text(sf::Font& t_font, std::string t_string, int t_size, float t_x, float t_y, sf::Color t_colour) { m_text.setFont(t_font); m_text.setString(t_string); m_text.setCharacterSize(t_size); m_text.setFillColor(t_colour); m_text.setOrigin(m_text.getGlobalBounds().width / 2, m_text.getGlobalBounds().height / 2); m_text.setPosition(t_x, t_y); } Text::~Text() { } ///
My Fishing World
/// 用於設定文字物件的字型、大小、顏色、位置和文字的建構函式。 /// 要使用的文字字型 /// 要使用的文字字串 /// 要使用的文字大小 /// 文字物件原點的 X 座標 /// 文字物件原點的 Y 座標 /// 文字物件的顏色 Text::Text(sf::Font& t_font, std::string t_string, int t_size, float t_x, float t_y, sf::Color t_colour) { m_text.setFont(t_font); m_text.setString(t_string); m_text.setCharacterSize(t_size); m_text.setFillColor(t_colour); m_text.setOrigin(m_text.getGlobalBounds().width / 2, m_text.getGlobalBounds().height / 2); m_text.setPosition(t_x, t_y); } Text::~Text() { } ///
