Greetings XNA'rs!
I have some source/Component I would like to share with the community.
I have been putting this Main Menu Component/demo together a few hours at a time each night, after writing code all day at work, but after making dinner for my wife ;-P.
I hope that this will help out other XNA developers to get their game going faster by not having to re-write the same code over and over again.
I am sure that MSFT will release something like this and much better, but hey, currently we don't have anything that I have found. I was inspired by Mitch's Component Demo, and if he would have just released the code for his menu item component, I wouldn't have had to do this. However, I learned a lot about component development doing this.
Anyway, I put the zip file at www.shakaware.com. You can go to the XNA area and download the code.
NOTE: ShakaWare is my 1099 consulting front end and I am not trying to sell anything. I just did not want to host this download on my family site. Oh, side note, this server is under my feet right now..so please be gentle.
I would like to see the community make suggestions and/or changes/optimizations to the code and make this a better component.
Included in the Demo is a Game Credits component that I threw in there, but is no way complete. Hey! A two-for-oner! This is not a 100% finished product, but it works.
I am aware of a few bugs, but I want to start getting feedback and help out others by showing some code.
Please give feedback via the XNA forum or if you can email me from the forum.
Thanx
Micah Nasarow

Main Menu Component Demo
xeondev
Pretty nice. There's a couple of enhancements I'd like to see:
- Mouseover shouldn't show the button as pressed, just highlight it somehow (maybe a "glow" effect in the button border)
- Credits doesn't handle input - Esc key or mouse click should close the credits (I'm sure you realize this already, just noting for completeness
)
- Text seems to move too far when button is pressed
- It looks like you're doing some logic in the Draw method of the MainMenu component that you might want to move to the Update:
(this.IsUseKeyboard) // set the selected item via keyboard state this.Buttons{
this.Buttons}
I haven't looked at it completely so I'm not sure. IMO, the Draw method should just draw the controls in whatever state the Update method leaves them in.
Good job overall though!
sean_kirkpatrick
Mouseover shouldn't show the button as pressed, just highlight it somehow (maybe a "glow" effect in the button border)
- I am aware of this, I just got tired of tweaking and fine tuning..I wanted to get the code out to the community.
Credits doesn't handle input - Esc key or mouse click should close the credits (I'm sure you realize this already, just noting for completeness
)
- Yes, the credits component is work in progress.
Text seems to move too far when button is pressed
- Yeah, this is adjustable via the fontOffsetX and fontOffsetY.
It looks like you're doing some logic in the Draw method of the MainMenu component that you might want to move to the Update:
- Thanx! This is the kind of debugging feedback I want. Yes, some refactoring and optimization is needed.
Jim, your feedback has been very good to everyone on this forum. Again, thanx.
I will continue to fine tune in the coming evenings and put out updates, but my main goal was to at least get some code out to anyone who might need help.
Micah
TarPista
Nice component - I will use it in my game conversion from MDX to XNA.
kind regards
Mateusz Kierepka