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.

Topics - billarhos

Pages: [1] 2
Help requests / ChildWindow change position when title changes.
« on: 14 January 2019, 17:57:42 »

When i change the title of a child window the windows moves a bit inside the main (windows) form. I change title text because i am using more than one language.
This happening when height of child window is smaller than main window (570). However if the child window has the same height with form (600px) the the title tongle between visible and invisible.

Using github version

Code: [Select]
mWindow.create(sf::VideoMode(800, 600), "Sfml + Tgui example", style, contextSettings);

tgui::ChildWindow::Ptr pWindow = tgui::ChildWindow::create();
pWindow->setSize(800, 570);
pWindow->setPosition(0, 0);

pButtonLoad = tgui::Button::create();
pButtonLoad->setSize(150, 50);
pButtonLoad->setPosition(800 / 2 + 50, 600 / 2 - 20);
pButtonLoad->connect("MousePressed", [=]()

Feature requests / "opacity when widget is disabled
« on: 10 January 2019, 12:23:25 »
Hi Texus. Happy new year.

Good news. I started using 0.8.2.  I finished one of my big projects. I done all the changes and now i am changing the little details in order all widgets looks like before.
Thank you for the great work you done.

I was thinking if a "opacity when widget is disabled" property in all widgets can be added. Right now, when i want for instance a check box to be disabled i set the manually the opacity to 0.3. So the user can easily understand that this widget can not be touched-changed. Ii should be great if we can have this out of the box!

Also, if i run "setOpacity" other than 1.0f before adding widget to gui manager the opacity does not apply. It works if i first add the widget and then apply new opacity. I tried this with "button".


Feature requests / Checkbox future improvments
« on: 30 December 2018, 12:29:32 »
I am trying to set initial value to checkbox without sending to me back a signal event. This is happening on initializing. It is important for me this two callbacks not to be triggered
in initializing progress. Only to set the visible part of checkbox (On/Off).

Now it is ok because i am using some booleans to avoid this.

This can be prevented by adding a "SetState(bool onOff)" function without triggering any callbacks in it.

Code: [Select]
pCheckBox = GAME_MANAGER->getGuiTheme()->load("CheckBox");
pCheckBox->setPosition(GAME_MANAGER->layoutWidth(450), GAME_MANAGER->layoutHeight(280));
pCheckBox->setSize(GAME_MANAGER->layoutWidth(100), GAME_MANAGER->layoutHeight(50));

pCheckBox->connect("Checked", [=]()
//do something here but only when user check this

pCheckBox->connect("Unchecked", [=]()
//do something here but only when user uncheck this

if (MEMORY_MANAGER->readDataBool(MemoryMain::checkBoxStatus))

Also a general callback with the name "changed"  it would be a good idea.

thank you

Feature requests / Clickable textbox
« on: 19 December 2018, 19:44:34 »
Using a textbox widget to display some info text, i came in front of two obstacles.

1.Even using "setReadOnly" function, in "editbox" you can still select some words or lines.
2.I was unable to find a way to catch a mouse left click on "editbox", in order to close my help form.

I am using 0.7.5 version.

thanks for reading

Feature requests / center align in labels
« on: 12 May 2018, 11:06:25 »
Hi Texus.

The center alignment when more than one lines exist, in my case in "buttons" but i can think that the same happening in "labels" also since "buttons" uses "labels", has not
correct align. All lines keep the first line start position. But each line has different count of chars.

It would be great if this would be implement at least in the new version of tgui. This, it would give me an extra motivation to start using 0.8 version sooner ;)


Help requests / click on buttons when the view is changed
« on: 29 March 2018, 21:54:40 »
i found a strange bug. Really can not say if this is sfml or tgui problem but is is happening on button widjets when changing size and view on sfml form
along with changing the alpha color of form.

here is the repro project

Code: [Select]
sf::Uint8 alpha = 80;
HWND hwnd = mWindow.getSystemHandle();
SetLayeredWindowAttributes(hwnd, 0, alpha, LWA_ALPHA);

if i use the above lines then when i hit the left button the signal goes to the right button and vice versa. Strange, isn't it?
Hope Texus u come with any idea.


Help requests / canvas widget on windows 7
« on: 15 March 2018, 07:57:24 »

Well this time it is a crush. I installed my app to windows 7, 64 and after some tests i realized that canvas widget causing the problem. I removed it and the app stop crushing.
I am using a lot of different widgets but only this causing the problem. I have install a lot of versions of vga drivers and the problem remains. Maybe there is some version that stops the problem. Of cource, the crushing happening only on win 7 64 and not on windows 10, 64.
The code snippet shows when the crush occurs. (on destroy)

Code: [Select]

cForm::cForm() :
sf::RectangleShape line(sf::Vector2f(1, 800));
line.setPosition(sf::Vector2f(0, 1));

pCanvas = tgui::Canvas::create({ 10, 800 });
pCanvas->setPosition(330, 70);
pCanvas->clear(sf::Color(194, 206, 200));


       //-->the crash problem
class cForm
tgui::Canvas::Ptr pCanvas;

Any clue mates?

Feature requests / Upside down slider issue
« on: 18 January 2018, 16:18:54 »
Hi Texus.

I am trying to make a sound equalizer with vertical sliders to adjust low, mid , high frequencies.
However there is no way to set positive number to up and negatives to down side of sliders.


Photo shows better what i try to achive.

Also, it would be great, to have a step value for slider (i know is a mess).

Feature requests / spin have some issues.
« on: 10 January 2018, 16:37:03 »
Hello Texus

I tried "spinbutton" but setBackgroundColor,  setBackgroundColorNormal,  setBackgroundColorHover not working nor from txt file, neither from code.

Also, what is the difference between setBackgroundColor and setBackgroundColorNormal?

Suggestions: It would be great if a step value exist. Also, a text shown with the current value in between buttons as optional would be great!

thank you.

Help requests / Grid issue
« on: 27 July 2017, 16:38:12 »
When i add some buttons to my grid widget, i use the center align (default).
However if i use removeAllWidgets before i add my buttons to grid the alignment is getting top-left.

I use the 0.7.4

Code: [Select]

int index = 0;
for (unsigned int row = 0; row < 2; ++row)
for (unsigned int col = 0; col < 2; ++col) {
pGrid->addWidget(pGridButtons[index++], row, col);

One solution is to use this code insted of "removeAllWidgets()"
Code: [Select]
auto& widgets = pGrid->getWidgets();
for (int i = 0; i < widgets.size(); i++)

General Discussion / Shortcut ctrl+c hangs my programm (editBox)
« on: 09 March 2016, 15:28:54 »

When press ctrl+c, in all cases (empty edibox, edibox with text, editbox with text selected) i got exception error.
Happens in debug and release.
Are shortcuts supported by editbox?

Using Visual studio 2013

General Discussion / tgui::Table "vector subscript out of range"
« on: 31 January 2016, 09:20:07 »
i decided to replace some list boxes with table widget and here is the issue i face.

to set "setFixedColumnWidth()" must first "setHeaderColumns()". Yes, i can work around but is this a real issue?


hi, i just download the latest version from git hub and i got in my code this linker error:
unresolved external symbol "public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > tgui::EditBox::Validator::Int" (?Int@Validator@EditBox@tgui@@2V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A)

if i choose the other way (well , i do not quite understand the two pair of brackets) it is working.

   pEditBoxServerPort->setInputValidator(tgui::EditBox::Validator::Int); -->linker error
   pEditBoxServerPort->setInputValidator("[0-9]*");->working as expected (only numbers)

General Discussion / tgui issues
« on: 07 January 2016, 12:00:55 »

here is some misbehaves and a future request.

-1-.Caret vanished on edit boxes with right alignment if has width value "1" or "2"

-2-.Caret is smaller on edit boxes with right alignment if has value 3 or more than the edit boxes with center or left alignment.

-3-. Conclusion of -1- and -2-.  Carret can be seen if has 3 width value or more and the visible width is (width - 2)

-4-. CaretWidth of edit boxes is missing from properties (reading value form txt)

-5-. Need the feature of alignment of text in labels.
      Example: if There is an explanation label over an edit box there is no way to align proper this label on conjuction with edit box.
      The problem grows if the text of the label is changing dynamically (ex. change language). This problem is solving by dynamically recalculate width and position of label.
      Can provide photos if necessary.   

Hi Texus and happy new year.
Just download latest tgui from github and run my project with the new built libraries. However, i got this error in DataIO::parse

"Error while parsing input. Expected '{' or ':', found 'T' instead."

This is happening whatever widget i tried to load.

I have change nothing the last three months. I build everything in the way i did.

the block "if (stream.peek() == '#')" is missing in this version of tgui

Pages: [1] 2