In 7.8.2.1, the text color was reset to white at the beginning of every gl.Text.
In new Spring test build, it's not.
I have KP tooltip that use stuff such as:
txt = "\255\255\213\213Health: ".."\255\255\170\170"..ud.health
gl.Text(txt,x,y,FontSize,'o')
gl.Color(1,1,1,1) -- doesn't affect change to text color done within the string with escape character things
And then the red color gets carried over to the gl.Text of another widget (KP's buildbar's widget firewall/terminal timer.)
Since setting to white before a new line "\255\255\255\255\n" gets ignored, the only fix I found was to to do gl.Text("\255\255\255\255 ",0,0,FontSize,'o') at the end of my widget to leave gl.Text back to its default color.
Was it really intented behavior, or is it a bug? Either way, I'm sure many widget will leak their text colors to other widgets because of it.
gl.Text and reseting to white
gl.Text and reseting to white
Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)
Moderator: Moderators
Jump to
- Community
- ↳ General Discussion
- ↳ Help & Bugs
- ↳ Ingame Community
- ↳ Spring Clans
- ↳ Tournaments
- ↳ Linux
- ↳ Mac OS X
- ↳ Off Topic Discussion
- Content Development
- ↳ Game Development
- ↳ Game Development Tutorials & Resources
- ↳ Game Releases
- ↳ Map Creation
- ↳ Map Tutorials & Resources
- ↳ Map Releases
- ↳ Lua Scripts
- ↳ Art & Modelling
- ↳ Modelling & Texturing Tutorials & Resources
- ↳ Sound Effects & Music
- ↳ Project Subforums
- ↳ Balanced Annihilation
- ↳ Balanced Annihilation Reloaded
- ↳ Conflict Terra
- ↳ The Cursed
- ↳ Evolution RTS
- ↳ Jauria RTS
- ↳ Kernel Panic
- ↳ Journeywar
- ↳ Ludum Dare
- ↳ MechCommander: Legacy
- ↳ Metal Factions
- ↳ MOSAIC
- ↳ NOTA
- ↳ Phoenix Annihilation
- ↳ SpringBoard
- ↳ Spring: 1944
- ↳ Star Wars: Imperial Winter
- ↳ TA Prime
- ↳ Tech Annihilation
- ↳ XTA
- ↳ Zero-K
- ↳ Project Archive
- ↳ Argh's Projects
- ↳ Caydr's Projects
- ↳ Damned
- ↳ Dune: Evolution
- ↳ Engines Of War
- ↳ Evolution RTS
- ↳ Progressive Annihilation
- ↳ Supreme Annihilation
- ↳ Spring Tanks
- ↳ PanzerStahl
- Development
- ↳ News
- ↳ Engine
- ↳ Dedicated Developer Discussion
- ↳ New Developer Discussion
- ↳ Meeting Minutes
- ↳ AI
- ↳ Lobby Clients & Server
- ↳ Infrastructure Development
- ↳ Lobby Meeting Minutes
- ↳ SPADS AutoHost
- ↳ SpringLobby Client
- ↳ Feature Requests
- ↳ Bounty Offers
- ↳ The Werewolf Game
- ↳ News Submissions
- Site content
- ↳ Community Blog
- ↳ Site content
- ↳ Banners
- ↳ Welcome images
- ↳ Videos
- ↳ Videos - contributions
- ↳ Screenshots
- ↳ Screenshots - contributions