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.


Messages - r4gTime

Pages: [1] 2
1
Hey Texus,

I guess you meant :
mouseDownEvent.type = sf::Event::MouseButtonPressed;

thanks you very much for your help, it works like a charm.(except I can't use this wonderful 0-9 function and had to get another way to know if my cursor was on the widget ;) )

2
Hello,

I'm trying to code something where you can drag an object and drop it on a listbox, and it does something depending on the item index where the object is dropped.

Problem is, the signal ListBox::MouseReleased doesn't work if the start of your click is not in the list box.

I thought maybe it needed to be focused, so I made a MouseEntered signal for the list box and bound  it to focusing this listbox, but it's still doesn't work.

If anyone has an idea, thank you for your help !

3
Help requests / Re: Tool Tip Functionning - 1 Tooltip for X buttons
« on: 25 October 2020, 12:38:20 »
Thank you very much for your reply.

I kinda feel this implementation is a bit tricky, since I'm using gui builder to design my gui, and then load it automatically with a xgui.loadfromfile, I would never guess I should store my tooltips outside xgui, even with debugging.
This would mean I shouldn't put it in the same file as my main gui ?
But maybe I didn't understand some concepts yet.

Thank you again texus :)



4
Help requests / Tool Tip Functionning - 1 Tooltip for X buttons
« on: 23 October 2020, 14:43:04 »
Hello, I'd like to ask you a few questions about tooltips, because my game can't stop crashing since I implemented these.

I have X buttons implemented automatically, and 1 childWindow that I want to appear as a tooltip. But of course for each button I want to update the informations in the childwindow.

So I created a childwindow named "child_game_city_construction_tooltip".

Then I put it as a tooltip in my buttons when I create them :
...
button->setToolTip(xgui.get<tgui::ChildWindow>("child_game_city_construction_tooltip"));
...

But first problem : If I put my childwindow on setVisible(false), the tooltip nevers shows up. If I put it on true, then the childwindow becomes visible outside its "tooltip mission", until I go on a button that uses it.

Then, I want to update its information :
if(signalName == "MouseEntered") {
...
            // MAJ ToolTip
            if(s.find("construct_bati") != std::string::npos) {
                xgui.get<tgui::ChildWindow>("child_game_city_construction_tooltip")->setTitle(game.GetBatiFromType(cb).nom);
            }
        }

This code works the first Time I enter a button. But then when I go on another button, it crashes.

It seems that a widget couldn't work as a tooltip for several buttons, or something like that ?

Thank you very much for your help !

5
Help requests / Re: ChatBox : Line Spacing and selection
« on: 24 May 2020, 19:04:23 »
Thank for your reply !

Another cool feature would be to have a different color for the message itself and the name. (because basically you prefer to have a different color for every chatter but the same for the message itself).

A line could be defined by two elements :
- Pseudo (string, color)
- Message (string, color)
The chatbox could as well set the separation symbol (symbol, color) : it could be " : " , " - " or nothing...

I will try to do that someday when I'd figured out how to create classes from other people's library :)

6
Help requests / ChatBox : Line Spacing and selection
« on: 24 May 2020, 17:01:48 »
Hello, I have 2 questions about chatboxes :

1 - Is there any way to change the line spacing ? With the font I use, the line spacing between 2 lines is 0 and the line spacing between two rows of the same line is huge (see attachments)

2 - Is there any way to select text in the chat box in order to copy / paste ?

(Bonus question) How do you remove chatbox background ? With theme only ?


Thanks !

7
Help requests / Re: Adding widget to group crashes
« on: 21 May 2020, 18:31:27 »
Oh my god I tested the exact same thing you did 10mn ago and... it worked  ;D ;D

I used some dll files from 8.4 or 8.5 version and I didn't realize.

Thank you so much, I'm now ready to create a nice GUI for my game :)

8
Help requests / Re: Adding widget to group crashes
« on: 21 May 2020, 17:51:59 »
Yep I checked again...

F*** I didn't think 1 sec there could be no solution... Your GUI seems perfect for what  I need.

Thank again for your help and if I find something I'll let you know.

9
Help requests / Re: Adding widget to group crashes
« on: 21 May 2020, 17:15:53 »
Hello,

Here is the config and the compiler settings in attachments.

When I type echo %PATH% I get this :

C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\NVIDIA Corporation\NVIDIA NGX;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\Louis\AppData\Local\Microsoft\WindowsApps;

10
Help requests / Re: Adding widget to group crashes
« on: 21 May 2020, 15:01:07 »

11
Help requests / Re: Adding widget to group crashes
« on: 20 May 2020, 17:25:05 »
Hello,

Here it is. Hope you can find something and thank you again for the support :)


12
Help requests / Re: Adding widget to group crashes
« on: 16 May 2020, 20:03:28 »
It would be difficult for me to send all sources, but I tried to duplicate the problem based on your login screen example (https://tgui.eu/examples/0.8/scalable-login-screen/) and I have the same problem, just by modifying this function :

void loadWidgets( tgui::Gui& gui )
{
    auto button1 = tgui::Button::create();
    auto group = tgui::Group::create();

    group->add(button1, "button");

    gui.add(group);
}
 

Segmentation fault :/

13
Help requests / Re: Adding widget to group crashes
« on: 16 May 2020, 19:23:45 »
Yes I'm in debug mode, and here is a picture of my linker settings.


14
Help requests / Re: Adding widget to group crashes
« on: 16 May 2020, 18:58:15 »
I think I linked everything but I only have this in call stack :

#0 ??   ?? () (??:??)
#1 0x410c60     Application::Application(this=0x14268d0) (D:\Documents\Programmation\X22 Colonization\X22_Data.cpp:48)
#2 0x401437     main() (D:\Documents\Programmation\X22 Colonization\main.cpp:36)
 

and logs :
Debugger name and version: GNU gdb (GDB) 7.9.1
Child process PID: 17848
Program received signal SIGSEGV, Segmentation fault.
In ?? () ()
#1  0x00410c60 in Application::Application (this=0x14268d0) at D:\Documents\Programmation\X22 Colonization\X22_Data.cpp:48
D:\Documents\Programmation\X22 Colonization\X22_Data.cpp:48:1667:beg:0x410c60
At D:\Documents\Programmation\X22 Colonization\X22_Data.cpp:48
#1  0x00410c60 in Application::Application (this=0x14268d0) at D:\Documents\Programmation\X22 Colonization\X22_Data.cpp:48
D:\Documents\Programmation\X22 Colonization\X22_Data.cpp:48:1667:beg:0x410c60
Debugger finished with status 0
 

I must have done a mistake somewhere when installing or something ? But  everything's works fine except this damn line, so I don't understand. Thanks for your help anyway, I keep on looking for the problem...

15
Help requests / Re: Adding widget to group crashes
« on: 16 May 2020, 17:41:31 »
Codeblocks 17.12

Pages: [1] 2