Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement Video::showMessage #152

Closed
Jamiras opened this issue Dec 14, 2019 · 2 comments · Fixed by #419
Closed

Implement Video::showMessage #152

Jamiras opened this issue Dec 14, 2019 · 2 comments · Fixed by #419
Labels
help wanted Extra attention is needed
Milestone

Comments

@Jamiras
Copy link
Member

Jamiras commented Dec 14, 2019

There currently isn't any way to display on-screen text notifications for things like "Saved Slot 1" (see also #2). The intent is that functions wishing to show on-screen text would call Video::showMessage, but it currently just logs the message and doesn't attempt to do anything with the screen.

I tried to implement this myself several months ago using the recommended OpenGL solution of generating a texture with all valid characters and mapping them onto the surface. I was unable to get it working.

@Jamiras Jamiras added the help wanted Extra attention is needed label Dec 14, 2019
@windowhook
Copy link

Maybe using imgui is a good solution?

@leiradel
Copy link
Contributor

I believe GDI+ can be used to render a complete message to a bitmap, which can be used to create a texture to be presented on the screen. It's slower than caching individual glyphs in an atlas, but should be ok for presenting OSD messages.

There's also stb_truetype.h. which looks easier to use than GDI+.

@Jamiras Jamiras added this to the 1.8.0 milestone Aug 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants