MinicraftPlus / minicraft-plus-revived

Minicraft+, an extension of Notch's original minicraft project, with tons more features.
GNU General Public License v3.0
477 stars 96 forks source link

Add "reset" and "redo" color codes #549

Open BenCheung0422 opened 1 year ago

BenCheung0422 commented 1 year ago

As described in the title, this adds reset and redo color codes for text color formatting. This rewrites the code for rendering text encoded with color codes. A reset code resets the following text and a redo code sets the color before the last color code applied, and resets the color if the last code is the reset code. This also fixes some potential rendering problems of key input entries and search entries. The method does not require a leading color code now, and has the ability to use the white tint color as the overall rendering color, which can be set by the reset code.