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

Topics - roccio

#1
Help requests / ChildWindow close
01 October 2021, 12:06:05
Hello,

I have a question regarding the ChildWindow CLOSE event in 0.9.
In the previous version of TGUI what I used to do is to create a childwindow at the start and then using setVisible member to show/hide it. The window is created with the Close button on the title bar. In the ONCLOSE event I set the visible attribute to false.
Now, on 0.9 I do the same thing, but the when  I show the window and use the close button, I am unable to show it again.

I tried using the onEscapeKeyPress event and in this case all works fine.

Do I need to do something else when using the onClose event?

Thanks

Stefano
#2
Help requests / Group events
24 September 2021, 09:56:42
Hello, I have a problem with the group event management.

I used to do guiGroup->handleEvent(event); in the previous version of tgui, but now handleEvent is no more present.

How do I manage all possible events with 0.9?

Thanks
#3
Help requests / problem running 0.9
07 July 2021, 10:42:14
Hello,
I am trying to port my application to v0.9 and after resolving all compiler errors when I try to run I get this error:

Unable to fing ingress point for ?getKerning@Font...

(See attached image).

Do you have any idea of what I am doing wrong?

Thanks
#4
Help requests / List view double click
25 June 2020, 17:00:06
Is it possible to know which column has been double-clicked in a listView?

Thanks
#5
Help requests / Combobox signal
30 January 2020, 08:56:08
Hi,
I have a combox and I want to connect a function on itemselected that pass the index of the selected item and not the text.

void ChangeColor(int index) { std::cout << index; std::endl;}

...

g_comboColor->connect("ItemSelected", ChangeColor);


This compiles well, but when I run the code I get an exception in SignalImpl.hll

const std::size_t offset = (sizeof...(UnboundArgs) > 0) ? signal.validateTypes({typeid(UnboundArgs)...}) : 0; (line 157)

What am I missing?
#6
Hi,
I have a little problem with the menu bar.

I have created a menu


auto menu = tgui::MenuBar::create();
menu->getRenderer()->setTextColorDisabled(sf::Color(229*1, 131*0, 4*0));


and then in the main window loop I use two keypresses for enable or disable the menu:


if (event.key.code == sf::Keyboard::A)
    gui.get<tgui::MenuBar>("MenuBar")->setEnabled(false);
else if (event.key.code == sf::Keyboard::S)
    gui.get<tgui::MenuBar>("MenuBar")->setEnabled(true);


The menu is correctly enabled/disabled by the two events, but the problem is that when disabled the menu ites are rendered in RED, but when I reenable the menu the items are again in red untill I move the mouse over them.

Is there something I miss to get the items of the correct color?
#7
Hello,
I'm using v0.8 with visual studio 2017 and I have a problem.

I have a scrollable panel and inside this I have a combobox. The problem is when I scroll the panel and then try to  open the combobox for selecting a value. The list is scrolled down, and is displayed in incorrect position, even outside the panel (so that is impossible to see).

Any thought?

Thank you
#8
Help requests / v0.8-dev - Picture signals
15 May 2018, 16:58:19
Hello again :)
I have a problem with the picture widget. I am trying to connect it with a DoubleClicked signal, but it seems not to fire.


int Test()
{
sf::RenderWindow window;
tgui::Gui gui;

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

gui.setTarget(window);

sf::Texture texture;
texture.loadFromFile("images\\tgui-logo.png");

tgui::Picture::Ptr picture = tgui::Picture::create();
picture->getRenderer()->setTexture(texture);
picture->connect("DoubleClicked", []() {printf("Pressed"); });
gui.add(picture);

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 1;
}


Am I missing something?
#9
Hello, I have not understand how to correctly pass custom parameters is signal functions.
In my case I have a class member function that has 1 parameter as input

void PanelClient::windowChooseKey(const std::string& textbox)

I connect this function to a button press

button->connect("pressed", &PanelClient::windowChooseKey, "txtWindowShowHideKey", this);

but I am not able to compile.

What's the correct way of doing this?
#10
Help requests / Listbox signals
10 May 2018, 16:31:37
I have some problems going from 0.7 to 0.8 regarding the signals and in particular the old connectEx functions.
In example I had a function called when an item in a list box is selected. The function passed to the old connectEx used a parameter Callback that reported the selectedItemId.

How can I get the same with the new signal system?

Sorry for the noob question, but I have not found any tutorial...
#11
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?
#12
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
#13
Hi,
just wanted to know if there is a way to close a submenu when mouse get out of the menu block.

Thank you
#14
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?
#15
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?
#16
Help requests / RemoveAllWidget
26 January 2017, 10:40:37
Hello,
just a question,
will removeAllWidgets free all memory allocated for the widgets?
#17
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
#18
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
#19
Help requests / Disable colors
27 June 2016, 16:32:01
Hello,
is possible to define disabled colors for the widget in the theme file?
I was unable to find something.

Thank you.
#20
Help requests / MessageBox problem
24 June 2016, 12:00:18
Hello again,
I have a problem with the tgui::MessageBox.

I think the problem is with the VisualC++ compiler as it trys to replace MEssageBox with MessageBoxA as it is defined in the macro
#define MessageBox MessageBoxA

Is there a solution for this?