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

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

0 Members and 1 Guest are viewing this topic.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI (old thread)
« Reply #75 on: September 28, 2010, 02:00:44 pm »
You probably forgot to reload your lib cache via "ldconfig" (as root).

Regarding to the lib naming: Yep, that confused me, too. I don't know why Laurent chose to rename "libsfml*" to "libsfml2*", since the version is included in the .so name, so that the libs are now called "libsfml2-...-.so.2.0.0" ;) (maybe this has more concrete reasons on Windows systems?).

Quote
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...

Added to my todo list, thanks.

Quote
And what about a list of sprites with a label next to them (Sprite+Label) ?

That's the reason why sfg::Listbox is highly templated. I don't have a clue what developers want to display in their listboxes, so I leave the specific implementations to their own. ;) It isn't very hard to extend it btw. Just have a look in the source code to see how the built-ins StringListbox and ImageListbox work.

An explanation of the template arguments can be found in the Doxygen description of sfg::Listbox.

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
SFGUI (old thread)
« Reply #76 on: September 28, 2010, 04:42:41 pm »
Quote from: "Tank"
I don't know why Laurent chose to rename "libsfml*" to "libsfml2*", since the version is included in the .so name, so that the libs are now called "libsfml2-...-.so.2.0.0" ;) (maybe this has more concrete reasons on Windows systems?).


Yep, there is no versionning on Windows : I've got a "libsfml2-[module].a" and that's all! :(

For other responses : thank you very much tank.

(Can't wait for 1.0, but actually sfgui is quite sufficient for any project!  :P  )
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 #77 on: September 30, 2010, 01:21:17 am »
True, no versioning on Windows for filenames. But that does also count for SFML 1.0 to 1.6. ;) Laurent, am I right that the reason for libsfml2* is versioning? If so, is it possible to change the behaviour for Linux operating systems? I think different library names would just unnecessarily pollute the filesystem (and the .so name has been introduced for exactly such purposes).

Thanks for your words, pierreyoda.

Another thing that came to my mind is how skins are handled at the moment. Somehow I'm quite unhappy with the current solution, in detail: I don't like how images for the widgets are arranged. I think it would be much nicer to be able to split each state of a widget's graphic into a single file and have more power for defining properties (like regions for tiling).

Also, I'm going to -- yeah, again ;) -- improve the class hierarchy here and there. Presently a lot of stuff is redundant (e.g. labels/texts for several widgets).

Lastly I'm thinking about switching back from CMake to SCons. Unfortunately I don't get warm with CMake. SCons does also work on Windows and even has the ability to generate IDE project files, so I ask myself why I've switched at all.

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
SFGUI (old thread)
« Reply #78 on: October 01, 2010, 03:01:56 pm »
SCons seems much easier (still not found how to link sfml with Cmake...).

Personally I'm satisfied by the current skin system, but of course if you can make it much powerful...

PS : Solved the bug by saving the screenshot into *.jpg file (instead of *.png) :lol:
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 #79 on: October 01, 2010, 09:00:53 pm »
Check the CMake manual at http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:target_link_libraries .

The upstream repository of SFGUI has been updated to use SCons again. Also I committed some minor changes: Alignments for sfg::Label (generally another behaviour), deactivated render-to-image by default.

Currently I'm investing some time in using CAMP for deserialization. Not so easy though with the current implemention, but it's definitely worth it.

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
SFGUI (old thread)
« Reply #80 on: October 02, 2010, 02:03:54 pm »
Why not use boost::serialization?

It's a bit intrusive but no need to bind something, that's the choice I've made for my project. And you're already using boost...
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 #81 on: October 02, 2010, 02:55:11 pm »
Because CAMP is rather lightweight and brings in code reflection. However I think it's missing some relevant features, so I still need some more testing to see which library fits most.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFGUI (old thread)
« Reply #82 on: October 03, 2010, 10:58:46 am »
Quote
Laurent, am I right that the reason for libsfml2* is versioning? If so, is it possible to change the behaviour for Linux operating systems? I think different library names would just unnecessarily pollute the filesystem (and the .so name has been introduced for exactly such purposes)

I know that this is unnecessary on Linux, but then the linker options would be inconsistent with Windows (-lsfml-xxx on Linux, -lsfml2-xxx on Windows).
I still don't know whether I should keep this naming convention or not, I don't really like having the major version number in the filename, but things would be too messy on Windows without it. We can discuss it in a new topic if you want.

Quote
Lastly I'm thinking about switching back from CMake to SCons

May I ask why (I don't know SCons at all)?

Quote
However I think it's missing some relevant features, so I still need some more testing to see which library fits most.

Don't hesitate to do feature requests ;)
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI (old thread)
« Reply #83 on: October 04, 2010, 03:06:05 pm »
Quote
Quote
Lastly I'm thinking about switching back from CMake to SCons

May I ask why (I don't know SCons at all)?

Sure. :) I think the best reason is the personal liking. For example I can't get warm with CMake's syntax for its CMakeLists.txt files, it's not intuitive in my eyes.
With SCons I have the full support of Python (a language I'm very used to) and also the possibility to generate project files for various IDEs (even though those aren't up-to-date). I just find it easier to maintain and create SCons setups than CMake ones.

Will create two threads for versioning and the CAMP thing -- but not here, of course. ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFGUI (old thread)
« Reply #84 on: October 04, 2010, 03:15:41 pm »
Ok, thanks :)
Laurent Gomila - SFML developer

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI (old thread)
« Reply #85 on: October 05, 2010, 09:27:01 am »
Major design update for SFGUI:

As I was pretty unhappy about the fact that widgets are only able to render sf::Images (with the "boxing" method), I thought about possible alternatives. And because the library is inspired by GTK, I took another look of how they implemented the rendering separation, namely engines and themes. GTK separetes the look by providing a rendering engine that actually renders the visuals and a theme that modifies various settings in that engine (e.g. colors). The big advantage is: You can modify how widgets look *completely* by switching the engine.

I think getting such a design into SFGUI would be more than neat. My current design is as follows:

The widgets do not render them themselves anymore. Instead they use a rendering engine that encapsulates the rendering. This engine produces sf::Drawables that each widget caches and renders upon redraw. Besides the engine, there're themes just like in GTK: I will provide a basic theme loader that loads in some properties that can be used by the rendering engine. For example -- of course depending on the engine! -- you can adjust colors and special effects here (shadows, animations, w/e).

SFGUI will come with a standard engine called "BREW" that will mostly do what the current "static" rendering in SFGUI also does: Rendering images. However, it will provide more functions like tiling images, stretching them, "boxing" (like it's done at the moment) and using animations.

Rendering engines for SFGUI are of course written in C++. That means if you want to change the look and feel of widgets dramatically, you'll have to provide your own. But for most users this isn't needed, since BREW will already give you enough features to build up your GUI.

Theme files will look like this:
Code: [Select]


* {
color: #000000;
background-color:#ffffff;
}

Button.States.Normal {
image: button.png;
method: box;
}

Button.States.Hover {
image: button_hover.png;
method: box;
frames: 3;
delay: 100;
}

Editbox {
padding: 5 5;
}


Looks familiar? Right! Most users know how to write CSS, so I chose a similar syntax for themes to make writing them easier and more intuitive than the current implementation. I guess maybe it's also easier for pure designers who're already familiar with CSS.

Phew, much to do, but I'm sure it will pay off. So stay tuned. :)

pierreyoda

  • Full Member
  • ***
  • Posts: 186
    • View Profile
    • http://pierreyoda.pagesperso-orange.fr/
SFGUI (old thread)
« Reply #86 on: October 05, 2010, 04:13:47 pm »
Well, what a little revolution! :D

Yep, skin files will be easier to personalize with that syntax!

Good luck  :lol:
Projects:
- Open Rodent's Revenge (rewriting in progress)
- Open Advanced War (paused)

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
SFGUI (old thread)
« Reply #87 on: October 05, 2010, 09:33:09 pm »
Sounds great ! o_o

Good luck indeed :)
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 #88 on: October 05, 2010, 10:07:13 pm »
Thank you guys. However implementing this forces me to change a lot of stuff all over the place. In other words: It'll take time. ;)

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
SFGUI (old thread)
« Reply #89 on: October 15, 2010, 01:55:56 pm »
So it won't be finished in the near future, eh? :D Cause I want to use it for my project. :D (Hmmm.... maybe a stupid question, but can you estimate the time needed to finish it? Roughly... or give an idea at least :))

 

anything