Page MenuHomeWildfire Games

setColorFont(text, color, font) function
AbandonedPublic

Authored by ffffffff on Dec 22 2017, 2:40 AM.

Details

Reviewers
elexis
Summary

Adding new function setColorFont(text, color, font).

Test Plan

Add.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ffffffff created this revision.Dec 22 2017, 2:40 AM

nooooooo, see P99 and what I mentioned somewhere else

It is a design goal that
(1) mods can change the font whereever they can change the color and vice versa
(2) only having one variable for both to minimize the code
(3) only specify the color and font, but not repeat the encoding each time

Take this for instance in lobby.js:

var g_SystemColor = "150 0 0";

It could be:

var g_SystemTag = { "color": "150 0 0" };

So a mod could make this

var g_SystemTag = { "color": "black", "font": "non-sanse-16" };

or

var g_SystemTag = { "font": "non-sanse-16" };

D1167? Seems to fit very well!:D

Yep, that's it. But then we don't really need this one anymore unless we find a likely use case.

ffffffff abandoned this revision.Dec 22 2017, 4:17 AM