Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - robvleugel

Pages: [1]
1
Help requests / Re: Regular / bold text
« on: 25 July 2013, 18:55:33 »
That was indeed the problem, thanks

2
Feature requests / Callback
« on: 25 July 2013, 16:39:36 »
Question/suggestion, why two separate functions for binding and setting the callback id?
Why not button->bindCallback(tgui::Button::LeftMouseClicked, 1);
Is there ever a need for separate functions?

Imo the function could even return the callback as integer and make the second parameter (ID) optional, assigning a new unique number if not entered.

Even better would be if the button could somehow be used in the way below

Code: [Select]
//Handle callbacks
    while (m_gui.pollCallback(m_callback))
{
if (quitbutton.state == tgui::Button::LeftMouseClicked)
{
Shutdown();
}
}

3
Help requests / Regular / bold text
« on: 25 July 2013, 16:16:02 »


As you can see the right text appears bold while the left text is not, any idea what might be causing this?

Code: [Select]
    m_gui.setGlobalFont("Fonts\\Cousine-Regular-Latin.ttf");

    //buttonQuit
    m_buttonQuit.init(m_gui);
    m_buttonQuit->load(m_config.guiTheme);
    m_buttonQuit->setSize(100, 30);
    m_buttonQuit->setPosition(900, 730);
    m_buttonQuit->setText("Quit");

    //buttonMenu
    m_buttonMenu.init(m_gui);
    m_buttonMenu->load(m_config.guiTheme);
    m_buttonMenu->setSize(100, 30);
    m_buttonMenu->setPosition(24, 730);
    m_buttonMenu->setText("Menu");


4
Help requests / Re: Runtime error upon button->load
« on: 24 July 2013, 13:39:56 »
No you cant open the command prompt from inside VS like in 2010, took me some time to figure out you can open it from VS > VS studio tools in the start menu.

It does seem to work now, but now its complaining about the Button image files.
button->load("Widgets/Button/BabyBlue"); doesnt seem to work but I guess I can figure it out.

Edit:
I did it!
I loaded my first button, I'm awsome!  8)
Thanks for the help

5
Help requests / Re: Runtime error upon button->load
« on: 24 July 2013, 12:44:20 »
Did you select the right compiler in cmake?

How can I do that?
I'm selecting NMake makefiles in cmake, then use nmake to build TGUI using the Visual Studio 2012 command prompt

edit:
hm seems I'm uing the 2010 command prompt, cant find the 2012

6
Help requests / Re: Runtime error upon button->load
« on: 24 July 2013, 11:33:03 »
Oh no I didnt mean release candidate, I ment the newest version : https://www.sfml-dev.org/download/sfml/2.0/  --> Visual C++ 11 (2012) - 32 bits

I'm using this one in VC++ 2013 and it works fine for my SFML project, but as soon as I include tgui it goes wrong.


7
Help requests / Re: Runtime error upon button->load
« on: 24 July 2013, 11:11:15 »
This topic would probably better suit in the intallation help right now but I dont want to start another topic.
I just downloaded the latest version of SFML and the latest version of TGUI, SFML is the release candidate that doesnt require any building. TGUI I build with cmake, both debug and release staticly. I linked the produced tgui-s-d.lib in my project and the include/lib directories were set correctly. After building my solution using the same code as above, I get a bunch of linking errors:

Code: [Select]
1>tgui-s-d.lib(Container.cpp.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in DebugEntity.obj
1>tgui-s-d.lib(Button.cpp.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in DebugEntity.obj
1>tgui-s-d.lib(Gui.cpp.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in DebugEntity.obj
1>tgui-s-d.lib(EventManager.cpp.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in DebugEntity.obj
etc.etc.

and:

Code: [Select]
Error 51 error LNK2001: unresolved external symbol "__declspec(dllimport) private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (__imp_?_Init@locale@std@@CAPAV_Locimp@12@XZ) C:\Dev\Projects\Myproject\Myproject\tgui-s-d.lib(Tab.cpp.obj)Myproject
Error 52 error LNK2001: unresolved external symbol "__declspec(dllimport) private: static class std::locale::_Locimp * __cdecl std::locale::_Init(void)" (__imp_?_Init@locale@std@@CAPAV_Locimp@12@XZ) C:\Dev\Projects\Myproject\Myproject\tgui-s-d.lib(Container.cpp.obj) Myproject

etc.etc.

Any idea what this might be causing?
_MSC_VER --> I'm using Visual studio 2012 express, is this not compatible?


8
Help requests / Re: Runtime error upon button->load
« on: 24 July 2013, 01:25:14 »
I don't even have the tgui-s.lib and tgui-s-d.lib libraries. I guess that's where my problem lies, I'll rebuild TGUI tomorrow to include the static libraries. And the debug files, as I forgot to build these too.
Thanks for the help!


9
Help requests / Re: Runtime error upon button->load
« on: 24 July 2013, 01:10:56 »
I'm not sure, how do I know I mix up release and debug? :)
I'm linking tgui.lib, btw I'm using SFML2 by static linking. It did whine about some SFML dll files I needed so I grabbed these from the SFML/bin folder.

Its 1:15 here but I'm not planning on sleeping before I have this problem fixed, I might get nightmares.




10
Help requests / Runtime error upon button->load
« on: 24 July 2013, 00:41:33 »
Unhandled exception at at 0x767CC41F in myprogram.exe: Microsoft C++ exception: std::length_error at memory location 0x0021F38C.

I get this runtime error whenever the button-->load line is reached.
Any ideas what might be causing this?
 I downloaded the lastest TGUI version according to the TGUI download page
("Download the latest development snapshot from github" --> https://github.com/texus/TGUI/archive)/master.zip)

Code: [Select]
...
    tgui::Gui gui;
    tgui::Button::Ptr button(gui);
    button->load("TGUI/widgets/Button/BabyBlue");
    button->setSize(260, 60);
    button->setPosition(270, 440);
    button->setText("Login");
...


Pages: [1]