* 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

@@ -1,5 +1,6 @@
#include <map>
#include "../include/Translate.h"
#include "../include/WResourceManager.h"
#include "../include/TranslateKeys.h"
using std::string;
@@ -34,6 +35,10 @@ const KeyRep& translateKey(LocalKeySym key) {
if ((res = fattable.find(key)) != fattable.end())
return *(res->second);
}
// Here goes PSP button-to-image code :
// k->icon = resources.RetrieveQuad("iconspsp.png", (float)4*32, 0, 32, 32, "", RETRIEVE_NORMAL);
char* str = new char[11];
sprintf(str, "%d", key);
KeyRep* k = new KeyRep(NULL, str);