tankos / sfgui Goto Github PK
View Code? Open in Web Editor NEWSimple and Fast Graphical User Interface
License: zlib License
Simple and Fast Graphical User Interface
License: zlib License
It would be nice to have something similar to javascript alert() (modal if possible.)
CMake reports:
CMake Warning (dev) at examples/CMakeLists.txt:4 (add_executable):
Policy CMP0037 is not set: Target names should not be reserved and should
match a validity pattern. Run "cmake --help-policy CMP0037" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
The target name "test" is reserved or not valid for certain CMake features,
such as generator expressions, and may result in undefined behavior.
Call Stack (most recent call first):
examples/CMakeLists.txt:40 (build_example)
This warning is for project developers. Use -Wno-dev to suppress it.
I get this not-funny-looking crash or a hang every time I exit my single threaded (at least I don't use threads explicitly) app.
The common thing in both backtraces seems to be sfg::VertexBufferRenderer::~VertexBufferRenderer(), though Valgrind trace shows quite a few access-after-free errors in SFGUI destructors, so apparently there's some cleanup ordering problem.
Let me know what kind of info would help in debugging this.
Valgrind trace: http://pastebin.com/mxpJgas8
Backtrace for assertion fail:
../nptl/pthread_mutex_lock.c:80: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
(gdb) bt
#0 0x00007f6860746485 in raise () from /lib64/libc.so.6
#1 0x00007f6860747908 in abort () from /lib64/libc.so.6
#2 0x00007f686073f532 in __assert_fail_base () from /lib64/libc.so.6
#3 0x00007f686073f5e2 in __assert_fail () from /lib64/libc.so.6
#4 0x00007f68604fe69d in pthread_mutex_lock () from /lib64/libpthread.so.0
#5 0x00007f6861c34184 in (anonymous namespace)::getInternalContext() () from /home/monstter/sfml-2.1/lib/libsfml-window.so.2
#6 0x00007f6861c3440d in sf::priv::GlContext::ensureContext() () from /home/monstter/sfml-2.1/lib/libsfml-window.so.2
#7 0x00007f6861a1c515 in sf::Texture::~Texture() () from /home/monstter/sfml-2.1/lib/libsfml-graphics.so.2
#8 0x00007f68613cbdf8 in sfg::VertexBufferRenderer::~VertexBufferRenderer() () from /home/monstter/sfgui-0.2.3/lib/libsfgui.so
#9 0x00007f68613c6349 in std::shared_ptr<sfg::Renderer>::~shared_ptr() () from /home/monstter/sfgui-0.2.3/lib/libsfgui.so
#10 0x00007f68607493a7 in __cxa_finalize () from /lib64/libc.so.6
#11 0x00007f686133fe63 in ?? () from /home/monstter/sfgui-0.2.3/lib/libsfgui.so
#12 0x00007fff309c04a0 in ?? ()
#13 0x00007f686205b05f in _dl_fini () from /lib64/ld-linux-x86-64.so.2
Backtrace stopped: frame did not save the PC
Or for a hang:
(gdb) bt
#0 0x00007fc84dcb7f64 in __lll_lock_wait () from /lib64/libpthread.so.0
#1 0x00007fc84dcb37ec in _L_lock_541 () from /lib64/libpthread.so.0
#2 0x00007fc84dcb3610 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3 0x00007fc84f3e9184 in (anonymous namespace)::getInternalContext() () from /home/monstter/sfml-2.1/lib/libsfml-window.so.2
#4 0x00007fc84f3e940d in sf::priv::GlContext::ensureContext() () from /home/monstter/sfml-2.1/lib/libsfml-window.so.2
#5 0x00007fc84f1d1515 in sf::Texture::~Texture() () from /home/monstter/sfml-2.1/lib/libsfml-graphics.so.2
#6 0x00007fc84eb80df8 in sfg::VertexBufferRenderer::~VertexBufferRenderer() () from /home/monstter/sfgui-0.2.3/lib/libsfgui.so
#7 0x00007fc84eb7b349 in std::shared_ptr<sfg::Renderer>::~shared_ptr() () from /home/monstter/sfgui-0.2.3/lib/libsfgui.so
#8 0x00007fc84defe3a7 in __cxa_finalize () from /lib64/libc.so.6
#9 0x00007fc84eaf4e63 in ?? () from /home/monstter/sfgui-0.2.3/lib/libsfgui.so
#10 0x00007fff38bda1a0 in ?? ()
#11 0x00007fc84f81005f in _dl_fini () from /lib64/ld-linux-x86-64.so.2
Backtrace stopped: frame did not save the PC
Or for a SIGSEGV:
(gdb) bt
#0 0x00007f229ba3ea92 in std::_Rb_tree<sf::priv::GlContext*, sf::priv::GlContext*, std::_Identity<sf::priv::GlContext*>, std::less<sf::priv::GlContext*>, std::allocator<sf::priv::GlContext*> >::_M_insert_unique(sf::priv::GlContext* const&) () from /home/monstter/sfml-2.1/lib/libsfml-window.so.2
#1 0x00007f229ba3e1a6 in (anonymous namespace)::getInternalContext() () from /home/monstter/sfml-2.1/lib/libsfml-window.so.2
#2 0x00007f229ba3e40d in sf::priv::GlContext::ensureContext() () from /home/monstter/sfml-2.1/lib/libsfml-window.so.2
#3 0x00007f229b826515 in sf::Texture::~Texture() () from /home/monstter/sfml-2.1/lib/libsfml-graphics.so.2
#4 0x00007f229b1d5df8 in sfg::VertexBufferRenderer::~VertexBufferRenderer() () from /home/monstter/sfgui-0.2.3/lib/libsfgui.so
#5 0x00007f229b1d0349 in std::shared_ptr<sfg::Renderer>::~shared_ptr() () from /home/monstter/sfgui-0.2.3/lib/libsfgui.so
#6 0x00007f229a5533a7 in __cxa_finalize () from /lib64/libc.so.6
#7 0x00007f229b149e63 in ?? () from /home/monstter/sfgui-0.2.3/lib/libsfgui.so
#8 0x00007fff4186db80 in ?? ()
#9 0x00007f229be6505f in _dl_fini () from /lib64/ld-linux-x86-64.so.2
Backtrace stopped: frame did not save the PC
How to preload the font. Did not display some words of the buttons after the start of the time cycle
SFML_ROOT=/home/philou/local/sfml/2.1/ cmake -DCMAKE_INSTALL_PREFIX=~/local/sfgui/0.2.0 ..
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
CMake Error at CMakeLists.txt:17 (find_package):
By not providing "FindSFML.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "SFML", but
CMake did not find one.
Could not find a package configuration file provided by "SFML" (requested
version 2) with any of the following names:
SFMLConfig.cmake
sfml-config.cmake
Add the installation prefix of "SFML" to CMAKE_PREFIX_PATH or set
"SFML_DIR" to a directory containing one of the above files. If "SFML"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
See also "/home/philou/src/AUDIO-DSP-NUM/GLGUI/SFGUI-0.2.0/build/CMakeFiles/CMakeOutput.log".
$ env | grep CMAKE
CMAKE_MODULE_PATH=::/home/philou/local/sfml/2.1/share/SFML/cmake/Modules/:/home/philou/local/vc/20140210/lib/cmake/Vc:/home/philou/local/eigen/3.2.90-20140324/lib/cmake/eigen3
$ find sfml/ -iname "*.cmake"
sfml/2.1/share/SFML/cmake/Modules/FindSFML.cmake
No trace of SFMLConfig.cmake in a SFML-2.1 install !
Just what it says on the tin. The widget in question is a sfg::Window and I'm using the Signal OnCloseButton that comes with it. The signal definitely works (console prints out text when I click the close button), and clearly something happens since the Window becomes unresponsive afterwards, but the Window still remains on-screen.
I'm pretty new to both C++ and SFGUI, so I'd appreciate some clarification. So far as I can tell from the desktop.cpp example, I'm using the functions the same way as shown.
Thanks.
There should be an option to expand child widgets inside ScrolledWindows. Without that, ScrolledWindows are pretty much useless to me.
SFML add iOS & Android supported :)
https://github.com/LaurentGomila/SFML/tree/master/src/SFML/Window/iOS
https://github.com/LaurentGomila/SFML/tree/master/src/SFML/Window/Android
While a combobox is open, clicking on the SFGUI window it is contained in causes a segmentation fault. This can be reproduced using the ComboBox.cpp example file.
Error message:
Segmentation fault (core dumped)
SFGUI 0.2.3
SFML 2.1
Ubuntu 13.10 (32bit)
Hi,
I am developing a game in sfml with addition of sfgui, but we walked into a wall with window spawning
are multiple independent windows are supported in sfgui? By that i mean windows as sfml contexts, decorated with one or multiple buttons. Can you provide example in which multiple windows are spawned?
This is a feature that would make my code more concise. I want to pass a Box::Ptr to a method and have the method fill it with widgets. However, I don't want to make any assumptions when creating the box so it would be best to have a SetOrientation method that I can call inside the method with the Box argument.
I have created a scroll window with a vertical box that is packed with radio buttons. Each radio button is assigned to a button group and is a local reference to the function that builds the list. If I call a function that removes all of the radio buttons from the box, then add new radio buttons, the old buttons are still visible when I hide the parent window. I've tried removing all radio buttons from the radio group, then calling RemoveAll() on the box, as well as calling Invalidate, Update, and RefreshAll. The old radio buttons still show when I hide the window.
SFGUI's non-legacy renderer seems to want GLSL 1.30, but in NonLegacyRenderer::IsAvailable(), it only checks to see if shaders are available. Internally, SFML seems to only check for GLSL 1.00 in the Shader::isAvailable() method. So any machine that's pre-1.30, but not quite pre-1.00, can't run SFGUI.
I have a pretty old laptop that I'd like to do development on but I can't get SFGUI to run because it keeps trying to use the non-legacy renderer and it fails to compile the vertex shader. Disabling the non-legacy renderer completely fixes the problem, but if there's an easy fix that could be done upstream, it would save me some headache.
Thanks!
The BREW.cpp "claims" to set the ScrollSpeed
property for the Notebook widget. However the Notebook widget itself never requests the setting from the theme.
I added the follow piece of code to the test example and nothing changed.
"Notebook {"
" ScrollSpeed: 25.f;"
"}"
Guess one of the main question is: Should ScrollSpeed
be a property of the Notebook widget?
Edit: Only noticed just now that ScrollSpeed
is actually used in the Notebook widget, but just not set any default. But I've yet to actually see it work...
If you create a UI element underneath the mouse, the element never gets the mouse over event. When an element gets created, there should be something that checks the mouse position and pro-actively triggers the mouse move event on that widget so the user does not have to move the mouse a pixel in a direction to allow clicking. This can be easily tested by creating a button underneath the mouse on right-click, and observe the button is unresponsive to clicks and is not highlighted until you move your mouse a pixel or two. This affects all controls, not just buttons.
Hi all,
I like this project, and would like to help getting it more visibility. I think the steps towards that would be:
Does that seem to fit the goals of this project?
While preparing the 0.3.0 release and testing the examples, I stumbled upon rendering issues. Additionally I can see the console output
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available
Screenshot:
Specs:
% lspci | grep VGA
02:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 660 Ti](rev a1)% glxinfo | grep SGIS_te
GL_SGIS_generate_mipmap, GL_SGIS_texture_lod, GL_SGIX_depth_texture,
GL_SGIS_generate_mipmap, GL_SGIS_texture_lod, GL_SGIX_depth_texture,% glxinfo | grep OpenGL
OpenGL core profile version string: 4.4.0 NVIDIA 349.16
OpenGL shading language version string: 4.50 NVIDIA
Hello,
I am new here. I work on small project. It is 2d game. I am using SFML and SFGUI. Everything works fine when I compile my project on Ubuntu and on several PC's with Windows 7. Unfortunately I have problem with sfgui on my notebook (i7, ddr3, win7-64).
I have compiled sfml succesfully with mingw32 6.3. SFMLs examples works very good. SFGUI also compiled without any errors but when I want to start any example app it crashes. I have tried to debug it and i found that there is unhandeled exception in ig7icd32.dll. It is related to GLEW functions.
I attach screenshot:
Cmake settings for SFGUI:
Cmake settings for SFML:
I dont know why it doesn't work just on this notebook.
Thanks in advance for any help!
I tried generating Doxygen stuff myself manually, but even then, it didn't seem to generate anything of use. All I got was an index.html (and pngs and css files and whatnot for it).
It looks pretty easy to create new widgets. Before I create an SVG rendering widget, is it possible to do this already? I've seen people using Cairo for 2d rendering. Thoughts?
When I run the example hello world app, and change the style to sf::Style::None, the app crashes on exit inside SFML. I traced it down to the destructor for NonLegacyRenderer. In NonLegacyRenderer.cpp at line 308 a context is created with sf::Context context. If I comment that out it no longer crashes.
Should the destructor be creating a context at application exit? I don't believe any of the gl delete calls need it.
This is the error I'm getting running cmake:
/home/maverick/Downloads/SFGUI-master/src/SFGUI/Engines/BREW/Button.cpp:64:8: error: ‘class sf::Text’ has no member named ‘setFillColor’ text.setFillColor( color ); ^ CMakeFiles/sfgui.dir/build.make:374: recipe for target 'CMakeFiles/sfgui.dir/src/SFGUI/Engines/BREW/Button.cpp.o' failed make[2]: *** [CMakeFiles/sfgui.dir/src/SFGUI/Engines/BREW/Button.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/sfgui.dir/all' failed make[1]: *** [CMakeFiles/sfgui.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2
I have the latest SFML installed v2.4
When setting a fixed width for a label using SetRequisition, the label will not be centered, but will be left justified.
Brew code snippet from Label.cpp:
22 if( !label->GetLineWrap() ) {
23 // Calculate alignment when word wrap is disabled.
24 sf::Vector2f avail_space( label->GetAllocation().width - label->GetRequisition().x, label->GetAllocation().height - label->GetRequisition().y );
25 sf::Vector2f position( avail_space.x * label->GetAlignment().x, avail_space.y * label->GetAlignment().y );
26
27 vis_label.setPosition( position.x, position.y );
28 }
This issue is I believe is line 24 where the GetRequisition.x is the same size as GetAllocation.width, as your available space will be 0. It doesn't matter what Alignment you assign, it will always be 0 if this is the case (Left Justified).
Sample code snippet, I have modified the alignment of 'File' to be the far right of the label for demonstration.
m_boSingleFileHeader = sfg::Box::Create(sfg::Box::Orientation::HORIZONTAL, 0.0f);
m_lSingleName = sfg::Label::Create("File");
m_lSingleName->SetRequisition(sf::Vector2f(633.0f, 0.0f));
m_lSingleName->SetAlignment(sf::Vector2f(1.0f, 0.5f));
m_lSingleDate = sfg::Label::Create("Date");
m_lSingleDate->SetRequisition(sf::Vector2f(180.0f, 0.0f));
m_lSingleDate->SetAlignment(sf::Vector2f(0.1f, 0.5f));
m_boSingleFileHeader->Pack(m_lSingleName, false, false);
m_boSingleFileHeader->Pack(m_lSingleDate, false, false);
Please see the position of 'File' in the image below, it should be at the far right hand side of the 633.0f label, but instead it is at the far left.
I'll do some playing around to see if I can fix it myself.
Hello, I followed this tutorial for building SFML on ubuntu (as apt-get libsfml-dev is out of date), While running make, it errors at Linking CXX executable CustomWidget.
Full error:
/Desktop/SFGUI-0.3.2/build$ sudo make install
...
[ 63%] Built target sfgui
[ 63%] Linking CXX executable CustomWidget
/usr/bin/ld: CustomWidget: hidden symbol `__cpu_model' in /usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a(cpuinfo.o) is referenced by DSO
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
examples/CMakeFiles/CustomWidget.dir/build.make:103: recipe for target 'examples/CustomWidget' failed
make[2]: *** [examples/CustomWidget] Error 1
CMakeFiles/Makefile2:168: recipe for target 'examples/CMakeFiles/CustomWidget.dir/all' failed
make[1]: *** [examples/CMakeFiles/CustomWidget.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
What am I doing wrong? I followed the build instructions Here
Is there, by chance, a prebuilt for ubuntu that I didnt see on the release page?
Some screenshots would be useful to see if the example program is functioning as expected, and other things.
Maybe the website once had some, but the website currently just redirects me to the repository.
I assume due to the changes to SFML's context management, SFGUI currently just crashes with SFML 2.4.1.
Here's what I got just creating a simple desktop and window with SFGUI.
GL Error detected at NonLegacyRenderer.cpp:L88
GLEXT_glGetHandle( GLEXT_GL_PROGRAM_OBJECT )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L92
GLEXT_glGetHandle( GLEXT_GL_PROGRAM_OBJECT )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L94
GLEXT_glGetAttribLocation( program, name.c_str() )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L96
GLEXT_glUseProgramObject( previous_program )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L88
GLEXT_glGetHandle( GLEXT_GL_PROGRAM_OBJECT )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L92
GLEXT_glGetHandle( GLEXT_GL_PROGRAM_OBJECT )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L94
GLEXT_glGetAttribLocation( program, name.c_str() )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L96
GLEXT_glUseProgramObject( previous_program )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L88
GLEXT_glGetHandle( GLEXT_GL_PROGRAM_OBJECT )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L92
GLEXT_glGetHandle( GLEXT_GL_PROGRAM_OBJECT )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L94
GLEXT_glGetAttribLocation( program, name.c_str() )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L96
GLEXT_glUseProgramObject( previous_program )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L165
GLEXT_glGenBuffers( 1, &m_vertex_vbo )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L166
GLEXT_glGenBuffers( 1, &m_color_vbo )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L167
GLEXT_glGenBuffers( 1, &m_texture_vbo )
Error: GL_INVALID_OPERATION
GL Error detected at NonLegacyRenderer.cpp:L168
GLEXT_glGenBuffers( 1, &m_index_vbo )
Error: GL_INVALID_OPERATION
Assertion failed!
Program: bin\Debug\game-off-2016.exe
File: src\SFGUI\Renderers\NonLegacyRenderer.cpp, Line 831
Expression: m_vertex_vbo != 0
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Still works fine with SFML 2.3.2.
I've checked all the member functions I can think of that belong to all of the relative window-based functions in the example list. Is there something I've missed here?
It would be good to be able to copy and paste
I'll look into doing this at some point soon, if it's not done already and something you'd like
Hi,
I wanted to build SFGUI 0.4.0 so I've builded it in CMake
configure settings:
(I had to pass path to sfml window/graphics/... library by hand)
Then, I wantet to do batch build in VS. I've selected ALL_BUILD and INSTALL, both in Debug and Release and I got these errors:
It's my first time using SFGUI so could u tell me what i'm doing wrong? :D
Hello Im trying to switch in my project to static version of SFML and SFGUI and I am stuck. My project work very well with dynamic linked library on Windows and Linux Ubuntu and Linux Fedora. I use CMake as a build system.
It is funny because I Dont know why sometimes I received .lib files and sometimes only .a files when I am compiling SFML by myself.
This is information about mingw32-g++:
mingw32-g++.exe (MinGW.org GCC-6.3.0-1) 6.3.0
I read instructions for SFML and SFGUI many times and I didnt find any valuable information to solve my problem. It will be really nice If someone could help me. Thanks in advance!
Code:
#include <SFML/Graphics.hpp>
#include <SFGUI/SFGUI.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
sfg::SFGUI sfgui;
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
Directory:
Command:
mingw32-g++.exe -c main.cpp -I.
mingw32-g++.exe main.o -L. -DSFML_STATIC -DSFGUI_STATIC -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32 -lfreetype -lSFGUI-s
Output:
main.o:main.cpp:(.text+0x7c): undefined reference to `_imp___ZN2sf6StringC1EPKcRKSt6locale'
main.o:main.cpp:(.text+0xa2): undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'
main.o:main.cpp:(.text+0xde): undefined reference to`_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE'
main.o:main.cpp:(.text+0x115): undefined reference to `_imp___ZN2sf11CircleShapeC1Efj'
main.o:main.cpp:(.text+0x126): undefined reference to `_imp___ZN2sf5Color5GreenE'
main.o:main.cpp:(.text+0x130): undefined reference to`_imp___ZN2sf5Shape12setFillColorERKNS_5ColorE'
main.o:main.cpp:(.text+0x142): undefined reference to `_imp___ZN3sfg5SFGUIC1Ev'
main.o:main.cpp:(.text+0x151): undefined reference to `_imp___ZNK2sf10WindowBase6isOpenEv'
main.o:main.cpp:(.text+0x171): undefined reference to`_imp___ZN2sf10WindowBase9pollEventERNS_5EventE'
main.o:main.cpp:(.text+0x191): undefined reference to `_imp___ZN2sf6Window5closeEv'
main.o:main.cpp:(.text+0x1be): undefined reference to `_imp___ZN2sf5ColorC1Ehhhh'
main.o:main.cpp:(.text+0x1d9): undefined reference to`_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'
main.o:main.cpp:(.text+0x1ec): undefined reference to `_imp___ZN2sf12RenderStates7DefaultE'
main.o:main.cpp:(.text+0x200): undefined reference to`_imp___ZN2sf12RenderTarget4drawERKNS_8DrawableERKNS_12RenderStatesE'
main.o:main.cpp:(.text+0x212): undefined reference to `_imp___ZN2sf6Window7displayEv'
main.o:main.cpp:(.text+0x22b): undefined reference to `_imp___ZN3sfg5SFGUID1Ev'
main.o:main.cpp:(.text+0x247): undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
main.o:main.cpp:(.text+0x280): undefined reference to `_imp___ZN3sfg5SFGUID1Ev'
main.o:main.cpp:(.text+0x2a4): undefined reference to `_imp___ZN2sf12RenderWindowD1Ev'
main.o:main.cpp:(.text$_ZN2sf11CircleShapeD1Ev[__ZN2sf11CircleShapeD1Ev]+0xa): undefined reference to `_imp___ZTVN2sf11CircleShapeE'
main.o:main.cpp:(.text$_ZN2sf11CircleShapeD1Ev[__ZN2sf11CircleShapeD1Ev]+0x17): undefinedreference to `_imp___ZTVN2sf11CircleShapeE'
main.o:main.cpp:(.text$_ZN2sf11CircleShapeD1Ev[__ZN2sf11CircleShapeD1Ev]+0x2a): undefinedreference to `_imp___ZN2sf5ShapeD2Ev'
collect2.exe: error: ld returned 1 exit status
Expected result:
Build project with static version of SFML and static version of SFGUI
The page "Hello world" contains raw >
and &
symbols.
Code sample reproducing the bug: http://pastebin.com/HNdRJ9H3
Steps to reproduce:
Disappear completely, as if it was closed.
Get attached to the mouse, as if you were moving it.
A rich text box like in html where you can write over more lines instead only one like @ entry would be realy nice!
CMake, on Windows, needs to be run from the Visual Studio developer console in order to function correctly (at least for the NMake generator).
There's already a notice in the Building section, but it's missing in the Running CMake section.
Some parameters (like "${SFML_INCLUDE_DIR}" and "${PROJECT_BINARY_DIR}/doc") are passed to CMake commands in your build scripts without enclosing them by quotation marks. I see that these places will result in build difficulties if the contents of the used variables will contain special characters like spaces.
I would recommend to apply advices from a Wiki article.
Reproducable example (sourcecode, gdb backtrace and buildcommand): https://gist.github.com/anonymous/6a101d6c6e01fc0e3df6
How to reproduce: Resize the SFGUI-created window, then doubleclick the combobox until a segfault appears.
Built using Mingw32-g++ under Windows 7 64bit. Static libs.
While compiling examples:
/home/jerzy/Pobrane/SFGUI-0.2.3/examples/Canvas.cpp: In function ‘int main()’:
/home/jerzy/Pobrane/SFGUI-0.2.3/examples/Canvas.cpp:113:113: error: ‘gluPerspective’ was not declared in this scope
gluPerspective( 90.f, opengl_canvas->GetAllocation().width / opengl_canvas->GetAllocation().height, 1.f, 20.f );
I am using g++ 4.9.2
i downloaded the latest sfgui and sfml and I still get this error
CMake Error at CMakeLists.txt:26 (find_package):
By not providing "FindSFML.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "SFML", but
CMake did not find one.
Could not find a package configuration file provided by "SFML" (requested
version 2) with any of the following names:
SFMLConfig.cmake
sfml-config.cmake
Add the installation prefix of "SFML" to CMAKE_PREFIX_PATH or set
"SFML_DIR" to a directory containing one of the above files. If "SFML"
provides a separate development package or SDK, be sure it has been
installed.
Configuring incomplete, errors occurred!
See also "G:/Coding/Project/new/SFGUI-master/build/CMakeFiles/CMakeOutput.log".
Everything seems to run well but no libxxxx.a file is generated to link to, isn't there supposed to be one
In void Draw( const sf::Vertex* vertices, unsigned int vertex_count, sf::PrimitiveType type, const sf::RenderStates& states = sf::RenderStates::Default );
Why was Canvas::Draw parameter vertex_count given a type of unsigned int and not use SFML's std::size_t?
This is actually kind of a nuisance, any chance of a redefinition?
I noticed that the current release is 0.4.0 but the file still defines the version as 0.3.1
EDIT: Noticed that this was mentioned in #73 but it apparently still hasn't been merged.
int main(int argc,char **argv)
{
sf::RenderWindow render_window(sf::VideoMode(800, 600), "sfgui_test");
render_window.setVerticalSyncEnabled(true);
render_window.resetGLStates();
sfg::SFGUI sfgui;
sfg::Context::Get().GetDefaultEngine().LoadThemeFromFile(".\\..\\..\\example.theme");
auto window = sfg::Window::Create();
window->SetTitle("list");
auto box = sfg::Box::Create(sfg::Box::Orientation::VERTICAL, 6.0f);
auto scrolled_window_box = sfg::Box::Create(sfg::Box::Orientation::VERTICAL);
auto scrolledwindow = sfg::ScrolledWindow::Create();
scrolledwindow->SetScrollbarPolicy(sfg::ScrolledWindow::HORIZONTAL_AUTOMATIC | sfg::ScrolledWindow::VERTICAL_AUTOMATIC);
scrolledwindow->AddWithViewport(scrolled_window_box);
scrolledwindow->SetRequisition(sf::Vector2f(300.f, 400.f));
window->Add(scrolledwindow);
sf::Event event;
sf::Clock clock;
bool f = false;
int i = 0;
while (render_window.isOpen()) {
i++;
if (i == 1)
{
scrolled_window_box->Pack(sfg::Button::Create(L"今属安徽的房间里卡是打开"));
}
if (i == 2)
{
scrolled_window_box->Pack(sfg::Button::Create(L"按时艰苦的嘎哈事故扩大是不够的不"));
}
while (render_window.pollEvent(event)) {
window->HandleEvent(event);
if (event.type == sf::Event::Closed) {
return 0;
}
}
if (clock.getElapsedTime() >= sf::milliseconds(32))
{
window->Update(clock.getElapsedTime().asSeconds());
clock.restart();
}
render_window.clear();
sfgui.Display(render_window);
render_window.display();
}
return EXIT_SUCCESS;
}
The text on the button when i equal to 1 can be displayed normally.
The text on the button when the i equal to 2 has no normal display.
There is no problem when the text in English on the button
How to display Chinese on sfgui
Running the provided examples on high resolution displays (4k) result in all the widgets being rendered super small. Is there support for such displays already implemented maybe?
When you don't set an allocation for the window the SpinButton doesn't expand/fill properly to its content.
Example Code
m_spin_button = sfg::SpinButton::Create(1.f, 8.f, 1.f);
m_spin_box = sfg::Box::Create(sfg::Box::Orientation::HORIZONTAL);
m_spin_box->Pack(m_spin_button, true, true);
m_options_box = sfg::Box::Create(sfg::Box::Orientation::VERTICAL);
m_options_box->Pack(m_spin_box, false, false);
m_ui = sfg::Window::Create();
m_ui->Add(m_options_box);
m_desktop.Add(m_ui);
Looks like the buttons aren't even taken into account.
So far I've done the steps on the SFML website to install this. I linked the static version of the library and when I run my program I get a "sfgui.dll was not found" error. How can I use SFGUI with codeblocks?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.