My Fishing World
Android 4.4+
Versión:1.15.109
55.2 MB
Descargar
/// Constructor para configurar la fuente, el tamaño, el color, la posición y el texto del objeto de texto. /// /// Fuente del texto a utilizar /// Cadena de texto a utilizar /// Tamaño del texto a utilizar /// Posición X del origen del objeto de texto /// Posición Y del origen del objeto de texto /// Color del 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() { } /// /// Establece el origen del texto para que esté en el centro del texto. /// void Text::centerText() { m_text.setOrigin(m_text.getGlobalBounds().width / 2, m_text.getGlobalBounds().height / 2); } /// /// Establece la cadena de texto del parámetro t_text. /// /// El texto para reemplazar la cadena actual 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 la posición del texto para alinearse con el rectángulo que se superpone. /// /// rectángulo a alinear en el centro void Text::AlignText(sf::RectangleShape t_button) { m_text.setPosition(t_button.getPosition().x, t_button.getPosition().y); }
Contenido COMPLETO
My Fishing World
Android 4.4+
Versión:1.15.109
55.2 MB
/// Constructor para configurar la fuente, el tamaño, el color, la posición y el texto del objeto de texto. /// /// Fuente del texto a utilizar /// Cadena de texto a utilizar /// Tamaño del texto a utilizar /// Posición X del origen del objeto de texto /// Posición Y del origen del objeto de texto /// Color del 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() { } /// /// Establece el origen del texto para que esté en el centro del texto. /// void Text::centerText() { m_text.setOrigin(m_text.getGlobalBounds().width / 2, m_text.getGlobalBounds().height / 2); } /// /// Establece la cadena de texto del parámetro t_text. /// /// El texto para reemplazar la cadena actual 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 la posición del texto para alinearse con el rectángulo que se superpone. /// /// rectángulo a alinear en el centro void Text::AlignText(sf::RectangleShape t_button) { m_text.setPosition(t_button.getPosition().x, t_button.getPosition().y); }
Contenido COMPLETO
My Fishing World capturas de pantalla