raduprv / Eternal-Lands

http://www.eternal-lands.com
Other
158 stars 57 forks source link

Remove hardcoded GUI colors #84

Closed gvissers closed 2 years ago

gvissers commented 4 years ago

Scattered throughout the code there are many calls to glColor3f(0.77f,0.57f,0.39f) using explicit colour arguments. This is prone to errors as it is hard to spot an mistyped number on first sight. It also makes it unnecessarily difficult to change the widget colour. Alternatives to these calls could be either glColor3fv(gui_color), or the use of use_window_color().

pjbroad commented 4 years ago

This change has been on my list for ages, since the Other Life fork at least. Other Life changed the UI colour by a mass search and replace and meant that merging EL to OL almost always has conflicts; it makes me frustrated. I also note you did some of this for the TTF change. I think its a good idea, my only concern is that we spell colour differently. I'm English, so my way should be the right way for English language code. ;)

gvissers commented 4 years ago

my only concern is that we spell colour differently. I'm English, so my way should be the right way for English language code. ;)

In that case you have your work cut out for you. You should probably start with a #define glColour3f glColor3f or something similar. :smile:

TBH, I was on the fence on the spelling of "colour". But after learning British spelling in school, and spending a few years in the USA, I have grown somewhat pragmatic with regards to spelling, and decided to go with whatever OpenGL dictates. I you want to do a global search for color and replace it with colour, then by all means, go ahead :wink:

pjbroad commented 2 years ago

Probably need to close this one.

gvissers commented 2 years ago

No objections from me. Unless you want to update the map editor as well, though that has its own elwindows.c.