DaBooda: Windowed mode and the Mouse
ballistikI've been playing around with the DaBooda engine and have come across something that I can't seem to find a work around for. I'm using DBT in a picture box on my form and want to be able to use the mouse for controls on the form as well as in DBT. But when I initialize the mouse in DBT, that's all I get. I can no longer move the mouse out of the picturebox because DBT takes full control over it. Is there a way to accomplish this with DBT? I need to be able to have my File menu! [:D]
IodiplinI know nothing of DBT, but this shouldn't be a problem. Simply don't use DBT to initialize the mouse. Do NOTHING unusual to the mouse. Then, call the mouse events (whatever) by using the Picture Box's natural events (MouseMove, MouseDown, etc.). DBT is probably using DirectInput, so that's why it takes full control of the mouse. I personally think DirectInput is the worst idea ever invented because I can easily meet my needs without restrcting the mouse to my application only. But many look at it as "Pure-Bred"...as in, "if I'm using Direct3D, I should use DirectInput as well!" No problem with that, but I'd never do it. True, there ARE advantages of DirectInput, but why use DI if you don't NEED those advantages? Anyway, I hope this helps. [:)]
ballistikThanks, I'll give that a shot. There are a few things that DBT does for you that makes using the mouse simple though (not that using the mouse has ever been hard... I'm just spoiled [:D]). I'll play with it tonight and see what I find out. By the way, has anyone heard from MasterBooda lately? ...Maybe he went on vacation...[?]
Sion
quote:
Originally posted by Iodiplin
DBT is probably using DirectInput, so that's why it takes full control of the mouse.
Yes, it is.
quote:
Originally posted by Iodiplin
Simply don't use DBT to initialize the mouse. Do NOTHING unusual to the mouse. Then, call the mouse events (whatever) by using the Picture Box's natural events (MouseMove, MouseDown, etc.).
Right you are, again. Off the top of my head, that's the only way to do it. Unless you what to uninitilize the mouse every time it comes close to the borders, and then initilize it once it is inside the game-screen again. That would be messy and probably don't even work. You would also make your own ALT-menu, although that requires some extra coding, of course.
quote:
Originally posted by ballistik
By the way, has anyone heard from MasterBooda lately? ...Maybe he went on vacation...
Nope, strange enough. From what we're heard from him, it dosn't sound like he could afford a vacation right now, so my guess is that he's working his ass off. He hasn't got an Internet connection, so that may also restrict his activities here. After all, I wouldn't be online very much either if I had to drag myself down to the library to get on the Internet. Oh well, he has "disappeared" before, and then he came back, and had version 1.4 of the engine with him, so I wouldn't worry. He'll be back! [:D]
ballistik[:D] I got everything working the way I want it last night. I am super impressed with this engine so far! Yea, I forgot that he has to run to the library everytime he wants to get on the net. I wouldn't be online much either if that was the case.
masterboodaI wanted to add a suggestion to this post for future reference... Yes the mouse is using direct input which takes complete and total control of it, which for fullscreen applications isn't that big of a deal, but if you wish to use the form controls in conjunction the work around is the only option unfortunately.. but you can use the form events to trigger ceartain things, also if click an area is all you are interested in doing, you can use the image control, or even use a group of picture boxes just zorder them behind the main or even make them invisible... this seems to work pretty well... Sorry for this, but this is a direct x issue that I couldn't find a work around for... Dabooda out...