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

Author Topic: TGUI: a c++ GUI for SFML (with Form Builder)  (Read 286840 times)

0 Members and 3 Guests are viewing this topic.

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #450 on: February 24, 2013, 02:33:36 pm »
Quote
If you are waiting for me to add the feature of customizing with a single bitmap then you're going to wait for a long time. It's not planned anywhere soon.

Is more easy for artist to make single image.


edit :

how can i change text color of ChildWindow ?
« Last Edit: February 24, 2013, 02:35:51 pm by Cpl.Bator »

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #451 on: February 24, 2013, 02:47:58 pm »
Yes I am aware that it would be better if I would support a single bitmap, but I have a lot of other things to do that are also important. So I doubt that it will get supported in v0.6. But maybe it will get into v0.7 one day.

Apparently you can't change the title color. I'll add the possibility in the next few days (I first have to make a small internal change in ChildWindow).
TGUI: C++ SFML GUI

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #452 on: February 24, 2013, 03:39:52 pm »
ok, i've created a child window with slider inside ( v0.6 ) , when i want to use (move) the slider , the child window move at the same time. it's big problem , the move of child window must be activated when the mouse is inside the titlebar , no ?

sry for my english. correct me if i make mistake ;)


Edit:

I find bug with child window and close button:

- Open Child Window
- place mouse over close button ( hover button appear )
- click on the button ( don't release mouse button )
- go outside close button
- release mouse button ( ChildWindow still open )
- go over close button with the cursor
- the image is Down.png not Hover.png !


« Last Edit: February 24, 2013, 03:47:28 pm by Cpl.Bator »

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #453 on: February 24, 2013, 04:00:41 pm »
The close button is just a minor bug, but the one with the slider is indeed a serious issue.
I'll look into this. Hopefully I can find the cause and fix this quickly.
TGUI: C++ SFML GUI

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #454 on: February 24, 2013, 04:19:04 pm »
Both bugs are fixed now.
TGUI: C++ SFML GUI

Cpl.Bator

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #455 on: February 24, 2013, 06:17:20 pm »
adding two methods for change and get title color :

ChildWindow.cpp
http://pastebin.com/nwfesFHB

ChildWindow.hpp
http://pastebin.com/auzbf1D2

i see for adding icon on the title bar now.

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #456 on: February 25, 2013, 06:34:51 pm »
Well don't waste too much of your time to get that done.

It would be nice if you could write it, but I know my own code better so I can get it written against tomorrow (or even in a few hours).

EDIT: Done
« Last Edit: February 25, 2013, 08:36:25 pm by texus »
TGUI: C++ SFML GUI

netrick

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #457 on: February 28, 2013, 10:38:31 pm »
Do you plan on improving sprite sheet and picture performance in 0.6? As I encountered bad performance with many pictures in 0.5 and had to fallback to use sfml for rendering + clickable object.

Also, did you think about scrolling ability and tabs for panels and childwindows?

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #458 on: February 28, 2013, 11:38:10 pm »
Quote
Do you plan on improving sprite sheet and picture performance in 0.6?
The problem is that there isn't much more to improve.
If you look at the draw function in Picture then you'll see it hardly contains any code. Of course I can cache some values but I'm not sure if it will make a huge difference.

However if I stop deriving objects from sf::Drawable then I might be able to get the draw function down to a single line.
So I'll think about this.

Quote
Also, did you think about scrolling ability and tabs for panels and childwindows?
This is basically combining two existing objects. Create a panel, add a scrollbar to it on the correct location and move your other objects when the scrollbar sends a callback (you can easily do this by using getObjects and then check if the pointer differs from callback.object before calling setPosition on it).
And using the Tab object with a panel shouldn't be too hard either.

I am not going to spend much time in it at this point. It might be interesting for the future, but I don't think it should get high priority right now.
TGUI: C++ SFML GUI

jjonj

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #459 on: March 19, 2013, 08:57:00 pm »
I am new to a lot of things regarding this, not the least open source projects and their forums, make files and even c++ to some degree but i'm having some trouble and i hope i'm not embarrasing myself too much by posting my request for help here! :)

I wanted to create a music player, and so i found SFML and it worked well! thus i became in need of gui elements and i found TGUI! The installation instructions were clear and after some trouble of my own cause i finally got to the point at which i am now. I have used the newest version of SFML and TGUI 0.6 release candidates ( i also tried TGUI 0.5.2 but with same problem).
I used Cmake to create the visual studio project as specified, i opened the visual studio project and attempted to build it but i get 55 errors. Some of which i'll write here, the last numbers of each error is the line number:

IntelliSense: expression must have pointer type   b:\TGUI v0.6\src\TGUI\TextBox.cpp   2309
error C2440: 'return' : cannot convert from 'const sf::Font' to 'const sf::Font *'   B:\TGUI v0.6\src\TGUI\Label.cpp   109
error C2232: '->sf::Font::getKerning' : left operand has 'class' type, use '.'   B:\TGUI v0.6\src\TGUI\EditBox.cpp   1654
error C2065: 'Unknown' : undeclared identifier   B:\TGUI v0.6\src\TGUI\EventManager.cpp   170
error C2039: 'BackSpace' : is not a member of 'sf::Keyboard'   B:\TGUI v0.6\src\TGUI\EditBox.cpp   1099

I am certain that the errors upon me are of my own doing, but if anyone could offer some guidance of what could be to blame and how to solve my problems it would be awesome!!

Thanks
Jacob Jensen

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #460 on: March 19, 2013, 09:04:50 pm »
It seems like you are using an older version of sfml.
All the errors are about things that were changed in sfml over the last few months.

You will have to download and compile the latest sfml snapshot in order to tgui.
EDIT: Maybe even better: download the nighly build (http://en.sfml-dev.org/forums/index.php?topic=9513.0)
« Last Edit: March 19, 2013, 09:10:30 pm by texus »
TGUI: C++ SFML GUI

jjonj

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #461 on: March 21, 2013, 07:46:47 pm »
I was already using the 2.0 release candidate but getting the nightly build worked :)

EDIT: I'm getting two new error now tho!
error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)   B:\TGUI v0.6\build\src\TGUI\FormBuilder\msvcrtd.lib(ti_inst.obj)
error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)   B:\TGUI v0.6\build\src\TGUI\FormBuilder\msvcrtd.lib(ti_inst.obj)
So these are linker errors to what looks to me to some standard library for visual c++ by microsoft, when i went looking for the library file it wasn't in the folder listed in the error. I'm not profficient with linker errors yet and it's probably some silly mistake by me, but what could be causing this? i am using latest snapshop for both tgui and sfml.
EDIT2: I realized that the snapshots might not be debug versions so i tried compiling it as release, but i got two almost identical errors but with linker errors from LIBCMT.lib instead of msvcrtd.lib
« Last Edit: March 21, 2013, 08:02:04 pm by jjonj »

texus

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • TGUI
    • Email
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #462 on: March 22, 2013, 03:40:37 pm »
Are u using the sfml libraries in the static-std folder from the nightly build?
Did you compile tgui with the TGUI_USE_STATIC_STD_LIBS option checked?

All I can think of is that you are using the wrong combination of libraries.

Try not using the libs from the static-std folder and uncheck the option from tgui.
I just realized that the static std libs won't work if you follow the tgui compilation tutorial line by line (at least not when you didn't compile sfml yourself).
TGUI: C++ SFML GUI

jjonj

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #463 on: March 23, 2013, 01:02:44 am »
Unchecking static fixed it! naturally explains the linker errors! Thank you :)

netrick

  • Full Member
  • ***
  • Posts: 174
    • View Profile
Re: TGUI: a c++ GUI for SFML (with Form Builder)
« Reply #464 on: March 25, 2013, 09:20:03 am »
How stable is 0.6 now? I'd like to start porting my game to 0.6 and I can live with few api changes in the future, altough if it can still change rapidly then I'd stay with 0.5.

 

anything