Main Menu
Menu

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.

Show posts Menu

Messages - roccio

#26
Help requests / Re: MenuBar problem
10 May 2018, 16:21:32
I'm using Visual C++ 2015 and using dynamic link.
#27
Help requests / Re: MenuBar problem
10 May 2018, 14:50:26
Here it is:


int main(int argc, char** argv)
{
sf::RenderWindow window;
sf::Font font;
tgui::Gui gui;

window.create(sf::VideoMode(800, 600), VERSION, sf::Style::Close);
window.setFramerateLimit(60);

font.loadFromFile("fonts\\segoeui.ttf");
gui.setTarget(window);
gui.setFont(font);

tgui::MenuBar::Ptr  menu = tgui::MenuBar::create();
gui.add(menu);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
return 0;

gui.handleEvent(event);
}
window.clear(sf::Color(223, 223, 223));
gui.draw();
window.display();
}

return 9;


Just comment the
gui.add(menu);

and no errors on exit
#28
Help requests / MenuBar problem
10 May 2018, 14:35:36
Hello,
I have updated SFML to 2.5.0 and TGUI 0.8 dev all compiled with source by myself.
It all works well, but I have a problem when using tgui::Menubar.

What I do is just this:
- load a font
- set this font to tgui::gui
- create a MenuBar
- add menubar to gui

then normal event processing and rendering.

All works, only when I close the program I have this error:

Failed to activate OpenGL context: Operazione completata.

An internal OpenGL call failed in Texture.cpp(117).
Expression:
   glDeleteTextures(1, &texture)
Error description:
   GL_INVALID_OPERATION
   The specified operation is not allowed in the current state.


This is not happening if I just don't add the menubar to gui.

Is there something I miss?
#29
Help requests / Re: Tabs disable
09 April 2018, 09:11:47
This is a very usefull function, thank you very much!
#30
Help requests / Re: Tabs disable
12 March 2018, 08:45:36
Thanks!
#31
Help requests / Tabs disable
09 March 2018, 10:07:13
Hello,
I have some tabs in my application, but I would like to disable one (ore more) if something happens.
Is this possible?

Thanks
#32
ok, thank you
#33
Hello,
just another question regarding menu.
Is it possible to create a multiple submenu levels or just one menu and one submenu?

Something like

File
--New
-----text file
-----image
--Save
--Exit
#34
Thank you very much, the trick works perfectly!
#35
Hi,
just wanted to know if there is a way to close a submenu when mouse get out of the menu block.

Thank you
#36
Help requests / Re: listbox theme
07 April 2017, 14:21:13
Just found  :) :)

HoverBackgroundColor : (51, 153, 255);
TextColorHover : (255,255,255);
#37
Help requests / listbox theme
07 April 2017, 14:17:43
Hello, I wish to set the hover color in my theme file for the listbox:

ListBox {
    BackgroundColor : (255, 255, 255);
    TextColor : (10, 10, 10);
    SelectedBackgroundColor : (51, 153, 255);
    SelectedTextColor : (250, 250, 250);
    BorderColor : (200, 200, 200);
    Borders : (1, 1, 1, 1);
    Scrollbar : "Scrollbar";
}

This is my current source, how can I add the hover background and text color?
#38
Help requests / Re: Copy and paste editbox
08 March 2017, 14:06:26
Adding

tgui::Clipboard::setWindowHandle(gui.getWindowHandle());

make it works.

Thank you very much.
#39
Help requests / Re: Copy and paste editbox
08 March 2017, 13:59:00
Yes, I set a RenderWindow. I noted that the "internal" tgui clipboard works, but not the windows one. So I can't even copy a string from the tgui editbox and paste in notepad.
#40
Help requests / Re: Copy and paste editbox
08 March 2017, 13:49:53
I have made a simple test application, but it works perfectly, so I need to check in my code.
Btw running on Windows10 with Visual studio 2015 and tgui 0.7.3
#41
Help requests / Re: Copy and paste editbox
08 March 2017, 11:39:01
Sorry again, but I am only able to copy and paste from tgui editboxes. If I copy data from an externat text editor (for example) the paste is not performed on editbox. Is there something that I must enable?
#42
Help requests / Re: Copy and paste editbox
07 March 2017, 14:34:05
Thank you, I use Windows.
#43
Help requests / Copy and paste editbox
07 March 2017, 14:25:41
Hello,
sorry if this has been already discussed, I have used the search function but have not found anything.
My problem is to have an editbox where I can paste the string from the clipboard.

Any advice?
#44
Help requests / RemoveAllWidget
26 January 2017, 10:40:37
Hello,
just a question,
will removeAllWidgets free all memory allocated for the widgets?
#45
You have made the right question and I must rethink the way the user has to choose a value. That list is a monster, and unusable for everyone. Don't need to put hands on that stuff, thank you!
#46
Help requests / Combobox with many many items
19 August 2016, 16:45:30
Hello, I need a combobox with many items, (say over 1000), but if I add all the creation is very slow and even change item is a pain (better in release, but debug it's unusable). It there a workaround for this? Maybe I can load a little number of items (say 20) and when moving the list reload the correct ones. How can I do something like that? Or if are there better solution...

thank you
#47
Help requests / Re: Crash 32 bit debug
01 August 2016, 11:15:17
It is quite complex, as it it part of a big project. But the error must have been from my side, as I recompiled the whole project and now it works.

Thank you.
#48
Help requests / Re: Crash 32 bit debug
29 July 2016, 17:02:05
No, it seems correct. And doing the same on the 64 bit all works well.
#49
Help requests / Crash 32 bit debug
29 July 2016, 16:42:18
Hello, I am trying to make my application work for 32 bit machines. I use Visual Studio 2015 under win 10. I have downloaded the tgui libs for x86 and I can compile without problems.
Even if I run in release mode all works ok, only when trying to run in debug mode.

Here a very little test

#include <TGUI/TGUI.hpp>

int main()
{
tgui::Theme::Ptr theme = std::make_shared<tgui::Theme>("gui.cfg");
if (theme != nullptr)
tgui::Label::Ptr LABEL_TEMPLATE = theme->load("label");

return 0;
}


and here is the config file

Label {
    TextColor : (10, 10, 10);
}


Any ideas?

Thank you
#50
Help requests / Re: Disable colors
27 June 2016, 17:10:56
That makes sense, thank you.