xboxscene.org forums

Author Topic: Wip Input Questions  (Read 122 times)

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Wip Input Questions
« on: January 20, 2004, 06:01:00 PM »

the IQWaitMsg thingy works great, but i want to detect actual gamepad buttons...um, here's what i want to do...

IQWaitMsg UI_UP UI_DN UI_LF UI_RT UI_BACK UI_START UI_A UI_B UI_X UI_Y

all those UIs work except for start, a, b, x, and y.  UI_BACK works too, but not the way i want.  i don't want B to trigger UI_BACK.  how do i make these things work?
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Wip Input Questions
« Reply #1 on: January 20, 2004, 06:08:00 PM »

Well, I'm working up a way for you to use your own input translation table... it should be part of the "plug-in" spec when I'm done.


Currently, I only use one translation table, but in reality, the system is set up so I can switch between many different tables. Such will be the case in ActionScripting.
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Wip Input Questions
« Reply #2 on: January 20, 2004, 06:39:00 PM »

To clarify a little for kthulu:
The UI_Select and UI_Back buttons are for menu navigation in MXM.  You can use either B or Back for UI_Back, and Start or A for UI_Select.

For an example of an input translation table, check the 'internal.xml' file in the WIP package, and look for an <Input> tag (sometimes the file is in developers.rar/internal.xml ... BJ, you should remove one of those, because you seem to update either one randomly  laugh.gif )
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Wip Input Questions
« Reply #3 on: January 20, 2004, 08:35:00 PM »

thanks for the attention guys!

i had already looked at the keyconfig.xml and internal.xml...

the input-queuing stuff is very responsive and very accurate in it's responses...much better than just 'Input' was.  with 'Input' i often got double keypresses out of my Start and Back buttons and often had to press a button twice when it was going thru an input-loop in my scripts.  none of those problems with the queue.

however, the user-customizable keymappings makes creating a 'help screen' in your script a little difficult, since you can't tell them what buttons THEY need to press.  also, kinda makes running a script more dangerous...imagine running a script that formats a drive and asks for confirmation before doing the dirty deed...'Press Select (Start or A or whatever you have mapped) to confirm.  Press Back or B or whatever you have mapped to cancel.'  i'll never be completely confident i'm pressing the right button  tongue.gif

i dunno, i'm prolly worrying over nothing there.

i understood the UI_START AND UI_BACK thing too, but it would definitely be nice to have access to all the gamepad buttons using the input-queue.  as understand it, we don't right now...or do we?
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Wip Input Questions
« Reply #4 on: January 20, 2004, 08:46:00 PM »

oh yeah, is the virtual keyboard working yet?  any examples how to use it would be great too...i couldn't find any sad.gif

i'm like 90% thru with a script...that's where these question are coming from...
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Wip Input Questions
« Reply #5 on: January 21, 2004, 01:40:00 AM »

The virtual keyboard is working.

As for help, I am adding support (again, when I get a chance, but before the next public release) for a better system help screen. It will get it's details from the keymap node, so it's up to the person changing the mapping to set up the proper help.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Wip Input Questions
« Reply #6 on: January 21, 2004, 05:26:00 AM »

QUOTE

The virtual keyboard is working.

cool!  now if i can figure out how to call it and use it smile.gif  i searched the board and the source files last night looking for some instruction or examples on how to use it, but couldn't find any.  where is the snake-bite kit? smile.gif
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Wip Input Questions
« Reply #7 on: January 21, 2004, 08:34:00 AM »

i'm at work (on lunch) so i can't play with this stuff to find out...
CODE

BeginDraw
STRINGINPUT myString SINGLE "Please enter your full name:"
CallScript _DisplayMessageBox "Your name is %myString%?"
EndDraw

does STRINGINPUT call the virtual keyboard?

CODE

BeginDraw
CallScript _DisplayMessageBox "Please enter your full name:"
VIRTKEYBOARD ON
CallScript _DisplayMessageBox "You typed: %vkbInput%"
EndDraw

is that how you use the virtual keyboard?
Logged

geniusalz

  • Archived User
  • Hero Member
  • *
  • Posts: 1635
Wip Input Questions
« Reply #8 on: January 21, 2004, 09:22:00 AM »

StringInput works better because it allows for a 'prompt'
Last I checked, the keyboard stays on even after the command so you'll need a VIRTKEYBOARD OFF command after the StringInput.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Wip Input Questions
« Reply #9 on: January 21, 2004, 10:29:00 AM »

QUOTE
does STRINGINPUT call the virtual keyboard?

so the answer is yes...

QUOTE
BeginDraw
Set myString "John Smith"
STRINGINPUT myString SINGLE "Please enter your full name:"
CallScript _DisplayMessageBox "Your name is %myString%?"
EndDraw


would that work for passing the string "John Smith" to the keyboard?
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Wip Input Questions
« Reply #10 on: January 21, 2004, 01:34:00 PM »

just tested...that's how it works

noticed that the IQWaitMsg queue doesn't get cleared when STRINGINPUT and keyboard exit...but i'm not using the most recent WIP.  i updating now...
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Wip Input Questions
« Reply #11 on: January 21, 2004, 01:54:00 PM »

ok, just updated and IQ doesn't clear when exiting STRINGINPUT/keyboard.  maybe you don't want it to, but it seems like a good idea to me.  for example, pressing Back exits my script.  if i press Back with the keyboard up, when i press Done on the keyboard, it returns to my script and the script exits.

also thought it would be good to have a Cancel on the keyboard/STRINGINPUT...in case the user edits the string but decides it wasn't a good edit...

also, calling STRINGINPUT with MULTI doesn't do anything, but BenJ prolly already knows that and is working on it...

also, if i'm being annoying, please let me know.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Wip Input Questions
« Reply #12 on: January 21, 2004, 02:50:00 PM »

hey benj,

just tested some old scripts that use the Input method...the performance of Input method seems to have degraded with the WIPs...

if already know about these things, just tell me to shut-the-hell-up smile.gif
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Wip Input Questions
« Reply #13 on: January 21, 2004, 02:59:00 PM »

Multi isn't there... maybe when I get the UI up and running....


Code from Internal.xml:

StringInput SomeVar SINGLE "Single Line Input Test"
CallScript _DisplayMessageBox "Got string %SomeVar%$eol$Random Number: $rand$"

I believe it's clearing out the VK in my version, but that tweak might not be in the posted WIP binaries.

As for percformance degredation, scripts should forsake the "old" way for the "new" way... it's much superior.
Logged

Kthulu

  • Archived User
  • Hero Member
  • *
  • Posts: 787
Wip Input Questions
« Reply #14 on: January 21, 2004, 04:41:00 PM »

ok, sorry for not seeing all this stuff in the internal.xml.  i wasn't looking at the one in the src rar...i was looking at the one in the 'other' WIP directory

i see the answers to all my questions in the src rar internal.xml.  i can use...

SYS_MENU  to detect a Y-button press
MUSIC_NEXT to detect a X-button press
SYS_HELP for a White-button press
etc...

i'll stop pestering now smile.gif
sorry smile.gif
Logged