Welcome, Guest. Please login or register. Did you miss your activation email?

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

Pages: 1 ... 5 6 [7] 8 9 ... 34
91
General / Re: Crash on android due to font destruction
« on: February 09, 2016, 06:53:35 pm »
I looked at the commit and I have found the issue myself. The new m_stroker variable is not copied in the copy constructor.
Should I send a pull request to copy it (and perhaps also set it to NULL in the constructor)? After these changes it no longer crashes.

92
General / Crash on android due to font destruction
« on: February 09, 2016, 06:41:22 pm »
The following code crashes on android with the latest SFML version. The bug was introduced in this commit, earlier sfml versions don't crash on this code.
#include <SFML/Graphics.hpp>
#include <memory>

int main()
{
    std::shared_ptr<sf::Font> font3;

    sf::Font font1;
    font1.loadFromFile("sansation.ttf");

    font3 = std::make_shared<sf::Font>(font1);

    sf::Font font2;
    font2.loadFromFile("sansation.ttf");

    font3 = std::make_shared<sf::Font>(font2);
}

The backtrace that is printed in logcat:
Code: [Select]
02-09 18:10:35.218   949   949 F DEBUG   : backtrace:
02-09 18:10:35.218   949   949 F DEBUG   :     #00 pc 00058eef  /data/app/com.example.tgui-1/lib/x86/libsfml-graphics.so (FT_Stroker_Done+31)
02-09 18:10:35.218   949   949 F DEBUG   :     #01 pc 00019ea6  /data/app/com.example.tgui-1/lib/x86/libsfml-graphics.so (sf::Font::cleanup()+310)
02-09 18:10:35.218   949   949 F DEBUG   :     #02 pc 0001b91e  /data/app/com.example.tgui-1/lib/x86/libsfml-graphics.so (sf::Font::~Font()+30)
02-09 18:10:35.218   949   949 F DEBUG   :     #03 pc 00002dee  /data/app/com.example.tgui-1/lib/x86/libtgui-example.so (std::__1::__shared_ptr_emplace<sf::Font, std::__1::allocator<sf::Font> >::__on_zero_shared()+30)
02-09 18:10:35.218   949   949 F DEBUG   :     #04 pc 00089315  /data/app/com.example.tgui-1/lib/x86/libc++_shared.so (std::__1::__shared_weak_count::__release_shared()+53)
02-09 18:10:35.218   949   949 F DEBUG   :     #05 pc 00002b26  /data/app/com.example.tgui-1/lib/x86/libtgui-example.so (main+422)
02-09 18:10:35.218   949   949 F DEBUG   :     #06 pc 00002c98  /data/app/com.example.tgui-1/lib/x86/libtgui-example.so (sf::priv::main(sf::priv::ActivityStates*)+152)
02-09 18:10:35.218   949   949 F DEBUG   :     #07 pc 00002fd0  /data/app/com.example.tgui-1/lib/x86/libtgui-example.so (sf::priv::ThreadFunctorWithArg<void* (*)(sf::priv::ActivityStates*), sf::priv::ActivityStates*>::run()+16)
02-09 18:10:35.218   949   949 F DEBUG   :     #08 pc 0000e392  /data/app/com.example.tgui-1/lib/x86/libsfml-system.so (sf::Thread::run()+18)
02-09 18:10:35.218   949   949 F DEBUG   :     #09 pc 0000f54b  /data/app/com.example.tgui-1/lib/x86/libsfml-system.so
02-09 18:10:35.218   949   949 F DEBUG   :     #10 pc 00080a93  /system/lib/libc.so (__pthread_start(void*)+56)
02-09 18:10:35.218   949   949 F DEBUG   :     #11 pc 00021952  /system/lib/libc.so (__start_thread+25)
02-09 18:10:35.218   949   949 F DEBUG   :     #12 pc 000170b6  /system/lib/libc.so (__bionic_clone+70)

93
General / Re: Debugging SFML android app
« on: February 06, 2016, 08:12:49 pm »
If you have the latest TGUI version you can try removing the setFont call and see what happens as there is a built-in font.

If there are no widgets in the gui yet then the setFont just copies the font, otherwise it can trigger recalculations in all previous widgets so the segfault can occur on a lot of places. Maybe you can try running a tool like valgrind on your os x to make sure that it a problem specific to android and not something that accidentally works on os x. Or if you can send some minimal code that reproduces it then I can try it here.

94
SFML projects / Re: TGUI: GUI library for SFML
« on: September 22, 2015, 06:14:53 am »
You should just check the tutorials to figure out how to get started.
- Introduction to signals
- Unbound optional parameters in signals (limited compiler support)
- connectEx function (alternative to optional parameters)

95
SFML projects / Re: TGUI: GUI library for SFML
« on: September 21, 2015, 06:22:06 pm »
If they are loaded from a theme file, yes.

The following two lines from v0.6:
tgui::Button::Ptr button(gui);
button->load("TGUI/widgets/Black.conf");

have basically been replaced with this in v0.7:
tgui::Button::Ptr button = theme->load("button");
gui.add(button);

Basically the same amount of code, but things get executed in a different order.

But some widgets don't have a theme (like Picture and Panel) and are loaded like below. Any widget can actually be loaded like this in which case it will just use the build-in White theme.
tgui::Xyz::Ptr widget = std::make_shared<tgui::Xyz>(/* optional parameters e.g. filename for Picture */);
gui.add(widget);

96
SFML projects / Re: TGUI: GUI library for SFML
« on: September 21, 2015, 02:41:46 pm »
TGUI 0.7-alpha2 has been released

Tool Tip
A tool tips can now be any widget and is no longer limited to a simple text. Check the tool tip tutorial for more info.


Show/Hide animations
You can use showWithEffect or hideWithEffect to make widgets appear or dissapear by fading or by sliding from the sides.


New theme
A TransparentGrey theme was added, I don't have any screenshots of it though. All widgets are semi-transparent in this theme and only use colors (no images).

Other changes
- The HorizontalLayout and VerticalLayout classes were fixed so you can now use them to stack your widgets next to each other or below each other.

- A setOpacity function was added which allows giving any widget a certain transparency (without the limitations of the old setTransparency function).

- Text auto-sizing was improved


There will be no more releases for some time, don't expect the beta release before July/August next year. An alpha3 version will only be released if important bugs are found before then.

97
SFML projects / Re: TGUI: GUI library for SFML
« on: September 18, 2015, 06:10:23 pm »
I'll add a setTexture function to the Picture class in 0.7-alpha2 which should be released this weekend.

98
SFML projects / Re: TGUI: GUI library for SFML
« on: September 10, 2015, 01:05:17 am »
Quote
The only thing missing in my opinion are "layer/panel transition" effects like fadeIn fadeOut, swingIn/Out etc. They are not hard to implement as a user of the libary, nevertheless it would be a cool feature built into the library
Animations on show or hide have now been added to


How to use it:
button->showWithEffect(tgui::ShowAnimationType::Fade, sf::milliseconds(500));

I'm planning on redesigning the animation class and moving it to the public interface in the future so that you can e.g. move a widget from one spot to another, but for now the animation class can only be accessed indirectly with the showWithEffect and hideWithEffect functions.

99
SFML projects / Re: TGUI: GUI library for SFML
« on: September 07, 2015, 03:04:12 pm »
I wouldn't really expect things like fading to be part of a gui library. But it seems to exist in wxWidgets.
I guess I could add showWithEffect and hideWithEffect to widgets (or even just add some optional parameters for the already existing show and hide functions), I'll look into it for the beta release or perhaps even already for alpha2.

100
SFML projects / TGUI: GUI library for SFML
« on: September 01, 2015, 02:47:25 am »
TGUI: Texus' Graphical User Interface

Easy to use
TGUI aims to be easy to use, with only a few lines you have a fully functioning TextBox on your screen.
tgui::TextBox::Ptr textbox = tgui::TextBox::create();
textbox->setPosition(100, 50);
textbox->setSize(300, 200);
textbox->setTextSize(16);
gui.add(textbox);


Customizable
The widgets can be created by just using colors or by using images, making the look very customizable.
When widgets are created without a theme then they will use the build-in white theme (top left image). TGUI also ships with ready to use Black and BabyBlue themes (top right and bottom right images).


(click images for larger version)


Cross-platform
TGUI tries to support the same operating systems as SFML, so it supports Windows, Linux, Mac OS X and FreeBSD and provides experimental support for Raspberry Pi, Android and iOS.


Installation tutorials are available for each of these systems.


Gui Builder
A Gui Builder is included to allow easily creating and editing forms.



Relative sizes and positions
Next to passing absolute values, you can specify positions and sizes relative to the parent.
checkbox->setPosition("30%", "20%");
editBox->setSize(400, "5%");

The widget position and size will automatically update when its parent resizes.




More information
For more information about the project, check the website which has tutorials, documentation and a few example codes. Source code can be found on GitHub.

If you have problems with getting tgui to work or if you find bugs then please open a topic on the TGUI forum.


Some images
 

 


101
Window / Re: SFML Bad Window on Raspberry PI with CMake
« on: August 25, 2015, 12:40:25 am »
Try putting the bitsPerPixels of the VideoMode on 16.
I just tried and I could run the pong example with sf::VideoMode::getDesktopMode() so I checked the bps on that and it returned 16. Creating a window with sf::VideoMode(800, 600, 16) seems to work fine.

102
SFML projects / Re: Non-rectangular semi-transparent window
« on: June 07, 2015, 11:51:32 pm »
I got it working. Instead of overriding the function of SFOpenGLView like that (for which the declaration isn't public), I could just override the one in NSOpenGLView. Thanks for the advice.

103
SFML projects / Re: Non-rectangular semi-transparent window
« on: June 07, 2015, 11:32:35 pm »
No, it just gives me the error that no interface declaration can be found for 'SFOpenGLView'.

104
SFML projects / Re: Non-rectangular semi-transparent window
« on: June 07, 2015, 10:51:43 pm »
I found some time already to add support for Mac OS X. Check github for the updated code.

There is one problem though. In order to make the non-rectangular window work I also had to make a change inside SFML. I had to add the following function in the SFOpenGLView class:
-(BOOL)isOpaque {
    return NO;
}

Without that change the window can only be semi-transparent and will not get the custom shape on mac.

105
SFML projects / Re: Non-rectangular semi-transparent window
« on: June 07, 2015, 12:30:00 pm »
Good idea. While developing I needed them together on linux while I was trying various methods to get it working, but in this finished version they have indeed became independent.

Pages: 1 ... 5 6 [7] 8 9 ... 34