* Some interface for key bindings
This commit is contained in:
jean.chalard
2010-02-15 14:32:56 +00:00
parent 16abaa249c
commit 16ca1a929f
4 changed files with 33 additions and 1 deletions

View File

@@ -1731,3 +1731,27 @@ string WGuiFilterItem::getCode(){
return "";
return mCode;
}
WGuiKeyBinder::WGuiKeyBinder() : WGuiItem("KB", 0) {}
void WGuiKeyBinder::Render()
{
JRenderer* renderer = JRenderer::GetInstance();
JGE* j = JGE::GetInstance();
JGE::keybindings_it start = j->KeyBindings_begin(), end = j->KeyBindings_end();
JLBFont * font = resources.GetJLBFont(Constants::OPTION_FONT);
font->SetColor(getColor(WGuiColor::TEXT_BODY));
u32 y = 40;
for (JGE::keybindings_it it = start; it != end; ++it)
{
// renderer->FillRoundRect(2, y, SCREEN_WIDTH - 4, 23, 2, getColor(WGuiColor::BACK));
char tmp[11];
sprintf(tmp, "%lu", it->first);
font->DrawString(tmp, 4, y+2, JGETEXT_LEFT);
sprintf(tmp, "%i", it->second);
font->DrawString(tmp, SCREEN_WIDTH - 4, y+2, JGETEXT_RIGHT);
y += 25;
// cout << it->first << " > " << it->second << endl;
}
}