SFML community forums
Help => Window => Topic started by: Ajm113 on February 21, 2009, 11:34:07 pm
-
Hello, SFML community!
Ok, I decided to get my game going on for Linux and Mac from Win32, but I needed a good API that was portable easy and this API looks about right! :wink:
Ok, I got a bool array of 256. What I want to do is so the ID number of a key was pressed like A was pressed row 1 of that array will be set to true and when A is released row 1 is set to false.
How can I do that? Like Wparam and Win32 examples show sometimes.
-
You don't need to do so, sf::Input already keeps track of the keys state.
-
Alright, I'll play around with it. Its wired its like IntelliSense isn't picking up on your API that well. It seemed to work a while ago now it's Intellisense isn't showing a drop down box .
Any ways I have a couple more questions.
Whats a alternative of timeGetTime from windows in your API? I need it for my performance handler.
How can I set a window's state? I.E Maximize, Minimize, etc?
And how can I get the user's screen x,y cords?
Thank you, Andrew.
-
Maybe you should just read the documentation and tutorials instead of relying on Intellisense? :wink:
-
Ok, I got most of what I want converted. How can I display a Messagebox? I looked through your docs. It seems you guys cover everything except that.
-
There's currently nothing for message boxes in SFML.
-
Really, why? You guys cover everything, except for a message box?? Can you suggest what to do?
-
Well, SFML is not a windowing API such as Qt or wxWidgets. All it has to do is providing a window to draw into. Message boxes are not directly related to what you can expect from SFML.
However, you can draw one inside your window using a rectangular shape and a graphical string :)
-
Well whats Linux's Messagebox command?
I thought something like this feature would be no problem to add. If your API can run on different Operating Systems.
-
It might not be hard to implement, but it's outside of SFML's scope. SFML doesn't provide any GUI elements, and (probably) never will. If you want native message boxes, use a UI toolkit like GTK, QT, or wxWidgets. Like someone else said above, you could also write your own SFML-based message box, with a rectangle or string. Or you could take a look at the wiki, there's the starts of a GUI framework for SFML there. It's called IMGUI.
-
Ok, I just converted everything and it compiles fine. Its just I get this problem:
(http://i40.tinypic.com/2qw20kz.jpg)
I mite go with GTK, I'll just finish what I have going on here and then see by the weekend on getting linux and then compiling the game on it.