Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/color.js
Context not available. | |||||
return [r, g, b].map(n => Math.round(n * 255)); | return [r, g, b].map(n => Math.round(n * 255)); | ||||
} | } | ||||
/* | |||||
* Set color to brightness in float number from zero to one [0-1]. | |||||
*/ | |||||
function setColorBrightness(color, brightness) | |||||
{ | |||||
return color.split(" ").map(number => Math.round(number * brightness)).join(" "); | |||||
} | |||||
function colorizeHotkey(text, hotkey) | function colorizeHotkey(text, hotkey) | ||||
{ | { | ||||
let key = Engine.ConfigDB_GetValue("user", "hotkey." + hotkey); | let key = Engine.ConfigDB_GetValue("user", "hotkey." + hotkey); | ||||
Context not available. |
Wildfire Games · Phabricator