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

#1
Help requests / Re: EditBox not editable
25 April 2023, 12:54:12
Okay thanks  :)
#2
Help requests / Re: EditBox not editable
25 April 2023, 12:50:27
Okay I read some more code of the container class. I have some custom Widgets between the root container and the editbox. So I probably have to passthrough enterText or something.
#3
Help requests / Re: EditBox not editable
25 April 2023, 12:40:03
Hmmm I use gui.mainLoop and checked that method.
Shouldn't that pass SDL_EVENT_TEXT_INPUT to gui.handleEvent?
#4
Help requests / Re: EditBox not editable
24 April 2023, 18:47:44
Okay, that must be it. Thanks  :D
#5
Help requests / EditBox not editable
24 April 2023, 18:29:40
Hey,

I added an EditBox to a Panel. If I click it, it highlights and the cursor blinks, but I cannot enter any text.

Any idea what might be the problem?
#6
General Discussion / Re: Signals Memory
20 April 2023, 14:18:46
Thank you for this great answer. That helped me alot to understand the behaviour.  :D
#7
General Discussion / Signals Memory
20 April 2023, 13:47:23
Hey texus,

I'm wondering if you need to disconnect a signal in order to don't leak memory?
If I create a Signal using a lambda. Will it be freed at any time?

Regards
#8
General Discussion / Localization
06 April 2023, 12:36:07
Hey,

I'm wondering what are you using to localize for different languages?
Any suggestions that are compatible with commercial usage?

Regards
#9
Help requests / Re: SVG scaling
06 April 2023, 10:01:26
Works - thank you very much!  :)
#10
Help requests / Re: SVG scaling
05 April 2023, 13:54:49
Hey texus,

thanks for your quick answer.  :)

Yes indeed I call setRelaticeView using data from SDL in my code:

    SDL_GetWindowSize(window, &windowSizeScreenCoords.x, &windowSizeScreenCoords.y);
    SDL_GetWindowSizeInPixels(window, &windowSizePixels.x, &windowSizePixels.y);
    float dpiScale = static_cast<float>(windowSizePixels.y) / static_cast<float>(windowSizeScreenCoords.y);
    gui.setRelativeView({0, 0, 1.0f / dpiScale, 1.0f / dpiScale});
#11
Help requests / [Solved] SVG scaling
05 April 2023, 11:19:20
Hey texus,

I'm wondering what is happening with SVG images in textures.

The following code produces a very blurry image:
auto testTexture = tgui::Texture(resourcePath + "/images/test.svg");
auto testPic = tgui::Picture::create(testTexture);
testPic->setOrigin({0.5f, 0.5f});
testPic->setPosition("50%", "50%");
testPic->setScale(5);

If I scale the image using setSize() it is far less blurry but still not sharp.

2 Questions:
  • Is the image rasterized again if the size is changed?
  • Is High DPI considered for rasterization?
#12
Help requests / Re: hideWithEffect not working
30 March 2023, 14:40:43
I found the problem. My panel was drawn inside a custom widget. I had to passthrough updateTime. Now it works.  :)
#13
Help requests / Re: hideWithEffect not working
30 March 2023, 12:06:20
I also added:
panel()->onShowEffectFinish([=](tgui::ShowEffectType effect, bool visible) {
    std::cout << "animation finished" << std::endl;
});

If I call hideWithEffect twice (with some delay between) "animation finished" just shows up once and there is no animation shown.
After second call the panel widget isn't shown anymore but vanished without an animation.
#14
Hey,

I try to use hideWithEffect and it is not working. After calling the function
panel->hideWithEffect(tgui::ShowEffectType::SlideToLeft, std::chrono::milliseconds(500));the Widget is still visible and not moving at all.

Are there any requirements for the function to work?
#15
Help requests / Re: Picture with SVG
14 March 2023, 08:32:15
Thanks - that works  :)
#16
Help requests / Re: Picture with SVG
13 March 2023, 11:54:23
My SVG isn't working because I use a gradient. I updated the nanosvg dependency in tgui. After that my SVG works. Maybe you could update nanosvg in tgui to the latest version?
#17
Help requests / Re: Picture with SVG
11 March 2023, 11:57:11
Okay your provided svg works. Must be something with my svg then.
#18
Help requests / [Solved] Picture with SVG
10 March 2023, 18:04:03
Hey,

I have some trouble getting the Picture Widget to work with SVG. I tried a PNG. That works, but if I use SVG it won't show.
Any idea what might be the problem?
#19
Help requests / Re: Sprite from SVG
08 March 2023, 08:32:16
Okay that works - thanks alot  :D
#20
Help requests / [Solved] Sprite from SVG
07 March 2023, 21:38:17
Hey,

I want to draw a SVG in a Widget. I found that I can render a SVG to BackendTexture using SvgImage class.
An Sprite can only be created using a Texture, but I can't find a way to transform a BackendTexture to a Texture. Is there a way to convert the BackendTexture to a Sprite? Or can I directly draw the BackendTexture?

Thanks!
#21
Thanks for your suggestion.
Copying the code seems to be the cleanest and easiest way indeed.
#22
I want to create a Widget that is very similar to the current Tabs class.
Perhaps just adding an Icon to every Tab and adjust the text position.

Any recommendations? Is it possible to create a subclass of the Tabs widget and use the subclass within the current TabContainer widget?

I read the current implementation of the Tabs widget and there is a Tab struct that is private. So I cannot add an image there easily.