Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Heryon

Pages: [1]
Graphics / sf::Text displaying square
« on: June 21, 2017, 02:58:26 am »
Hi, I have this code:
Code: [Select]
void TextEditor::handleEvent(const sf::Event& p_event)
   if(p_event.type == sf::Event::KeyPressed && p_event.key.code == sf::Keyboard::Return)

   else if(p_event.type == sf::Event::TextEntered)

void TextEditor::addLine()
   sf::String s(m_text.getString())
   s += "\n";

void TextEditor::write(const sf::Event& p_event)
   sf::String s(m_text.getString());

   if(p_event.key.code != sf::Keyboard::BackSpace && p_event.key.code != sf::Keyboard::Return)
      s += static_cast<char>(p_event.text.unicode);


When I press Return with this code, the Text goes to the next line but also writes a square at the beginning of the line.
If I comment the conditions which calls write(), no square is printed.
So why am I getting this strange behaviour?

Graphics / Re: Glsl::Vec2 from sf::Vector2f
« on: April 25, 2017, 09:34:55 pm »
Ok thank you.

Graphics / Glsl::Vec2 from sf::Vector2f
« on: April 25, 2017, 09:09:42 pm »
Hi, I'm using shaders in my app, and as setParameter is deprecated, I must use setUniform, but I don't know how to convert a sf::Vector2f into a Glsl::Vec2.

Window / Key Repeat
« on: April 08, 2017, 01:16:12 pm »
Hi, I am checking when a key is pressed to set a bool to true, and when it is released to set it to false, and when this bool is tru, my character moves. But with key repeat set to false, it doesn't work, and with key repeat set to true, the character starts to move, stops a little time, and then moves again.
Is there anyway to have something smooth?

Graphics / Re: Smooth texture
« on: February 12, 2017, 10:52:13 pm »
Ok that's what I thought, thanks

Graphics / Smooth texture
« on: February 12, 2017, 10:40:30 pm »
I wanted to know if I can combine smoothed texture (with setSmooth()) and antialiasing, or if it is useless.

Window / Fullscreen Style
« on: February 02, 2017, 09:21:24 pm »
Hi, I wanted to know : is
a real fullscreen or a windowed fullscreen ? Because it lets the mouse get out of the window, but I thought it was only for windowed fullscreen.

Window / Re: Fullscreen
« on: January 21, 2017, 03:55:17 pm »
Ok, no problem, thank you  :D

Window / Fullscreen
« on: January 21, 2017, 03:34:23 pm »
I know how to open a Window in Fullscreen with sf::Style::Fullscreen, but I now want to detect when the user clicks on the "fullscreen" button of a window and how to open a window in this state.

Pages: [1]