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

#76
Feature requests / Re: listview and add item
25 February 2019, 07:59:00
Ok Texus. I respect that you want to keep the different namethology than windows.

So, "updateItem" and "updateSubItem" are good with me. And there are plenty of use cases that need both of these functions.

Also i know many cases that you could add more than 100 items. Sometimes, there is a need to load more than 1000 items. Look at "Mp3tag", Virtual Dj" or similar programs. Recently i used "Mp3tag" where i had to load some music folders with more than 10000 mp3 files altogether. And that's the reason for a "addMultipleItems" function.

I didn't check if you have a right click on a item-row! Have you?



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


#78
Help requests / Re: List view
15 February 2019, 08:25:14
"Now we are talking"
"Awesome"

a big thanks
#79
Help requests / Re: List view
01 February 2019, 16:57:10
Check this gridlines variable
#80
Help requests / Re: List view
01 February 2019, 09:50:25
Vertical border lines view in windows dot net are optional. They are appearing (if not visible) when a user try to change width of columns.
However the distinguish vertical linew between columns are always visible on header bar even on the right of last bar. The user can change only in header bar the widths of columns.

ideas
a. Vertical lines (not in header) can take a boolean for visibility. (set/getColumnBordersVisible(bool onOff) )
b. Last column vertical right line (not in header) can take a boolean for visibility. (set/getLastColumnBorderVisible(bool onOff) )
#81
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


#82
Check some "dot net" windows forms. When you create a form with a size, created form is always less than the requested size. We are talking about normal windows. So the title bar and borders are inside the calculated size of window.

I removed "setKeepInParent" function and replaced it with "setPositionLocked" and that works for me since my actual size of new window is always same size of parent window.

What happening when "setKeepInParent" is declared and the form size is bigger than parent size?

Talking for myself, there is no need to change something with title bar height and window size. If your main thinking was to add the title bar size to form size is still ok with me now that i am aware of it.


#83
Borders and title bar should be inside the windows size. You should not add the title bar size and the borders size to window size. If i want a 800x600 window then 800x600 should be. May be you can consider title bar and borders as two additional widgets. Just a thought. Give me some time to get to sleep. I come back tomorrow. I 'll dig up what happening with microsoft windows style and we can talk about it.
#84
 If window is 800 and child window is 802 pixels then border sizes should be removed from the actual child window size.
#85
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");
});

#86
Yes may be is that. I found the issue with 8.2. Then i download from "github" (8.3) that obviously this issue was fixed.
#87

QuoteThe OpacityDisabled property has been added to the version on github: https://github.com/texus/TGUI

Thanks Texus. That was really quick.

QuoteCould you show some code for this? I can't reproduce it.

I made a tiny example but i can't reproduce either. I will investigate and i 'll come back.
#88
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

#89
Feature requests / Re: Checkbox future improvments
30 December 2018, 13:14:27
Didn't know or think both of them. Thank you Texus.
#90
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

#91
Feature requests / Re: Clickable textbox
23 December 2018, 11:33:45
QuoteI'm not sure whether I should go for a simplified port of the windows ListView control (with only supporting the "report view" at first) or whether I should just create a MultiColumnListBox class though
Can not say. But the report view is the most wanted. Also keep in mind that dot net list box has a BeginUpdate() method, that prevents the control from drawing until the EndUpdate() method is called. In this way when you can add items in listview very rapidly.

https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.listview.beginupdate?view=netframework-4.7.2
#92
Feature requests / Re: Clickable textbox
22 December 2018, 15:56:32
Ok then. I am happy that at the end everybody understood. In future, i 'll keep in mind to add screen-shots.

The best option for label's scrollbar, if it should be enable or disable is to add an 'enum' Scrollbar State = {enabled, disabled, auto} along with a 'setter' and a 'getter' functions but maybe that requires a lot of work. In this way you can catch all future requests.
By default, it should be disabled and if someone uses long text then he should enable scrollbar at the beginning.

While having this conversation i always hesitated to ask you to go for the multi-column list box. Is a 'must' widget. And after the 'treeview' widget you added, there are no more big work to be done. And i really need it because i wand to rewrite an olf dj-music program i made (dot net, 10 years ago)
And after that, i will have no excuse of using the latest version of 'tgui'.

#93
Feature requests / Re: Clickable textbox
21 December 2018, 06:45:10
Great news. A plus for me to use the newer version. In fact, i am planning to go for it, as soon as the visual studio 2019 for community pop up. I am stuck with 2015 for so long...

The thing that made me want this click callback is that i wanted a full screen text-info-help widget. And the only way to close this info-screen is to click on it when you finish reading. Kiosk machines normally can have a few physical buttons but sometimes there are no buttons. The other devices you can see on those machines are note and coin acceptors, money hopper, pos printer, card reader, scanner and camera.

Click on scroll bars has nothing to do with what i want. The area on scroll bar is to scroll the text. In my case i want a click on label's clean area.
Or, we can have both callbacks, one for scrollbar and one for text area. But, i can not think where it can be useful in the case of scrollbar.

And yes the example with dialog you mention, is pretty much like my case.




#94
Feature requests / Re: Clickable textbox
20 December 2018, 20:07:22
Yes, i agree with you, if you must go with "label" and "scrollbars" then go (for 0.8). In my case, i would never used "textbox" in first place if i had a "label" with "scrollbars". I never wanted to write something (aka textbox). Yes, forget everything about i said for the textbox.

But on the other hand the label must have a click event (has it?). In future, maybe me or someone else will face the same experience when he would try to catch a click on a label. In my mind, focus events does not "connect" with click events. And in the physical point of view, we have a touch/click event. The focus event is an after-effect. Yes, i understood that it happening before the actual click event. And on the other hand, in my mind, when i make visible a widget (or adding it, into the container) it tells me that gain instantly focus as long is the top most widget, but obviously not.

As i said, right now you don't have to do something. I have already implemented what i wanted.

I am sure that this kind of discussing make things better.



#95
Feature requests / Re: Clickable textbox
20 December 2018, 17:25:56
I am working with touch monitors (like ELO https://www.elotouch.com/ ) since 2000.

I do not think that i can miss a press event. If i miss a press event then something is not working correct. After all, a press event is a pre-event than focus event, so i am a bit faster. LOL

Right now the help screen closes without any problem by touching/clicking on any point in "editbox".

There is no need to implement something in 0.7.5 right now. However in the 0.8, i think that adding some features in widgets, like disabling select text without disabling the whole "textbox" widget or adding some extra callbacks is a plus, in this 'almost' (lol) perfect library.

After you added the "treeview" widget, i have one more motivation to start using the newer version.

thank you Texus
#96
Feature requests / Re: Clickable textbox
20 December 2018, 16:19:47
Done with sf::Events

if (event.type == sf::Event::MouseButtonPressed

For the record, touch screen in kiosks just behave as mouses. The default settings have mouse emulation, that normal is left click down and up. However you can change that
with right click down and up.
#97
Feature requests / Re: Clickable textbox
20 December 2018, 07:52:42
1. I forced to use textbox exactly because it has scrollbars. Sometimes text is more than a page.
2. Imagine you have a textbox filling the whole area. When this textbox appears it is easier for the user, and even more easier when this app running in kiosk machines
with touchscreen monitors, to touch (left click simulation) somewhere inside this textbox when he/she wants to close this form with the textbox.
The text usually contains help info.

Basically, the first one it is not such a problem.

I managed partially do that overriding "global mouse enter" but then it is completely useless in normal pc machines.

#98
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
#99
Ok Texus thats great.
Talking about performance, have u made any performance test between 0.7 and 0.8 versions?
#100
Ok,  i downloaded 0.8 and saw that buttons now using text. Just to clarify, lines in labels in 0.8 version keep center align accordingly to each line chars?

For example is it like this?
       Line 1
     My line 2
Ok this is line 3

There are a lot of cases when translating a text from one language to another, texts can be much bigger. Setting auto the size can do the trick but the text can be
not-readable. In my case this is happening in button text very often.