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

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

0 Members and 7 Guests are viewing this topic.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI
« Reply #225 on: January 11, 2012, 06:14:07 pm »
Quote
the code however is exactly that of the new tutorial. ....

It's not. In your source file it shows:

Code: [Select]
button->OnClick.Connect( OnButtonClick );

But in the "Hello world" examples you've got:

Code: [Select]
button->OnClick.Connect( &OnButtonClick );

Please check if that's causing the problem.

Elgan

  • Jr. Member
  • **
  • Posts: 77
    • AOL Instant Messenger - Flat+1,+17+st+Cl
    • View Profile
SFGUI
« Reply #226 on: January 11, 2012, 11:41:04 pm »
no sorry that was me messing about.

it was exactly the same and did not work, I rewrote that and some other lines before posting but just missed that as it compiled ok.


with it fixed..and exactly the same as the tutorial.........it does not "connect" still.

Edit: just double checked.....nope, not working, if I have time ill even video it, but its doing nothing....then copied tutorial code, copy paste...nothing.

maybe ill try redoing the .lib :S

Elgan

  • Jr. Member
  • **
  • Posts: 77
    • AOL Instant Messenger - Flat+1,+17+st+Cl
    • View Profile
SFGUI
« Reply #227 on: January 12, 2012, 12:33:00 am »
Found it!

Thanx, I rechecked the options and it was exporting it!....removed that and works, thanx for support and patience..........finally can move on...

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
SFGUI
« Reply #228 on: January 13, 2012, 08:46:33 am »
Ha! ;) Good luck. ;)

BlueMagic

  • Newbie
  • *
  • Posts: 49
    • View Profile
SFGUI
« Reply #229 on: January 23, 2012, 07:01:35 am »
Everytime that I leave an example, it crashes. Is that normal?

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
SFGUI
« Reply #230 on: January 23, 2012, 01:25:39 pm »
Quote from: "BlueMagic"
Everytime that I leave an example, it crashes. Is that normal?


Let me try to practice my fortune telling skills...

mmm...

You have an AMD/ATI graphics card?

And... you link to SFML dynamically?
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

BlueMagic

  • Newbie
  • *
  • Posts: 49
    • View Profile
SFGUI
« Reply #231 on: January 23, 2012, 05:23:17 pm »
Quote from: "binary1248"
Quote from: "BlueMagic"
Everytime that I leave an example, it crashes. Is that normal?


Let me try to practice my fortune telling skills...

mmm...

You have an AMD/ATI graphics card?

And... you link to SFML dynamically?


lol, yes and yes. Nice skills. I read a couple of pages but didn't see any mention of it, sorry. Is it going to be fixed or what can we do to fix it?

victorlevasseur

  • Full Member
  • ***
  • Posts: 206
    • View Profile
SFGUI
« Reply #232 on: January 23, 2012, 07:22:45 pm »
The SFML ATI bug is already fixed, isn't it ?

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
SFGUI
« Reply #233 on: January 23, 2012, 10:22:09 pm »
Quote from: "victorlevasseur"
The SFML ATI bug is already fixed, isn't it ?


http://www.sfml-dev.org/forum/viewtopic.php?t=4741
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

raycrasher

  • Newbie
  • *
  • Posts: 24
    • View Profile
SFGUI
« Reply #234 on: January 25, 2012, 07:32:32 am »
Hello,

Is there a way to use sf::Sprite as the image of a button? See, I have a bunch of sprites already loaded from a giant texture, and it currently looks like if I use sfg::Image I have to load that texture again.

I'm currently looking in the source, maybe I'll add a constructor to sfg::Image that accepts an sf::Sprite.

Thank you for your hard work in SFGUI!

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
SFGUI
« Reply #235 on: January 25, 2012, 01:14:31 pm »
Internally sfg::Image stores both a copy of the sf::Image and the sf::Texture associated with that Image due to the fact that if you wanted to retrieve the sf::Image used by the sfg::Image it would have to construct a new sf::Image from the sf::Texture anyway. Sure this copying takes up more memory, but the idea is that you can create an sf::Image, use it in an sfg::Image and let it go out of scope so the only copy of it resides in the sfg::Image. What you could do in your case is create temporary sf::Images from your sf::Sprite by getting it's sf::Texture and TextureRect and passing it to the sfg::Image constructor. It will make a copy of it and you can forget about the temporary. This behavior will change in the next version of SFGUI anyway for performance reasons so I wouldn't invest time in trying to make Widgets work with arbitrary SFML objects.

Hope I could help.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

raycrasher

  • Newbie
  • *
  • Posts: 24
    • View Profile
SFGUI
« Reply #236 on: January 26, 2012, 12:00:30 pm »
Thank you. I guess I'll just have to live with the increased memory requirements, at least until the next SFGUI release. Thanks for the help!

Elgan

  • Jr. Member
  • **
  • Posts: 77
    • AOL Instant Messenger - Flat+1,+17+st+Cl
    • View Profile
SFGUI
« Reply #237 on: January 26, 2012, 12:07:11 pm »
Entry.onkeyPress?

this is nice, very immature right now though.  Does it not exist, or do I need to add it?

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
SFGUI
« Reply #238 on: January 26, 2012, 04:26:06 pm »
Quote from: "Elgan"
Entry.onkeyPress?

this is nice, very immature right now though.  Does it not exist, or do I need to add it?


http://sfgui.sfml-dev.de/doxygen/classsfg_1_1Entry-members.html

I stress once again, it is worthwhile reading the documentation when working with SFGUI. It can be found at the website: http://sfgui.sfml-dev.de
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Elgan

  • Jr. Member
  • **
  • Posts: 77
    • AOL Instant Messenger - Flat+1,+17+st+Cl
    • View Profile
SFGUI
« Reply #239 on: January 26, 2012, 06:25:12 pm »
I see,. they inherit the widget ones too...entry just has 1 extra

I think it would be great to pass the key , I'm finding it difficult to detect key presses ..the function fires fine, but then how can I poll the ready polled event?

 

anything