My Fishing World
Android 4.4+
Versão:1.15.109
55.2 MB
Download
/// Construtor para definir a fonte, o tamanho, a cor, a posição e o texto do objeto de texto. /// /// Fonte do texto a ser utilizado /// String de texto a ser utilizada /// Tamanho do texto a ser utilizado /// Posição X da origem do objeto de texto /// Posição Y da origem do objeto de texto /// Cor do objeto de texto 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() { } /// /// Define a origem do texto para estar no centro do texto. /// void Text::centerText() { m_text.setOrigin(m_text.getGlobalBounds().width / 2, m_text.getGlobalBounds().height / 2); } /// /// Define a string do texto como o parâmetro t_text. /// /// O texto para substituir a string atual void Text::UpdateText(std::string t_text) { m_text.setString(t_text); m_text.setOrigin(m_text.getGlobalBounds().width / 2, m_text.getGlobalBounds().height / 2); } /// /// Ajusta a posição do texto para se alinhar com o retângulo que ele está sobrepondo. /// /// retângulo a ser alinhado no centro void Text::AlignText(sf::RectangleShape t_button) { m_text.setPosition(t_button.getPosition().x, t_button.getPosition().y); }
Conteúdo COMPLETO
My Fishing World
Android 4.4+
Versão:1.15.109
55.2 MB
/// Construtor para definir a fonte, o tamanho, a cor, a posição e o texto do objeto de texto. /// /// Fonte do texto a ser utilizado /// String de texto a ser utilizada /// Tamanho do texto a ser utilizado /// Posição X da origem do objeto de texto /// Posição Y da origem do objeto de texto /// Cor do objeto de texto 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() { } /// /// Define a origem do texto para estar no centro do texto. /// void Text::centerText() { m_text.setOrigin(m_text.getGlobalBounds().width / 2, m_text.getGlobalBounds().height / 2); } /// /// Define a string do texto como o parâmetro t_text. /// /// O texto para substituir a string atual void Text::UpdateText(std::string t_text) { m_text.setString(t_text); m_text.setOrigin(m_text.getGlobalBounds().width / 2, m_text.getGlobalBounds().height / 2); } /// /// Ajusta a posição do texto para se alinhar com o retângulo que ele está sobrepondo. /// /// retângulo a ser alinhado no centro void Text::AlignText(sf::RectangleShape t_button) { m_text.setPosition(t_button.getPosition().x, t_button.getPosition().y); }
Conteúdo COMPLETO
My Fishing World Capturas de tela