Advertisement



Go Back   Zune Boards > Zune Discussions > Zune Games > Development Discussions

New Member?



 
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Development Discussions All developers who are coding games may stop by here for any help, suggestions, and everything development related.

Reply
 
LinkBack Thread Tools
Old 07-14-2008, 05:34 PM   #1 (permalink)
Zuner
 
CouchPotato99's Avatar
 
Join Date: May 2008
Posts: 75
Reputation: 53
Default Zune Input Management Library


So I made a DLL to help manage input in my games. It raises events when certain actions are performed. I figured I'd put it out there in case anyone else wanted to use it. You can download the DLL and the source code at the CodePlex page

Quote:
This is the first release of my Zune Input Management Library. That's quite a mouthful, eh? Anyways, this is basically two game components; InputManager and TouchInputManager. They raise events when the user pushes buttons and stuff. I tried to include every reasonable kind of input you would need. For example, for each button on the Zune, the InputManager class has the following:
  • A bool value that indicates if the button is pressed.
  • An event that is raised if the button goes from being released to pressed.
  • An event that is raised if the button goes from being pressed to released.
  • An event that is raised if the button remains pressed for an amount of time you define.
  • An event that is raised if the button is released after being "held" (see above).
  • An event that is raised if the button is released without being "held".

Additionally, all of these buttons use their common names, so you won't need to worry about which is A and which is B anymore.

The TouchInputManager is the other game component included. It has the following:
  • A bool value that indicates if the Zune has a touchpad.
  • A bool value that indicates if the touchpad is touched.
  • A structure, "TouchpadPosition", that tells where the touchpad is being touched and what section of the touchpad this position is in.
  • A bool value that indicates if the touchpad is pressed (or "clicked").
  • An event that is raised if the touchpad (anywhere on the touchpad) goes from being released to pressed.
  • An event that is raised if the touchpad goes from being pressed to released.
  • An event that is raised if the touchpad remains pressed for an amount of time you define.
  • An event that is raised if the touchpad is released after being "held" (see above).
  • An event that is raised if the touchpad is released without being "held".
  • An event that is raised if the touchpad is touched in any location; this event also tells where the touchpad was touched.
  • Events that are raised if specific sections of the touchpad are touched.
  • An event that is raised if the user removes their finger from the touchpad; this event also tells where the touchpad was touched.
  • Events that are raised if the user removes their finger from specific sections of the touchpad.
  • An event that is raised if the user "flicks" their finger across the touchpad; this event also tells how long the flick lasted, where it began, and where it ended.
  • Events that are raised if the user flicks their finger from a specific section of the touchpad to another specific section.
  • An event that is raised if the removes their finger from the touchpad without having performed a flick.
  • Events that are raised if the user removes their finger from specific sections of the touchpad without having performed a flick.
Here is a sample implementation.

I hope that somebody will find this useful. If you want to use this in one of your games go right ahead. If you want to use it but think it needs something more, just say the word and I'll see what I can do.







CouchPotato99 is offline   Reply With Quote
Old 07-15-2008, 03:15 AM   #2 (permalink)
Zuner
 
Join Date: Jan 2008
Posts: 57
Reputation: 44
Default

Wow, sounds quite nice actually. I might end up using it in my next game for all the touchpad funtions. Thanks!



Manticore-X is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -8. The time now is 08:41 PM.

 
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC8
vB Ad Management by =RedTyger=
(C) ZuneBoards 2006-2007
Copyright © 2006 - 2008 Zune Boards | About Zune Boards | Legal | A member of the Crowdgather Forum Community