View Single Post
  #1  
Old 03-27-2011, 10:56 PM
AlexanderK AlexanderK is offline
Registered User
AlexanderK's Avatar
Join Date: Mar 2006
Location: Germany
Posts: 79
AlexanderK is on a distinguished road
Send a message via MSN to AlexanderK
onKeyDown() and keydown(i) in GUIControls

I'm modifying my inventory to work with the keyboard, but I'm running into some problems
Why doesn't this work?
PHP Code:
function onMenuKeyDown() {
   
player.chat="MenuKeyDown";
   if (
keydown(8)) {
     
player.chat="TAB";
     
Inventory_Categories.forceonaction();
  }

The player only chats "MenuKeyDown".

So I'm doing this instead,which works, but can I even use keycodes? Aren't they platform specific?
PHP Code:
function onMenuKeyDown(gui,keycode) {
   
player.chat="MenuKeyDown";
   if (
keycode==9) {
     
player.chat="TAB";
     
Inventory_Categories.forceonaction();
  }

Reply With Quote