Closed Flatfingers closed 4 months ago
Commented out color settings in Josh's old /UI Lua files to make the Debug overlay panel stop crashing
Draw.Color
is utilising some extremely old OpenGL features which I'm trying to remove so we can move to modern graphics APIs. That's why I removed Color:set
as well. Sorry for the breakage, as I'm hoping to remove all uses of it. That's why I was asking on discord if anything is using the UI
files.
I changed applyColor
(which applied the right colour to Draw.Color
) to getColor
, which instead returns the color to be passed to the shader. I also added a utility function UI.DrawEx.SimpleRect
as a replacement for Draw.Rect
which correctly sets up the shaders that are replacing the fixed function pipeline
To fix this, you'd need to replace:
self:applyColor(focus, active, Config.ui.color.border)
....
Draw.Rect(x, y, sx, sy)
with
UI.DrawEx.SimpleRect(x, y, sx, sy, self:getColor(focus, active, Config.ui.color.border))
I've done this in https://github.com/Limit-Theory-Redux/ltheory/pull/306
Got it, and thanks for the detail info; this makes a lot more sense to me now. This should be temporary if we can convert these UI calls to our new HmGui-derived UI system.
Updated the margins for text strings in NewGame and Settings so that they once again line up (more or less) with their UI components.
Restored dynamic lights ("L" to toggle). Added a visible "L" to the HUD when dynamic lights are active.
At some point, the name of the key command used to toggle the in-game overlay panel system got changed from Back to Backslash, but that reference in /docs/GameControlKeys.txt wasn't updated. It is now.
Added a new ProgressBar component. Added several small helper commands in StarSystem.lua and Universe.lua to track and increment the count of objects added to the game universe, which ProgressBar will (eventually) use.
Commented out color settings in Josh's old /UI Lua files to make the Debug overlay panel stop crashing. It looks like removing the set() function from those UI files, and changing applyColor() to getColor() in /UI/Widget.lua, broke how colored components work in the overlay panels and we didn't notice for a while. So now the Debug panel works again, but it looks like ass because the proper colors are no longer being set.