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 - FRex

Pages: 1 [2] 3 4 ... 123
16
Window / Re: Event::KeyPressed not working now?
« on: June 04, 2019, 06:39:39 am »
         if (event.type = Event::Closed)

This line is an assignment, not a comparison, and Event::Closed is (usually?) 0 so it'll not close the Window and it prevents handling any other event type because event.type is always Event::Closed.

17
General / Re: I can't get custom shapes to work
« on: June 02, 2019, 09:29:35 pm »
Do you still have a problem with this and if yes then can you create a minimal complete example of it?

18
Graphics / Re: Why I can't setTexture?
« on: May 31, 2019, 11:52:05 pm »
Not sure if [FIXED] means you guessed but the proper way is &pencilIcon.

19
General / Re: What Is Wrong With This Line Algorithm?
« on: May 17, 2019, 10:20:27 am »
You forgot: line.setPosition(ax, ay);

21
General discussions / Re: Goodbye
« on: May 01, 2019, 10:46:33 pm »
I still remember when it was just you two. This is so sad. :'(

22
Window / Re: getLocalBounds() with text objects?
« on: April 30, 2019, 05:29:13 pm »
MouseButtonPressed is the event type you want, KeyPressed is for keyboard keys. Also, you should not have clearing, drawing and window display inside the event loop.

23
General / Re: What is a good way to handle new line characters? \n
« on: April 26, 2019, 11:14:14 pm »
Quote
Is it possible to add a cursor without making your own geometry? I couldn't figure it out using the standard sf:: classes.
I don't know what you mean by 'without own geometry'. You have to draw a cursor yourself somehow if you want one.

Quote
I am going through your code and the sf::Text code and trying to learn for my own project, I may have other questions about it I hope you don't mind.
Feel free. I'll try answer.

24
General / Re: What is a good way to handle new line characters? \n
« on: April 25, 2019, 05:31:04 am »
There's a demo program but it has a very unusual event loop: https://github.com/FRex/LuaConsoleProgram

25
Graphics / Re: Creating simple 3D objects SFML
« on: April 21, 2019, 12:10:41 am »
Not sure if what is presented here (e.g. at 1:50) is the same thing or not, it looks similar: https://www.youtube.com/watch?v=kjFlIxGzABY

26
Sprite has a get texture that returns a pointer which can be NULL if it was never set.

https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Sprite.php#a1a76155146c8ff37c4eb5a306b4e9ebe

27
They are taken from sf::Font (https://github.com/SFML/SFML/blob/master/src/SFML/Graphics/Text.cpp#L473) via getUnderlineThickness (https://github.com/SFML/SFML/blob/master/src/SFML/Graphics/Font.cpp#L439) so I guess the answer is technically no.

28
General discussions / Re: External libraries' versions
« on: April 11, 2019, 05:52:49 pm »
For Windows for some it says in commit messages of related files: https://github.com/SFML/SFML/tree/master/extlibs

For Linux I assume it's whatever you happen to have installed since they are API compatible and aren't bundled but you're told by tutorial to install them yourself.

29
General / Re: What is a good way to handle new line characters? \n
« on: April 11, 2019, 02:57:32 am »
There's not that much code there and almost all of it is a straight copy from sf::Text with minor changes. Other files have much more code (Model has like 5x code, Input and Completion each have as much as View) and it's all custom written too.

30
General / Re: What is a good way to handle new line characters? \n
« on: April 10, 2019, 10:51:54 pm »
sf::Text will handle \n properly and make a new line appear. You can see it in the code and while documentation on setString doesn't seem to say it there are functions like setLineSpacing which would make no sense to have if sf::Text was always a single line.

I did it 'myself' (my code is based on sf::Text's, there's a notice at line 83) to be able to color the glyps individually (while keeping them all in a single vertex array to draw all in a single draw call) to display errors in red, messages in white, evaluated expressions in grey, etc. as you can see on screenshots here: https://github.com/FRex/LuaConsoleProgram and on the ECONSOLE_COLOR enum list here: https://github.com/FRex/LuaConsole/blob/master/include/LuaConsole/LuaConsoleModel.hpp#L78



Pages: 1 [2] 3 4 ... 123