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 - billarhos

#1
Help requests / cmake error
11 September 2019, 15:50:05
Hi Texus. I have a major problem with cmake. I have install varius versions but with the same error.

Error shown in photo.
#2
How can avoid overlaping text lines when i add line that exceed chatbox's width?
#3
General Discussion / Kitchen Sink
10 June 2019, 15:00:11
Would a kitchen sink example would be useful for future tgui users?
#4
Setting OpacityDisabled for picture seems not working.

Picture {
OpacityDisabled = 0.3
}


However picture->getRenderer()->setOpacityDisabled(0.3f); this is working.
#5
During showing a button with "show with effect" and interrupting the procedure with the "hide with effect", next time applying during "show the effect" alpha value never reaches 255.

Am i seeing correct?
#6

Some warnings appeared building (32bit) latest tgui source code (github) with visual studio 2015.

nanosvg.h(807): warning C4702: unreachable code
GuiBuilder.cpp(1480): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)
GuiBuilder.cpp(1481): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)
GuiBuilder.cpp(1482): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)

#7
General Discussion / Buttons 0.9
26 May 2019, 08:26:21

  • Buttons can blink, meaning that over a period of time can change background and text appearence. For instance can tongle between normal sprite and focused sprite. (global timer)
  • Every state (Normal, hover, etc) can have its own text color.
  • Every text for every state can have its own outline border.
  • Outline can have a thickness value.
  • Every text can have its own style (regular, bold).
  • Every text can have its own size.
  • Every text can have its own vertical and horizontal alignment on a given position inside the button (i can show you some button images if that is not clear).
  • A button can trigger (or not) from one or more keys. In my game i give the owner the ability to add any key he wants for every available button.
  • Having 9,there is no need of having "space" and "enter" as default keys out of the box.
  • Focusing in my opinion is over estimated but essential when you want to navigate with tab box. Bilinking over rules hovering and focusing.
  • Pressed time for "m_spriteDown" must be configurable. Action of triggering must be on the last frame. Zero value triggers the button at once showing one down frame.
  • Clicks or key presses can have "continuality" or not. Meaning that over pressing time, buttons can re-triggered as long as mouse or key is down.
  • A button can be tongle - switch button. (I saw you think for a different widget. It is not a bad idea having different widget. In my case is configurable (setTongle)).
  • Hovering can be disabled in touch screens because it is unnecessary (for all widgets).
  • Batch for rendering.

Those are some stuff that i have implemented in my codes over the years. Buttons and lists are the more demanding widgets in my opinion.
#8
General Discussion / About TGUI 0.9-dev
19 May 2019, 08:46:14
Hi Texus. Read in facebook about TGUI 0.9-dev and batching rendering. This is awsome!

In your post:
Quote
In release mode, TGUI 0.8 takes 0.25 seconds to render it while TGUI 0.9-dev reduces this to just 0.08 seconds (on a laptop with intel graphics).

One quarter of a second is too much time to render those few widgets. May be you meaning milliseconds? I have never seen those times in all past and current tgui versions.

Will tgui 0.9 continue to work as it is now? Will this be configurable, meaning select the way tgui renders?

What happens in future if tgui texts have outline color?



#9

pTextBox->connect("ReturnKeyPressed", [&]()
{

});

pTextBox->connect("ReturnKeyPressed", pressedFunc, pTextBox);


both above declarations are giving me an exception.

Quote
Exception thrown at 0x743B18A2 in Tgui.exe: Microsoft C++ exception: tgui::Exception at memory location 0x0113EA68.
Unhandled exception at 0x743B18A2 in Tgui.exe: Microsoft C++ exception: tgui::Exception at memory location 0x0113EA68.

in
Quoteunsigned int SignalWidgetBase::connect(std::string signalName, Func&& handler, const Args&... args)

I am using the day before yesterday's patch. (before "right click" in listview fixed)

Missing something?


#10
Feature requests / listview and add item
24 February 2019, 16:03:52
Hi Texus

You have:

1 : std::size_t addItem(const sf::String& text);
2: std::size_t addItem(const std::vector<sf::String>& item);
3 : bool removeItem(std::size_t index);

4 : void setSelectedItem(std::size_t index);
5: int getSelectedItemIndex() const;
i am sure that i forget some other functions


1. Add item as a row or in a specific cell in a specific column

std::size_t addItem(std::size_t columnIndex, const sf::String& text);


2: should be

std::size_t addRow(const std::vector<sf::String>& item);


3. is remove item - or remove row
4. setSelectedItem on which column
5. is selected row or selected a specific cell in a specific column

there is a need to be distiguish the cell index and the column index.
Also there is need for a "setCell(column, cell, text)" function like :

void setColumnText(std::size_t index, const sf::String& text);


and may be a


std::size_t addMultiRows(const std::vector<std::vector<sf::String>> & item);


thank you


#11
Help requests / List view
30 January 2019, 17:23:16
Hi Texus. I 've Just download 8.3 version and implemented a listview widget replacing a listbox thinking of make better look.

When you add a column also a vertical border line appearing just to show the different column. However you must add a vertical border only in between two columns and not after it.

When there is one column should not be added this vertical border. If two columns exist the one vertical border should be in the middle of two columns. And so on

vertical borders = columns  > 0 ? columns -1 : 0


#12
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


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");
});

#13
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

#14
Feature requests / Checkbox future improvments
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.


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

#15
Feature requests / Clickable textbox
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
#16
Feature requests / center align in labels
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

#17
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


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





#18
Help requests / canvas widget on windows 7
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)



//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?



#19
Feature requests / Upside down slider issue
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).




#20
Feature requests / spin have some issues.
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.