* Add support for key icons in the keybinding menu
This commit is contained in:
jean.chalard
2010-02-16 02:30:11 +00:00
parent 7104eff946
commit 8a19b0567b
2 changed files with 11 additions and 2 deletions

View File

@@ -438,9 +438,13 @@ void OptionKey::Render(){
JRenderer * renderer = JRenderer::GetInstance();
const KeyRep& rep = translateKey(from);
if (NULL == rep.icon)
if (rep.icon)
renderer->RenderQuad(rep.icon, x + 2, y + 2);
else
mFont->DrawString(rep.text, x + 4, y + 2, JGETEXT_LEFT);
const KeyRep& rep2 = translateKey(to);
if (NULL == rep2.icon)
if (rep2.icon)
renderer->RenderQuad(rep2.icon, x + 2, y + 2);
else
mFont->DrawString(rep2.text, width - 4, y + 2, JGETEXT_RIGHT);
}