Allow key_pen option in some widget text

develop
lethosor 2017-05-28 23:11:37 -04:00
parent f59be2a9a0
commit e51c5fc2cc
1 changed files with 4 additions and 3 deletions

@ -248,16 +248,17 @@ function render_text(obj,dc,x0,y0,pen,dpen,disabled)
if token.text or token.key then
local text = ''..(getval(token.text) or '')
local keypen
local keypen = dfhack.pen.parse(token.key_pen or COLOR_LIGHTGREEN)
if dc then
local tpen = getval(token.pen)
if disabled or is_disabled(token) then
dc:pen(getval(token.dpen) or tpen or dpen)
keypen = COLOR_GREEN
if keypen.fg ~= COLOR_BLACK then
keypen.bold = false
end
else
dc:pen(tpen or pen)
keypen = COLOR_LIGHTGREEN
end
end