Cleanup Keyboard Text

Reporter: RobertBColton  |  Status: open  |  Last Modified: June 30, 2020, 02:06:09 AM

It is really nice to clean this one up before it gets more out of hand. Basic idea is to stop copying the keyboard_string and keyboard_lastchar logic all over the place. SDL's text handling abstraction really inspired me. The goal here is to also add UTF-8 support for keyboard_string on the xlib and Win32 platforms.

Simple test for you.

draw_text(0,0,keyboard_string + "#" + keyboard_lastchar);
codecov[bot]  
>Codecov Report

Merging #2062 into master will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2062      +/-   ##
==========================================
- Coverage   30.93%   30.93%   -0.01%     
==========================================
  Files         197      197              
  Lines       19102    19103       +1     
==========================================
  Hits         5910     5910              
- Misses      13192    13193       +1     
Impacted Files Coverage Δ
ENIGMAsystem/SHELL/Platforms/General/PFmain.cpp 72.91% <ø> (ø)
ENIGMAsystem/SHELL/Platforms/General/PFwindow.cpp 39.17% <0.00%> (-1.26%) ⬇️
ENIGMAsystem/SHELL/Platforms/General/PFwindow.h 100.00% <ø> (ø)
ENIGMAsystem/SHELL/Platforms/SDL/Event.cpp 18.71% <0.00%> (+0.21%) ⬆️
ENIGMAsystem/SHELL/Platforms/xlib/XLIBmain.cpp 32.98% <0.00%> (+0.98%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dab5494...5aedfbd. Read the comment docs.

Please sign in to post comments, or you can view this issue on GitHub.