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.


Topics - fhomps

Pages: [1]
1
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]
anything