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
1
Help requests / ChildWindow change position when title changes.
« on: 14 January 2019, 17:57:42 »
Hi

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);
mWindow.setFramerateLimit(60);
mGui.setTarget(mWindow);


tgui::ChildWindow::Ptr pWindow = tgui::ChildWindow::create();
pWindow->setSize(800, 570);
pWindow->setPosition(0, 0);
pWindow->setKeepInParent(true);
pWindow->setTitleAlignment(tgui::ChildWindow::TitleAlignment::Center);
pWindow->getRenderer()->setTitleBarHeight(22);
pWindow->setTitle("Bill");

//-----------------------------------------------------------------------
pButtonLoad = tgui::Button::create();
pButtonLoad->setSize(150, 50);
pButtonLoad->setPosition(800 / 2 + 50, 600 / 2 - 20);
pButtonLoad->getRenderer()->setTextColor(sf::Color::Black);
pButtonLoad->setText("Load");
pButtonLoad->connect("MousePressed", [=]()
{
pWindow->setTitle("Billarhos");
});

2
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".

cheers


3
Feature requests / Checkbox future improvments
« on: 30 December 2018, 12:29:32 »
Hi,
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))
pCheckBox->check();
else
pCheckBox->uncheck();



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

thank you


4
Feature requests / Clickable textbox
« on: 19 December 2018, 19:44:34 »
Hi.
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

5
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 ;)

cheers


6
Help requests / click on buttons when the view is changed
« on: 29 March 2018, 21:54:40 »
Hi,
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
http://www.mediafire.com/file/d2nadgdqb9wstw9/Tgui.rar

Code: [Select]
sf::Uint8 alpha = 80;
HWND hwnd = mWindow.getSystemHandle();
SetWindowLongPtr(hwnd, GWL_EXSTYLE, (GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_OVERLAPPEDWINDOW) | WS_EX_LAYERED);
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.

thanks






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

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]

//cpp
//-----------------------------------------------------------------------------
cForm::cForm() :
{
sf::RectangleShape line(sf::Vector2f(1, 800));
line.setFillColor(sf::Color::Black);
line.setPosition(sf::Vector2f(0, 1));

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

GAME_MANAGER->getGui()->add(pCanvas);
}

cForm::~cForm()
{
GAME_MANAGER->getGui()->removeAllWidgets();
       //-->the crash problem
}
//h
//-----------------------------------------------------------------------------
class cForm
{
public:
cForm::cForm();
~cForm();
private:
tgui::Canvas::Ptr pCanvas;
}

Any clue mates?




8
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.

pSliderEqMid->setMinimum(-20);
pSliderEqMid->setMaximum(20);

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).





9
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.


10
Help requests / Grid issue
« on: 27 July 2017, 16:38:12 »
Hi.
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]
pGrid->removeAllWidgets();

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++)
{
pGrid->remove(widgets[i]);
}

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

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
thanks

12
General Discussion / tgui::Table "vector subscript out of range"
« on: 31 January 2016, 09:20:07 »
hi
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?

Bill

13
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)
1>

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)

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

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.   

15
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