Hey, i managed to add keyboard functionality to my charselect. And everything works fine, for the first login/charselect.
def OnKeyDown(self, key):
if 1 == key:
self.ExitSelect()
elif 2 == key:
self.SelectSlot(0)
elif 3 == key:
self.SelectSlot(1)
elif 4 == key:
self.SelectSlot(2)
elif 5 == key:
self.SelectSlot(3)
elif 6 == key:
self.SelectSlot(4)
elif 28 == key or 57 == key:
id = net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_ID)
if 0 == id:
self.CreateCharacter()
else:
self.StartGame()
elif 203 == key:
self.DecreaseSlotIndex()
elif 205 == key:
self.IncreaseSlotIndex()
return True
But once I entered ingame, when I go back to the charselect screen, the keyboard inputs aren't processed anymore. Only by clicking the arrows/buttons with the mouse, I can navigate in that menu.
How can i fix this?