0.6.2 label/string letters are being cut again.
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
#include <TGUI/TGUI.hpp>
#include "loginScreen.hpp"
// Here is a small helper for you ! Have a look.
#include "ResourcePath.hpp"
int main(int, char const**)
{
// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
tgui::Gui gui(window);
gui.setGlobalFont("Data/Fonts/DejaVuSans.ttf");
loginScreen(gui);
gui.get("loginScreen")->show();
// Start the game loop
while (window.isOpen())
{
// Process events
sf::Event event;
while (window.pollEvent(event))
{
// Close window : exit
if (event.type == sf::Event::Closed) {
window.close();
}
// Espace pressed : exit
if (event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Escape) {
window.close();
}
gui.handleEvent(event);
}
tgui::Callback callback;
while (gui.pollCallback(callback))
{
// Make sure that callback comes from the button
if (callback.id == 1) // login button
{
}
}
// Clear screen
window.clear();
gui.draw();
// Update the window
window.display();
}
return EXIT_SUCCESS;
}
#ifndef fml_test_loginScreen_hpp
#define fml_test_loginScreen_hpp
void loginScreen( tgui::Gui& gui )
{
tgui::Panel::Ptr loginScreen(gui, "loginScreen");
loginScreen->setSize(800, 600);
// Create the background image
tgui::Picture::Ptr picture(*loginScreen);
picture->load("Data/Backgrounds/loginBackground.tex");
picture->setSize(800, 600);
tgui::Button::Ptr jebise(*loginScreen);
jebise->load("Data/Buttons/Black.conf");
jebise->setSize(80,25);
jebise->setText("Tuck off");
jebise->setPosition(100, 100);
jebise->bindCallback(tgui::Button::LeftMouseClicked);
jebise->setCallbackId(1);
}
#endif
objc[2442]: Class SFApplication is implemented in both /Library/Frameworks/sfml-window.framework/Versions/2.1.0/sfml-window and /Users/cola/Desktop/fml test/Debug/fml test.app/Contents/Frameworks/libsfml-window.2.dylib. One of the two will be used. Which one is undefined.
objc[2442]: Class SFOpenGLView is implemented in both /Library/Frameworks/sfml-window.framework/Versions/2.1.0/sfml-window and /Users/cola/Desktop/fml test/Debug/fml test.app/Contents/Frameworks/libsfml-window.2.dylib. One of the two will be used. Which one is undefined.
objc[2442]: Class SFSilentResponder is implemented in both /Library/Frameworks/sfml-window.framework/Versions/2.1.0/sfml-window and /Users/cola/Desktop/fml test/Debug/fml test.app/Contents/Frameworks/libsfml-window.2.dylib. One of the two will be used. Which one is undefined.
objc[2442]: Class SFWindow is implemented in both /Library/Frameworks/sfml-window.framework/Versions/2.1.0/sfml-window and /Users/cola/Desktop/fml test/Debug/fml test.app/Contents/Frameworks/libsfml-window.2.dylib. One of the two will be used. Which one is undefined.
objc[2442]: Class SFWindowController is implemented in both /Library/Frameworks/sfml-window.framework/Versions/2.1.0/sfml-window and /Users/cola/Desktop/fml test/Debug/fml test.app/Contents/Frameworks/libsfml-window.2.dylib. One of the two will be used. Which one is undefined.
objc[2442]: Class SFViewController is implemented in both /Library/Frameworks/sfml-window.framework/Versions/2.1.0/sfml-window and /Users/cola/Desktop/fml test/Debug/fml test.app/Contents/Frameworks/libsfml-window.2.dylib. One of the two will be used. Which one is undefined.
Segmentation fault: 11
Scanning dependencies of target tgui
[ 2%] Building CXX object src/TGUI/CMakeFiles/tgui.dir/Callback.cpp.o
In file included from /Users/cola/TGUI-0.6.1/src/TGUI/Callback.cpp:26:
In file included from /Users/cola/TGUI-0.6.1/include/TGUI/Callback.hpp:29:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/map:371:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__tree:16:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:599:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/tuple:234:73: error:
no matching constructor for initialization of
'std::__1::reference_wrapper<const tgui::Callback>'
_NOEXCEPT_(is_nothrow_default_constructible<_Hp>::value) : value()
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/tuple:447:23: note:
in instantiation of member function 'std::__1::__tuple_leaf<0,
std::__1::reference_wrapper<const tgui::Callback>, false>::__tuple_leaf'
requested here
_LIBCPP_CONSTEXPR __tuple_impl()
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/tuple:550:23: note:
in instantiation of member function
'std::__1::__tuple_impl<std::__1::__tuple_indices<0>,
std::__1::reference_wrapper<const tgui::Callback> >::__tuple_impl'
requested here
_LIBCPP_CONSTEXPR tuple()
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/functional:1744:11: note:
in instantiation of member function
'std::__1::tuple<std::__1::reference_wrapper<const tgui::Callback>
>::tuple' requested here
__bound_args_(_VSTD::forward<_BA>(__bound_args)...) {}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2243:15: note:
in instantiation of function template specialization
'std::__1::__bind<std::__1::function<void (const tgui::Callback &)> &,
std::__1::reference_wrapper<const tgui::Callback>
>::__bind<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<const
tgui::Callback> >, , void>' requested here
__first_(_VSTD::forward<_Args1>(get<_I1>(__first_args))...)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2421:15: note:
in instantiation of function template specialization
'std::__1::__libcpp_compressed_pair_imp<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<const
tgui::Callback> >,
std::__1::allocator<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<const
tgui::Callback> > >,
2>::__libcpp_compressed_pair_imp<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<const
tgui::Callback> > &&, , 0, >' requested here
: base(__pc, _VSTD::move(__first_args), _VSTD::move(__second_args),
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/functional:992:11: note:
in instantiation of function template specialization
'std::__1::__compressed_pair<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<const
tgui::Callback> >,
std::__1::allocator<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<const
tgui::Callback> > >
>::__compressed_pair<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<const
tgui::Callback> > &&, >' requested here
: __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/functional:1277:26: note:
in instantiation of member function
'std::__1::__function::__func<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<const
tgui::Callback> >,
std::__1::allocator<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<const
tgui::Callback> > >, void ()>::__func' requested here
::new (__f_) _FF(_VSTD::move(__f));
^
/Users/cola/TGUI-0.6.1/src/TGUI/Callback.cpp:43:21: note: in instantiation of
function template specialization 'std::__1::function<void
()>::function<std::__1::__bind<std::__1::function<void
(const tgui::Callback &)> &, std::__1::reference_wrapper<const
tgui::Callback> > >' requested here
mapCallback(std::bind(func, std::cref(m_Callback)), trigger);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:365:31: note:
candidate constructor not viable: requires single argument '__f', but no
arguments were provided
_LIBCPP_INLINE_VISIBILITY reference_wrapper(type& __f) _NOEXCEPT : _...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:367:14: note:
candidate constructor not viable: requires 1 argument, but 0 were provided
private: reference_wrapper(type&&); public: // = delete; // do not b...
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:354:24: note:
candidate constructor (the implicit copy constructor) not viable: requires
1 argument, but 0 were provided
class _LIBCPP_TYPE_VIS reference_wrapper
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_base:354:24: note:
candidate constructor (the implicit move constructor) not viable: requires
1 argument, but 0 were provided
1 error generated.
make[2]: *** [src/TGUI/CMakeFiles/tgui.dir/Callback.cpp.o] Error 1
make[1]: *** [src/TGUI/CMakeFiles/tgui.dir/all] Error 2
make: *** [all] Error 2