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

Author Topic: SFGUI (0.4.0 released)  (Read 392557 times)

0 Members and 6 Guests are viewing this topic.

Kojay

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: SFGUI (0.3.0 released)
« Reply #600 on: January 19, 2016, 01:31:58 am »
Firstly, it is redundant, because I know there is a view in the canvas.
Secondly as I already remarked, if I was drawing something on a sf::RenderWindow/sf::RenderTexture and now wish to draw it on a sfg::Canvas, this requires extra work (given that I use the interface of sf::RenderTarget).

Is that all that is missing? I need an exhaustive shopping list before I consider this feature for addition. ;D

  • getDefaultView() and getViewport()
  • 4 map* functions
  • push/pop/reset GL states

These are the differences between sf::RenderTarget and sfg::Canvas at the moment. sf::RenderTarget::getSize() seems covered by sfg::Widget::GetAllocation().
Not sure about GL states, haven't tried mixing SFML and GL drawing on a canvas.
It will be great if sfg::Canvas was indistinguishable from sf::RenderTarget. This may be quite simple now, I don't know. (I had tried this in the past and ran away scared from the internals of the Canvas).

lordseanington

  • Jr. Member
  • **
  • Posts: 86
  • Coffee is the blood of a coder.
    • View Profile
Re: SFGUI (0.3.0 released)
« Reply #601 on: February 05, 2016, 03:28:02 am »
SFGUI has been a full lifesaver to me and my projects, without it i would have terrible looking login screens and in general, thanks to SFGUI, it looks great. Please keep up the excellent work.

Suslik

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: SFGUI (0.3.0 released)
« Reply #602 on: April 27, 2016, 10:41:35 pm »
SFGUI crashes for me if I close console application window with its own "close" button. code is as follows:
#include <SFGUI/SFGUI.hpp>
#include <SFGUI/Widgets.hpp>

#include <SFML/Graphics.hpp>

int main()
{
  sf::RenderWindow appWindow;
  appWindow.resetGLStates();
  sfg::SFGUI sfgui;
  while (1);
  return 0;
}
 

More complicated code including standard samples crashes as well when I close console window.

It crashes somewhere in sfg::SFGUI spamming all the console with messages like these:


With an access violation like this:


I'm using Visual Studio 2015 with latest official SFML 2.3.0 x86 distribution and prebuilt SFGUI from here https://nightlybuilds.ch/project/show/5/SFGUI/

I have tested my previous setup that uses year-old(approximately) versions of both SFML and SFGUI and they both work fine without crashing.
« Last Edit: April 27, 2016, 11:11:57 pm by Suslik »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: SFGUI (0.3.0 released)
« Reply #603 on: April 28, 2016, 12:20:56 am »
Closing the console window is not normal closing behavior. It's closer to calling the exit() function, meaning you don't get a clean application destruction, as such it's not recommended to close an SFML application via closing the console. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Erdrick

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • Email
Re: SFGUI (0.3.0 released)
« Reply #604 on: May 09, 2016, 04:35:09 am »
Hi,

I'm trying to build SFGUI 0.3 using Visual Studio Community 2015 and was wondering if anyone had success doing that yet?

I was able to configure and generate using the CMake utility but then while running nmake install I got some errors.  SFML_STATIC_LIBRARIES is checked and SFGUI_BUILD_SHARED_LIBS was unchecked.

 I copied what i thought was the relevant portion below
(click to show/hide)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: SFGUI (0.3.0 released)
« Reply #605 on: May 09, 2016, 07:08:03 am »
If you have also checked SFGUI_USE_STATIC_STD_LIBS but your SFML version hasn't been built with SFML_USE_STATIC_STD_LIBS being checked, thus you get compatibility issues. Either uncheck it for SFGUI or rebuild SFML with the check active.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Erdrick

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • Email
Re: SFGUI (0.3.0 released)
« Reply #606 on: May 13, 2016, 04:19:23 am »
If you have also checked SFGUI_USE_STATIC_STD_LIBS but your SFML version hasn't been built with SFML_USE_STATIC_STD_LIBS being checked, thus you get compatibility issues. Either uncheck it for SFGUI or rebuild SFML with the check active.

Hi eXpl0it3r, thanks.  I got a couple of builds to work now after starting from scratch.  One non-static and one static build.  Both had SFGUI_BUILD_EXAMPLES and SFGUI_BUILD_DOC turned off, i'll try with that next.

Erdrick

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • Email
Re: SFGUI (0.3.0 released)
« Reply #607 on: May 14, 2016, 05:59:07 pm »
I am still stuck so I put some questions in the SFGUI forum to see if I can get some help.

http://sfgui.sfml-dev.de/forum/post2662.html#p2662

LarsXYZ

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: SFGUI (0.3.0 released)
« Reply #608 on: June 16, 2016, 04:22:58 pm »
I have been trying for three days now to build SFGUI for Visual Studio 2015. It just won't work. Does anyone have a version laying around they can chuck my way? It would be very much appreciated.

fallahn

  • Hero Member
  • *****
  • Posts: 507
  • Buns.
    • View Profile
    • Trederia
Re: SFGUI (0.3.0 released)
« Reply #609 on: June 16, 2016, 05:18:50 pm »
Does anyone have a version laying around they can chuck my way? It would be very much appreciated.

This repo has a copy in the include and lib directories.

LarsXYZ

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: SFGUI (0.3.0 released)
« Reply #610 on: June 17, 2016, 12:44:30 pm »
Thank you so much!  :D

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: SFGUI (0.3.1 released)
« Reply #611 on: July 18, 2016, 08:14:04 am »
Thanks to the continuing effort of binary1248 and other contributors, we are pleased to announce the release of version 0.3.1. That version is mainly, as the version number suggest, a bugfix release with some neat enhancements. API is compatible with 0.3.0.

Binary releases for Windows are once again available, to help getting started quicker. Thanks to eXpl0it3r for building those.

Download

Grab your copy from here.

Changelog

Enhancements:
  • Implemented support for loading character sets in sfg::Engine and sfg::SFGUI as well. Now, explicitly adding character sets to load will suppress the loading of the default character set (codepoint 0x0000 to 0x0370). The Latin-1 set will have to be explicitly loaded in that case as well.
  • Added OnTabChange signal to Notebook.
  • Reuse an already loaded default font object.
Fixes:
  • Fixed sfg::Separator not requesting a proper size allocation.
  • Fixed various documentation errors.
  • Fixed sfg::Frame requisition calculation.
  • Fixed sfg::ResourceManager::SetDefaultFont() assigning the new font to the wrong identifier.
  • Fixed ComboBox::OnSelect not being emitted when selecting the item which is already currently active from the drop-down.
  • Fixed clicking the close button of a window also initiating a drag. (#24)
  • Fixed Renderer::CreatePane adding too many new primitives.

shadowmouse

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Re: SFGUI (0.3.1 released)
« Reply #612 on: July 22, 2016, 10:12:04 pm »
Is it possible to dynamically add labels/widgets into a box many times? I've put the code in a spoiler tab because it's 80ish lines, but it's based on the Hello World example, so I don't think it can be much cut down. Whenever I press the button, which packs another label into the box, a second time, the program crashes with Segmentation Fault (core dumped) printed to the terminal. When I run it in the Debugger, it comes up that the container::HandleEvent done by the Box which is having labels added to it crashing.
This was done with the GitHub version of sfgui from about a week ago.
(click to show/hide)

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFGUI (0.3.1 released)
« Reply #613 on: July 22, 2016, 10:42:22 pm »
SFGUI doesn't delay execution of your signal handlers to some arbitrary point in the future where they are "safe" to be run (many bloated GUI libraries actually do this because they think it somehow makes the library easier to use...). They are run on the spot when the associated widget determines that the corresponding event has been triggered. This means that if you alter a widget hierarchy while it is being stepped through, you will get undefined behaviour. Exactly the same as if you were iterating through a std::vector and accidentally insert an element into it in one of the functions you call within the loop.

You don't pay for what you don't use.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

shadowmouse

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Re: SFGUI (0.3.1 released)
« Reply #614 on: July 22, 2016, 10:51:25 pm »
I've changed it to this, and it now works:
(click to show/hide)
This looks a bit weird, and I'll probably change the program structure so that it seems a bit more natural, but if it looks stupid and it works, it isn't stupid. Thanks for clearing this up. :)