yellowstonegames / SquidLib

Useful tools for roguelike, role-playing, strategy, and other grid-based games in Java. Feedback is welcome!
Other
454 stars 46 forks source link

Add optional String caption parameter to border #189

Closed Rakaneth closed 6 years ago

Rakaneth commented 6 years ago

Added an optional String caption parameter to the bordering methods that will add a caption at (1, 0).

tommyettinger commented 6 years ago

Looks good, although the last call to put() should be able to take the encodedColor without re-creating a Color (it would have been already filtered by methods that called putBorders() with a Color). I'll merge this and make that small change after.

tommyettinger commented 6 years ago

Whoops, I forgot to add the method I was suggesting earlier, put() taking a float color and a String. It's added now, along with the option to use an IColoredString as a caption. The IColoredString caption is handy for replacing the earlier code in EverythingDemo that manually placed a red Health string in the border of a SquidMessageBox; now the border can stay white while the text is a mix of colors.