Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: buttons, menu, compatibility and others, general questions  (Read 3077 times)

0 Members and 1 Guest are viewing this topic.

wmbuRn

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
buttons, menu, compatibility and others, general questions
« on: July 07, 2013, 04:32:22 pm »
So i googled about this, i googled about comaptibility bot no answer satisfied me.

So  i will ask this questions here and hopefully i will get some answers.

1. Can sfml draw/make buttons so that i can use in program/game or i should use 3rd party library?
    It is important becouse i spend time and learned about 70% of SDL 1.2  and then i founded out that SDL cant make menu items, ration buttons, and other stuff you might need in games or applications.
 -- 1. I found out it is possible to do that inside SFML by loading diferent images and using mouse events. Will check Sfgui and Tgui to see are they satisfies my need. But still dont know can or how to make ration button and dropdown menu in SFML.



2. I am C++ linux programmer and my team mate is MAC OS C programmer, and we worked fine together with SDL, i used C++ code, he uses C code [since SDL is native C , and 99.99% of native C can be compiled with C++ code] . Can we do that with SFML? There are keybindings for C in SFML but how will SML react using 2 diferent [sligthly diferent] programming languages?

3. Will all SFML code work on every OS [Windows, Linux, MAC] or there should be platform specific code?
     I am interested in using SFML only if we dont need to work on platform specific code. Time is relevant since we are only 2 in team and we dont want to deal with platform specific code especially when we dont have windows programmer, and we refuse to use windows. :)

4. Can i use native openGl headers or i should only use SFML openGl header?
In SDL i can use native openGl headers, just include them in .cpp file.

5. Can SFML create new windows on top or independent from main window?
Just like when application or games work, you hit Help > About [or in games settings or help] and it displays new widow within main window, without clearing the main surface.
SDL cant do that, i tried that, i readed tons of tutorials [additional to books i have, and it requires 3rd party library to do that, and most of those libraries are not cross-platform].

My appologies if thise question are answered in FAQ, i did readed lot of texts but my poor english skills migth excluded important answers :)
Also my appology for poor english skills.

Thank you for your help in advance.

with respect
wmbuRn.
« Last Edit: July 07, 2013, 04:53:12 pm by wmbuRn »

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: buttons, menu, compatibility and others, general questions
« Reply #1 on: July 07, 2013, 05:30:20 pm »
1/ SFML doesn't do that but there are third party libs based on SFML that do it. You can also create an SFML view inside a Qt application, for example. Don't rush into code, first look around and find a good GUI library that fits your needs.

2/ I would recommend to use only one language. Besides compatibility reasons (that can be worked around sometimes), you'll get a better code. I'm speaking design, consistency, communication between you two, and so on. If you decide to use two languages I fear you'll end up dropping the project..

3/ Unless you intentionally do something that require platform specific code, you don't have to bother about that. You'll have some platform specific settings for compilation, and also about resources location on the disk, but that's pretty much it.

However, there are a few platform specific limitation to keep in mind. They are explained in the doc & tutorials. One of them is, on Mac OS X, you can't create a window outside the main thread.

4/ SFML doesn't modify OpenGL's headers. There is a <SFML/OpenGL.hpp> header but it's only there to hide platform specific inclusion.

5/ I'm not sure of what you're looking for here. With SFML you can create multiple windows, but you can also fake a window inside a physical window. In the latter scenario, you need a good GUI library for SFML (see 1/).
SFML / OS X developer

wmbuRn

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
Re: buttons, menu, compatibility and others, general questions
« Reply #2 on: July 07, 2013, 06:01:06 pm »
Thank you for you answer.

I am aware of code incosistency but untill he switch to c++ we will continue with different programming languages :)

i will skip Qt and wxWidgets for now, i used them i few applications and well lets say i wont use them again.

Again thank you for your answer.

 

anything