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

Author Topic: SFGUI (old thread)  (Read 86058 times)

0 Members and 1 Guest are viewing this topic.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFGUI (old thread)
« Reply #60 on: July 07, 2010, 08:28:48 pm »
Hey, do you have some news Tank ?
Want to play movies in your SFML application? Check out sfeMovie!

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI (old thread)
« Reply #61 on: July 09, 2010, 08:38:36 am »
Not yet, currently working on the serialization stuff in a local branch. However, time's currently rare. I'll keep you guys informed.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI (old thread)
« Reply #62 on: July 17, 2010, 03:29:41 pm »
I've installed Redmine on my host to manage tickets, downloads etc. for SFGUI. Registration is open, so if you have ideas or found bugs, visit http://redmine.boxbox.org/projects/sfggui .

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
SFGUI (old thread)
« Reply #63 on: August 11, 2010, 02:15:01 pm »
Hi Tank,
I plan to use your nice gui for my OAW project (see signature) because CEGUI is too big and too difficult to use, and Guichan does not correspond to my needs (ex : font support is done by image...).

So I've got the sources but I can't compile sfguy library with cmake, SFML does not seem to be linked and included in you Cmake file, so I have to add cpp files directly in my project, and that is a bit ugly...

Here are my modifications of CMakeLists :
Code: [Select]
# Modified by Pierreyoda (2010)
include_directories("F:/Prog/SFML-SVN/branches/sfml2/include")
link_directories("F:/Prog/SFML-SVN/branches/sfml2/lib/mingw")
add_library( sfml )
target_link_libraries( sfml-audio sfml-graphics sfml-window sfml-system ) # Does not work
# End of modification



But it does not work...
So is it a bad method or is it an oversight on your part?
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI (old thread)
« Reply #64 on: August 16, 2010, 12:05:23 am »
Could be very likely that it's an oversight on my side. Since I've switched to CMake, I didn't test SFGUI on a Windows machine which does linking a bit different than on Linux.

The greatest thing would be if you'd come up with a solution so I can include it in the sources. What does "# Does not work" mean in detail; what's the error message?

Also try to remove the quotation marks in the parenthesis for "include_directories" and "link_directories".

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFGUI (old thread)
« Reply #65 on: August 16, 2010, 08:32:06 am »
Quote
Code: [Select]
add_library( sfml )
target_link_libraries( sfml-audio sfml-graphics sfml-window sfml-system ) # Does not work

I didn't look at the sfgui makefile, but if what you want is to link sfgui to SFML, it should rather look like this:
Code: [Select]
target_link_libraries( sfgui sfml-audio sfml-graphics sfml-window sfml-system )

Another improvement would be to use a FindSFML.cmake that will automatically find SFML, so that you can remove those absolute paths from the sfgui makefile. If a remember correctly, someone already wrote such a file, you should be able to find it on the forum.
Laurent Gomila - SFML developer

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
SFGUI (old thread)
« Reply #66 on: August 18, 2010, 09:54:59 am »
Ok, thanks, I'm gonna try to do that.
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
SFGUI (old thread)
« Reply #67 on: September 25, 2010, 04:15:23 pm »
Hey Tank, just to say that I've been starting working with sfgui, and my impressions is that it's an amazing library, very thoughtful, and that it gives a good overview of what a new GUI framework (Qt, wxWidgets) in modern C++ could be.

I've made a base class (in the style of SampleApp) whom all GUI parts (main menu, ingame GUI...) inherit.

Here is a little screenshot of WIP (NB : GUI part is of bad quality in that screenshot, "made with" SFML, don't know why) :
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI (old thread)
« Reply #68 on: September 26, 2010, 03:50:27 am »
Thank you. :)

I guess the problem is related to some blending mode issue with the render-to-image feature. Please try to disable it with sfg::GUI::EnableRenderToImage( false ).

Is it possible to see some code? I had this kind of issue in the past too, but I don't remember how I solved it.

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
SFGUI (old thread)
« Reply #69 on: September 26, 2010, 11:38:26 am »
By doing
Code: [Select]
getGui().EnableRenderToImage(false)
the "problem" (just appears in screenshot) is solved, but I've got a crash in release mode!
I'm gonna try to recompile sfml with the latest version....  :?

EDIT : When I link to a debug version of sfml2-graphics there is no more crash... (crash in Image::saveToFile).
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI (old thread)
« Reply #70 on: September 26, 2010, 01:00:36 pm »
SaveToFile() isn't used by SFGUI. ;)

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
SFGUI (old thread)
« Reply #71 on: September 26, 2010, 05:40:34 pm »
Yep, it seems to come from SFML or it dependencies... Nevermind, the problem is solved by a tiny debug linking.

By the way, is there a way of doing an horizontal ListBox (I didn't find one in documentation) ? It would be much more practical for a map editor...
And what about a list of sprites with a label next to them (Sprite+Label) ?
I guess I have to make a custom ListBox...  :x
EDIT : a custom "SpriteWithLabelItemView" should work, i'm gonna try.
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
SFGUI (old thread)
« Reply #72 on: September 26, 2010, 10:45:26 pm »
SFML2 lib files were renamed from libsfml-module.so to libsfml2-module.so. I tried to find any sfml related thing in the makefile, but didn't succeed. I finally renamed my SFML libs. Can anyone tell me how to modify the makefile?

Thanks!

Beliar

  • Newbie
  • *
  • Posts: 27
    • View Profile
SFGUI (old thread)
« Reply #73 on: September 27, 2010, 03:49:08 pm »
The file you are probably looking for is "<sfgui>/samples/CMakeLists.txt" since that seems to be the only file that contains the name of the SFML libs.

Running any sample crashes with a segfault though, so not sure if theres something missing.
Debuggers don't remove bugs. They only show them in slow motion.

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
SFGUI (old thread)
« Reply #74 on: September 27, 2010, 04:58:56 pm »
Quote from: "Beliar"
The file you are probably looking for is "<sfgui>/samples/CMakeLists.txt" since that seems to be the only file that contains the name of the SFML libs.

Running any sample crashes with a segfault though, so not sure if theres something missing.

Thanks, I finally fixed that. Now console shows this:
Quote
./avatar: error while loading shared libraries: libsfml2-system.so: cannot open shared object file: No such file or directory

Where is supposed the libs to be? They already are in /usr/local/bin.