J :
* Remove a crash * This removes images for PSP buttons for the moment
This commit is contained in:
@@ -447,12 +447,12 @@ void OptionKey::Render() {
|
|||||||
{
|
{
|
||||||
const KeyRep& rep = translateKey(from);
|
const KeyRep& rep = translateKey(from);
|
||||||
if (rep.icon)
|
if (rep.icon)
|
||||||
renderer->RenderQuad(rep.icon, x + 4, y + 2);
|
renderer->RenderQuad(rep.icon, x + 4, y + 2, 0, 0.5, 0.5);
|
||||||
else
|
else
|
||||||
mFont->DrawString(rep.text, x + 4, y + 2, JGETEXT_LEFT);
|
mFont->DrawString(rep.text, x + 4, y + 2, JGETEXT_LEFT);
|
||||||
const KeyRep& rep2 = translateKey(to);
|
const KeyRep& rep2 = translateKey(to);
|
||||||
if (rep2.icon)
|
if (rep2.icon)
|
||||||
renderer->RenderQuad(rep2.icon, x + 4, y + 2);
|
renderer->RenderQuad(rep2.icon, x + 4, y + 2, 0, 0.5, 0.5);
|
||||||
else
|
else
|
||||||
mFont->DrawString(rep2.text, width - 4, y + 2, JGETEXT_RIGHT);
|
mFont->DrawString(rep2.text, width - 4, y + 2, JGETEXT_RIGHT);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,26 +51,24 @@ const KeyRep& translateKey(LocalKeySym key) {
|
|||||||
if ((res = fattable.find(key)) != fattable.end())
|
if ((res = fattable.find(key)) != fattable.end())
|
||||||
return *(res->second);
|
return *(res->second);
|
||||||
|
|
||||||
if (fattable.end() == fattable.find(PSP_CTRL_SELECT))
|
// if (fattable.end() == fattable.find(PSP_CTRL_SELECT))
|
||||||
{
|
// {
|
||||||
fattable[PSP_CTRL_SELECT] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)10*32, 0, 64, 32, "PSP_CTRL_SELECT", RETRIEVE_NORMAL), _("Select"));
|
// fattable[PSP_CTRL_SELECT] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)10*32, 0, 64, 32, "PSP_CTRL_SELECT", RETRIEVE_NORMAL), _("Select"));
|
||||||
fattable[PSP_CTRL_START] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)8*32, 0, 64, 32, "PSP_CTRL_START", RETRIEVE_NORMAL), _("Start"));
|
// fattable[PSP_CTRL_START] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)8*32, 0, 64, 32, "PSP_CTRL_START", RETRIEVE_NORMAL), _("Start"));
|
||||||
fattable[PSP_CTRL_UP] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)0*32, 0, 32, 32, "PSP_CTRL_UP", RETRIEVE_NORMAL), _("Up"));
|
// fattable[PSP_CTRL_UP] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)0*32, 0, 32, 32, "PSP_CTRL_UP", RETRIEVE_NORMAL), _("Up"));
|
||||||
fattable[PSP_CTRL_RIGHT] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)3*32, 0, 32, 32, "PSP_CTRL_RIGHT", RETRIEVE_NORMAL), _("Right"));
|
// fattable[PSP_CTRL_RIGHT] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)3*32, 0, 32, 32, "PSP_CTRL_RIGHT", RETRIEVE_NORMAL), _("Right"));
|
||||||
fattable[PSP_CTRL_DOWN] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)1*32, 0, 32, 32, "PSP_CTRL_DOWN", RETRIEVE_NORMAL), _("Down"));
|
// fattable[PSP_CTRL_DOWN] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)1*32, 0, 32, 32, "PSP_CTRL_DOWN", RETRIEVE_NORMAL), _("Down"));
|
||||||
fattable[PSP_CTRL_LEFT] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)2*32, 0, 32, 32, "PSP_CTRL_LEFT", RETRIEVE_NORMAL), _("Left"));
|
// fattable[PSP_CTRL_LEFT] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)2*32, 0, 32, 32, "PSP_CTRL_LEFT", RETRIEVE_NORMAL), _("Left"));
|
||||||
fattable[PSP_CTRL_LTRIGGER] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)14*32, 0, 64, 32, "PSP_CTRL_LTRIGGER", RETRIEVE_NORMAL), _("Left trigger"));
|
// fattable[PSP_CTRL_LTRIGGER] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)14*32, 0, 64, 32, "PSP_CTRL_LTRIGGER", RETRIEVE_NORMAL), _("Left trigger"));
|
||||||
fattable[PSP_CTRL_RTRIGGER] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)16*32, 0, 64, 32, "PSP_CTRL_RTRIGGER", RETRIEVE_NORMAL), _("Right trigger"));
|
// fattable[PSP_CTRL_RTRIGGER] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)16*32, 0, 64, 32, "PSP_CTRL_RTRIGGER", RETRIEVE_NORMAL), _("Right trigger"));
|
||||||
fattable[PSP_CTRL_TRIANGLE] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)5*32, 0, 32, 32, "PSP_CTRL_TRIANGLE", RETRIEVE_NORMAL), _("Triangle"));
|
// fattable[PSP_CTRL_TRIANGLE] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)5*32, 0, 32, 32, "PSP_CTRL_TRIANGLE", RETRIEVE_NORMAL), _("Triangle"));
|
||||||
fattable[PSP_CTRL_CIRCLE] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)4*32, 0, 32, 32, "PSP_CTRL_CIRCLE", RETRIEVE_NORMAL), _("Circle"));
|
// fattable[PSP_CTRL_CIRCLE] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)4*32, 0, 32, 32, "PSP_CTRL_CIRCLE", RETRIEVE_NORMAL), _("Circle"));
|
||||||
fattable[PSP_CTRL_CROSS] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)7*32, 0, 32, 32, "PSP_CTRL_CROSS", RETRIEVE_NORMAL), _("Cross"));
|
// fattable[PSP_CTRL_CROSS] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)7*32, 0, 32, 32, "PSP_CTRL_CROSS", RETRIEVE_NORMAL), _("Cross"));
|
||||||
fattable[PSP_CTRL_SQUARE] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)6*32, 0, 32, 32, "PSP_CTRL_SQUARE", RETRIEVE_NORMAL), _("Square"));
|
// fattable[PSP_CTRL_SQUARE] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)6*32, 0, 32, 32, "PSP_CTRL_SQUARE", RETRIEVE_NORMAL), _("Square"));
|
||||||
fattable[PSP_CTRL_HOLD] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)4*32, 0, 32, 32, "PSP_CTRL_HOLD", RETRIEVE_NORMAL), _("Hold"));
|
// fattable[PSP_CTRL_HOLD] = new KeyRep(resources.RetrieveQuad("iconspsp.png", (float)4*32, 0, 32, 32, "PSP_CTRL_HOLD", RETRIEVE_NORMAL), _("Hold"));
|
||||||
for (map<const LocalKeySym, KeyRep const*>::iterator it = fattable.begin(); it != fattable.end(); ++it)
|
// }
|
||||||
if (it->second->icon) { it->second->icon->mWidth /= 2; it->second->icon->mHeight /= 2; }
|
// if ((res = fattable.find(key)) != fattable.end())
|
||||||
}
|
// return *(res->second);
|
||||||
if ((res = fattable.find(key)) != fattable.end())
|
|
||||||
return *(res->second);
|
|
||||||
char* str = new char[11];
|
char* str = new char[11];
|
||||||
sprintf(str, "%d", key);
|
sprintf(str, "%d", key);
|
||||||
KeyRep* k = new KeyRep(NULL, str);
|
KeyRep* k = new KeyRep(NULL, str);
|
||||||
|
|||||||
Reference in New Issue
Block a user