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.
#16
Help requests / Re: Questions
15 August 2014, 11:56:16
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2

Here it is.
#17
Help requests / Re: Questions
15 August 2014, 11:52:20
Scanning dependencies of target tgui
[  2%] [  5%] [  8%] [ 11%] Building CXX object src/TGUI/CMakeFiles/tgui.dir/Gui.cpp.o
Building CXX object src/TGUI/CMakeFiles/tgui.dir/EditBox.cpp.o
Building CXX object src/TGUI/CMakeFiles/tgui.dir/Container.cpp.o
Building CXX object src/TGUI/CMakeFiles/tgui.dir/Layout.cpp.o
/home/lol/texus-tgui-devel-af81ec0bcefb/src/TGUI/Layout.cpp: In constructor 'tgui::LayoutGroup::LayoutGroup(tgui::Layout1d&, const tgui::Layout1d&, tgui::LayoutGroup::Selector)':
/home/lol/texus-tgui-devel-af81ec0bcefb/src/TGUI/Layout.cpp:276:28: error: invalid initialization of non-const reference of type 'tgui::Layout1d&' from an rvalue of type '<brace-enclosed initializer list>'
         m_selector{selector}
                            ^
/home/lol/texus-tgui-devel-af81ec0bcefb/src/TGUI/Layout.cpp: In constructor 'tgui::LayoutGroup::LayoutGroup(tgui::LayoutGroup&&)':
/home/lol/texus-tgui-devel-af81ec0bcefb/src/TGUI/Layout.cpp:286:36: error: invalid initialization of non-const reference of type 'tgui::Layout1d&' from an rvalue of type '<brace-enclosed initializer list>'
         m_selector{group.m_selector}
                                    ^
make[2]: *** [src/TGUI/CMakeFiles/tgui.dir/Layout.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/TGUI/CMakeFiles/tgui.dir/all] Error 2
make: *** [all] Error 2


Didn't you make me install the latest SFML ?
#18
Help requests / Re: Questions
15 August 2014, 00:43:39
Sorry I don't. But I don't mind copy/pasting.

Thanks a lot :)
#19
Help requests / Re: Questions
15 August 2014, 00:28:29
I think it might be best using the code you prepared for v0.7 then, because this way I won't have to change anything when upgrading. Tell me what to add where please. :)
#20
Help requests / Re: Questions
14 August 2014, 23:55:43
Alright I see.

Quick question, I couldn't find that piece of information. When you display an EditBox, it is easy to put an automatic text in it (like "Enter your username"). But I would like this text to disappear as soon as I click inside the EditBox. Also, I would like this text to be in italic grey, so that one could easily notice that it's only an automatic text. Is there any easy way to do this?
#21
Help requests / Re: Questions
14 August 2014, 21:46:35
Well unless it will take you several months to finish your latest version, I think I can wait a bit. I have other things to code anyway (like... the database) I'd rather wait and use a stable version than take the current one as it is and experience problems.

As for the cards, they are all sf::Sprite.

Thanks a lot for your help.
#22
Help requests / Re: Questions
14 August 2014, 19:57:52
Hello texus,

Well I sort of plan to make a (free) software whose goal is to play cards. Usually, when you play a card game on the Internet, you hover over the card and a list of options appears nearby (flip, move, etc.). I want to offer a lot of options, but as a result the list would be much longer than the card! So I fancy buttons with pictures on the card instead of a list nearby, each button having an explicit picture for what they do.

In game, I could sometimes need up to 20 different buttons that would display on one single card. Ideally , they would appear progressively on the card when you hover over it (From 100% transparent to 0% transparent, though I want this to be fast, so something like 100% -> 0% in 4-5 frames). Ideally still, these buttons would move along with the card when it is moving slowly or moving close to the initial location.

Now, I am bothering you with lists with buttons at every line because the game would need different card piles. I plan to pop up a window when you click on a card pile, and in that window, the names of all the cards located in that pile appear in a list, along with the option buttons. Ideally, under the list would also be a text box, and for whatever string you type in it, the list of cards is shortened to the cards that each have that string in their name.

Unfortunately, depending on the card, some buttons might not be displayed (be it in game or in the list). (For example, there is no need to offer the option "move to pile 5" if the card already is in pile 5.) Also, depending on the card, some buttons may share the same location, but are never displayed at the same time (like, the third button is ButtonA for all cards of type A, but is ButtonB for all cards of type B)

On top of that, I would very much like all buttons to have their own hover and down image, yes.  :D

Sooooo, as you can see, there is a lot of work for me!  :'( So thanks a lot for your input, I'm going to use what you wrote now and see if I can code something remotely close to my goal with that. I know this will take me weeks (months?) anyway. I will try to handle all the different buttons by using the same code you wrote in Black.conf.

Thanks for reading :)
#23
Help requests / Re: Questions
11 August 2014, 19:59:48
Hello, is there a simple way to create a square button (I can't do it with Black.conf, it is only rectangular, and I'm not sure I understand the lines inside Black.conf) with a different image?

My goal is to create a listbox where each line contains
- a text
- next to the text, a dozen buttons with no text on them, instead they each have their own image so that the user can easily guess what each button actually does.

Is this doable? Sorry to be such a pain :-[
#24
Help requests / Re: Questions
10 August 2014, 18:32:45
Everything compiles perfectly now, thanks :)
#25
Help requests / Re: Questions
10 August 2014, 18:15:12
Thanks for Black.conf.

As for grid, I tried the examples but I couldn't make it work. You did not seem to bother declaring a grid in your tutorials (or maybe I didn't search too well?), and the line

tgui::EditBox::Ptr edittBox(*grid);

gets an error on my computer. :(