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

Pages: [1]
1
SFML projects / Re: Yet another Rich Text implementation
« on: November 20, 2019, 04:54:10 am »
Impressive work! Even if you make me blind with your gif  :P

What was your motivation to implement this feature? You plan to use this in a game?

Sorry for the induced blindness, I like my old-school magenta backgrounds 8)
This was more of a toy project than anything, to dust off my knowledge of templating & member pointers in C++, and to get back into vertex arrays. I don't have the time to make a game just yet! Maybe one day.

2
SFML projects / Yet another Rich Text implementation
« on: November 08, 2019, 08:05:31 am »
Hello everyone,

I have been toying around with SFML for a few years, and was always frustrated with the lack of flexibility of the text function - though I fully understand that rich text features are not really compatible with SFML's philosophy. I know other implementations of rich text libraries have already been done, I just wasn't fully satisfied with their design or features (and wanted to test my mettle and make my own!).
So here you go: https://github.com/FHomps/RichText

Features:
- Rich text! Use html-like beacons to change features of your text from the string.
- If you want a beacon to be code-bound, you can give it an ID and change it from the program.
- Set a character limit and update it quickly to make text stream on the screen.
- Automatic carriage returns!
- Transformable!
- Unnecessarily fast! I went back to vertex arrays instead of frankensteining sf::Text classes together. All updates to the text should only update a minimal amount of vertices; much better than redrawing the entire text.

Here's a very ugly .gif:


While I am proud of the project, I am by no means a professional or even good programmer - use at your own risk.
Have fun!

Pages: [1]