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

Messages - Law

#1
Help requests / Re: Questions
22 August 2014, 14:26:07
I look forward to v0.7 then.

Quote from: texus on 22 August 2014, 14:23:07
The double click will only work in list boxes. But since ListBox A is still a list box this is no problem.
You can use grids for the others, just put Label widgets in them to contain the text.
I'll just have to find another way to delete Items in Grid B, C and D then Q_Q
#2
Help requests / Re: Questions
22 August 2014, 14:14:56
Something I just encountered, I don't know if that is easy for you to fix, but the text wrapper of TextBoxes cuts words in half.

Also, that just crossed my mind: ListBox B, C and D I mentionned earlier will actually be Grids. Each line will countain the name of the Item I double clicked, but also the number of times I double clicked it, on its left. For example

2 Item_2345
1 Item_697
3 Item_5409

etc. I don't know if you could do that with Grids too.
#3
Help requests / Re: Questions
22 August 2014, 13:14:31
1. I see thanks.
2. Okay never mind.
3. Well I was planning to make 4 ListBoxes (A, B, C and D), and given other options, double clicking an Item of ListBox A would add that Item to ListBox B, C or D. Also, I was thinking of deleting the Item if you double click it in ListBox B, C and D.
#4
Help requests / Re: Questions
22 August 2014, 12:51:02
Hi, new questions coming ^^

1. I couldn't manage to change the size of text in a ListBox. So I tried to change the Global Font Size, but I couldn't find that either. Is there a simple way to do it ?

2. Also, is it not possible to give each item of a ListBox a specific color ? Like, Item0 is orange, Item1 is green, etc.

3. The Double Left Click event is not yet implemented, correct ?
#5
Help requests / Re: Questions
16 August 2014, 23:02:25
Well I think columns should have fixed sizes. If not, whenever a new row has a text longer than the other rows, the column will suddenly become longer, causing all the buttons to suddenly move. I think it could be better if there was a way to set the sizes of columns for good.
#6
Help requests / Re: Questions
16 August 2014, 21:10:34
Maybe I still like #3 a bit more.

So I've started to play with Grids! Here is a code inspired from what you wrote the other day:

tgui::Grid::Ptr database(gui);
database->setSize(390, 600);
database->setPosition(405, 25);

tgui::Label::Ptr label(*database);
label->setText("aaaaaaaaaaaaaaa");
   
tgui::Picture::Ptr first(*database);
first->load("1.png");
   
tgui::Picture::Ptr second(*database);
second->load("2.png");

tgui::Picture::Ptr third(*database);
third->load("3.png");
   
database->addWidget(label, 0, 0);
database->addWidget(first, 0, 1);
database->addWidget(second, 0, 2);
database->addWidget(third, 0, 3);
database->updateWidgets();


And I see how to add things to the Grid now. But

- How do you do to make column #2 (or the other ones) start at X pixel and end at Y pixel ?
- How do you do to make the grid actually look like a grid, that is: draw a few lines (maybe not the horizontal ones but the vertical ones can be considered) and make a scrollbar appear, should the list get too long ?
#7
Help requests / Re: Questions
16 August 2014, 19:54:15
Quote from: texus on 16 August 2014, 19:45:48
- Just ignore any clicks on the combo box
- Still flip the arrow but don't show a list
- Show an empty list with the size of a single item
I'm honestly fine with all three of them. I had #3 in mind earlier but #1 and #2 are nice as well.
#8
Help requests / Re: Questions
16 August 2014, 19:23:27
Okay then I switched back to the original. Good to hear about the combobox :)
#9
Help requests / Re: Questions
16 August 2014, 19:05:16
Quote from: texus on 16 August 2014, 18:39:10Talking about combo boxes, I have been making the changes that you suggested. The list now disappears when the mouse is released again, and the item below the mouse is highlighted (if it is not already selected).
So I reinstalled TGUI like you made me do last time, and this is what I get when I compile now:

error while loading shared libraries: libtgui.so.0.6.5: cannot open shared object file: No such file or directory
#10
Help requests / Re: Questions
16 August 2014, 18:10:31
It worked thanks!

No questions here, just something I noticed. If you've already been told, just ignore the following.

When you set the size of your checkbox, editbox, etc, it usually never gives them the exact size you provided. It's always one or two pixels close, though. I think it would be great if you could some day fix all the classes that share this bug with setSize, because some people (like meee) like very much designing things pixel-wise. Like, 5 pixels between two checkboxes and nothing more, nothing less. (I think I remember that the SFML has this exactness, which really delighted me when I first tried it, compared to other libraries)

Of course once you fix that, the thing I made will be a mess and I will have to change things again :P But I think that's for the best.

Also, when you have a combobox depending on another one, and you change the selected item of the first one so that there is no items available for the second one, though the second one doesn't display any items indeed, the length of the "panel" sometimes keeps the length it had with the previous items, instead of going back to minimal length.

I might have noticed another few things, but I forgot. Thanks :)
#11
Help requests / Re: Questions
15 August 2014, 20:56:55
Quote from: texus on 15 August 2014, 20:22:05
All callbacks will have the same callbackId, you cannot use more than one id.
The id is just needed to differentiate between the widgets, you also have callback.trigger which contains whether it was a LeftMouseReleased or LeftMousePressed. But in most cases you don't even need the id since you just call a specific function when something happens to that widget. And the function isn't called from anywhere else.
Unfocused doesn't seem to work well with Combobox. I have two comboboxes, the items of one depending of the selected item of the other. I coded that when Combobox #1 is unfocused, the items of Combobox #2 change according to the selected item of Combobox #1. But unfortunately, I have to select the same item of Combobox #1 twice to get Combobox #2 to display its appropriate items. Would you have a workaround to suggest?
#12
Help requests / Re: Questions
15 August 2014, 20:12:42
Okay thanks again.

I'm currently trying callbacks and it is my understanding that you only use the duo bindCallback + setCallbackId when you only have 1 callback to put on the widget. You can't put two different callbacks (like, LeftMouseReleased and )LeftMousePressed) this way, correct ? (Because that doesn't work for me)

Also, just for your future versions, you might want the comboboxes' content to disappear on LeftMouseReleased rather than LeftMousePressed. Also it could be nice to highlight the item you are currently hovering. :)
#13
Help requests / Re: Questions
15 August 2014, 18:58:44
Okay thanks!

I was also wondering how many different events tgui knows, beyond tgui::button::LeftMouseClicked. For example, what is the appropriate event when the user clicks outside of the widget he was using ?

Also how can we write in italics or bold in comboboxes, listboxes, etc?
#14
Help requests / Re: Questions
15 August 2014, 12:12:28
Also I was wondering.

    NormalImage_L  = "Black.png" (  0,  25,  50, 50)
    NormalImage_M  = "Black.png" ( 50,  25, 100, 50)
    NormalImage_R  = "Black.png" (150,  25,  50, 50)
    HoverImage_L   = "Black.png" (  0,  75,  50, 50)
    HoverImage_M   = "Black.png" ( 50,  75, 100, 50)
    HoverImage_R   = "Black.png" (150,  75,  50, 50)
    DownImage_L    = "Black.png" (  0, 125,  50, 50)
    DownImage_M    = "Black.png" ( 50, 125, 100, 50)
    DownImage_R    = "Black.png" (150, 125,  50, 50)


What do L, M and R stand for?
#15
Help requests / Re: Questions
15 August 2014, 12:09:12
Okay, anyway I was only asking you that for a minor thing, I can wait. Don't feel urged to fix that right now. I have lots of other things to do anyway.