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

#1
Actually, you are right!

I created smaller buttons inside GUI-builder and it looked smooth in my window. When I created larger buttons, I started to see the non-smooth texture again.
So, yes, GUI-Builder is nothing different than creating the buttons manually in terms of texture smoothness.

As a reference, the buttons size used in the screenshots I attached were 256x64 on a window 800x600
#2
Hi texus, thanks for your reply!
Adding smooth after texture in theme file did solve my issue.

One thing I noticed is that when I am creating these buttons manually, for example:

_theme.load("TGUI/themes/BabyBlue.txt");
tgui::Theme::setDefault(&_theme);

auto cmdBtn1 = tgui::Button::create("Button1");
cmdBtn1->setPosition({ "(&.width - width) / 2", 100});
cmdBtn1->connect("pressed", [this] () -> void {
_states->push(std::make_unique<GameState>(_window));
});
cmdBtn1->setSize(buttonWidth, buttonHeight);
_gui.add(cmdBtn1, "cmdButton1");

It doesn't have smooth texture(i.e. I have to manually edit theme files).

When I use the GUI-Builder and use the form.txt file to load widgets (i.e. _gui.loadWidgetsFromFile("..."); ) all textures are smooth.

Thanks again!
#3
Help requests / Antialiasing problem with buttons
10 October 2019, 16:36:35
Hello, I have an issue where my buttons look ugly and not smooth. I am using SFML RenderWindow with antialiasing level set to 8. Do I have to configure anything else to have smooth buttons?
I have circle shapes in my window and they are perfectly smooth.

Here are the screenshots where I used themes included within TGUI folder (BabyBlue.txt and Black.txt) :