Hello Guest

Author Topic: Load up the screen and the screen isn't in "focus". Mouse is missing too.  (Read 49693 times)

0 Members and 1 Guest are viewing this topic.

Commanderstitch

  • Member
  • Posts: 37
  • Personal Text
    • View Profile
    • commanderstitch Homepage (coming someday)
When i build a project and go to the menu screen the window doesn't have focus. I have to click on it with my mouse to get the keyboard keys to interact. I'm not sure why this is happening, but if i find out more i'll post it here.

Also my mouse is invisible when hovering over the game window. I don't know if this was intentional or not.

thanks! happy ottering :-)
- Commanderstitch

Commanderstitch

  • Member
  • Posts: 37
  • Personal Text
    • View Profile
    • commanderstitch Homepage (coming someday)
I looked and found this bug in the otter issues bucket. Am i missing libraries for smfl or do those come bundled with otter? (your fix said that it was fixed in sfml 2.2) I came over here from sfml :D hurray!
- Commanderstitch

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
The latest builds should have fixed the focus bug.  The mouse is hidden unless you change Game.MouseVisible to true.  If you use the SFML libraries included with Otter it should work.

Commanderstitch

  • Member
  • Posts: 37
  • Personal Text
    • View Profile
    • commanderstitch Homepage (coming someday)
Thanks, the mouse thing works great. I should just stylize my own version of the mouse so it is customized. How do i know what version of otter I have? I got the one that was on your otter site a few weeks ago.

i find it amusing that i needed to find the mouse so i could click on the screen. So by solving one i can solve the other. I really hope to find the fix for having the screen focused when it starts though. You can click anywhere, not just the title bar to have it focused.
« Last Edit: June 16, 2015, 07:37:52 PM by Commanderstitch »
- Commanderstitch

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Ah, does the application not have focus if its a Console Application?  If you use a Windows Application instead it should have focus when it starts.

Commanderstitch

  • Member
  • Posts: 37
  • Personal Text
    • View Profile
    • commanderstitch Homepage (coming someday)
Yes! that's exactly what it is. What's the difference between the two?
- Commanderstitch

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
The difference is just the console window appearing or not, I believe.

When you release your project into the world you want to make sure you build it as a Windows Application in Visual Studio.  As a console application, the focus will go to the console window, and that's also where debug output will go, and you probably don't want your average player to have to deal with that.  So right now you don't have to worry about the focus thing for your final release as you should be just releasing your projects as Windows Applications.

Commanderstitch

  • Member
  • Posts: 37
  • Personal Text
    • View Profile
    • commanderstitch Homepage (coming someday)
confirmed! tis true. i was wondering what happened to the debug window. Is there any way to display the collision boxes to see and adjust them?
- Commanderstitch

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
You can't adjust them with any sort of built in run time tools, however I think all of the Collider classes have Render functions, so you could do "Collider.Render()" in your Entity's render method.

Commanderstitch

  • Member
  • Posts: 37
  • Personal Text
    • View Profile
    • commanderstitch Homepage (coming someday)
will that allow me to see the boxes? i think that's all i was trying to get at. I don't need (yet) the ability to actually change the way collisions work. (yet).

:-) I'm looking into some sort of procedural generation for the map. Any recommendations? :-)
- Commanderstitch