Thank you! It works perfectly now.
And btw what is the difference between an EditBox and a TextBox?
And btw what is the difference between an EditBox and a TextBox?
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
[ 53%] Building CXX object src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Texture.cpp.o
In file included from c:/Users/Bruno/Programmieren/Bibliotheken/C++/SFML-2.3.2-github-09-05-16/src/SFML/Graphics/GLCheck.hpp:32:0,
from c:/Users/Bruno/Programmieren/Bibliotheken/C++/SFML-2.3.2-github-09-05-16/src/SFML/Graphics/Texture.cpp:30:
c:/Users/Bruno/Programmieren/Bibliotheken/C++/SFML-2.3.2-github-09-05-16/src/SFML/Graphics/Texture.cpp: In member function 'bool s
f::Texture::create(unsigned int, unsigned int)':
c:/Users/Bruno/Programmieren/Bibliotheken/C++/SFML-2.3.2-github-09-05-16/src/SFML/Graphics/GLExtensions.hpp:115:55: error: 'GL_EXT
_sRGB' was not declared in this scope
#define GLEXT_texture_sRGB GL_EXT_sRGB
^
c:/Users/Bruno/Programmieren/Bibliotheken/C++/SFML-2.3.2-github-09-05-16/src/SFML/Graphics/Texture.cpp:192:31: note: in expansion
of macro 'GLEXT_texture_sRGB'
static bool textureSrgb = GLEXT_texture_sRGB;
^
In file included from c:/Users/Bruno/Programmieren/Bibliotheken/C++/SFML-2.3.2-github-09-05-16/src/SFML/Graphics/Texture.cpp:30:0:
c:/Users/Bruno/Programmieren/Bibliotheken/C++/SFML-2.3.2-github-09-05-16/src/SFML/Graphics/GLExtensions.hpp:116:55: error: 'GL_SRG
B8_ALPHA8_EXT' was not declared in this scope
#define GLEXT_GL_SRGB8_ALPHA8 GL_SRGB8_ALPHA8_EXT
^
c:/Users/Bruno/Programmieren/Bibliotheken/C++/SFML-2.3.2-github-09-05-16/src/SFML/Graphics/GLCheck.hpp:51:28: note: in definition
of macro 'glCheck'
#define glCheck(expr) (expr)
^
c:/Users/Bruno/Programmieren/Bibliotheken/C++/SFML-2.3.2-github-09-05-16/src/SFML/Graphics/Texture.cpp:215:54: note: in expansion
of macro 'GLEXT_GL_SRGB8_ALPHA8'
glCheck(glTexImage2D(GL_TEXTURE_2D, 0, (m_sRgb ? GLEXT_GL_SRGB8_ALPHA8 : GL_RGBA), m_actualSize.x, m_actualSize.y, 0, GL_RGBA
, GL_UNSIGNED_BYTE, NULL));
^
make[2]: *** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Texture.cpp.o] Error 1
make[1]: *** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all] Error 2
make: *** [all] Error 2
auto editBox = std::make_shared<tgui::EditBox>();
editBox ->setSize(700, 100);
editBox ->setPosition(10, 500);
// editBox ->setText("Some Text");
GUI->add(editBox );
gui.setView(window.getView());
is called.
Debug Assertion Failed!
File: [...]\Microsoft Visual Studio\14.0\VC\include\vector
Line: 101
Vector iterator not incrementable
#include <TGUI/TGUI.hpp>
void loadWidgets(tgui::Gui& gui)
{
// Create GUI
// Update size on window resize
auto windowWidth = tgui::bindWidth(gui);
auto windowHeight = tgui::bindHeight(gui);
// Vertical Layout
auto MenuLayout = std::make_shared<tgui::VerticalLayout>();
MenuLayout->setSize(windowWidth * 0.6f, windowHeight * 0.8f);
MenuLayout->setPosition(windowWidth * 0.2f, windowHeight * 0.1f);
gui.add(MenuLayout);
// Play Button
auto PlayBtn = std::make_shared<tgui::Button>();
//MenuLayout->add(PlayBtn);
/* ### Error line ### */
MenuLayout->addSpace(0.5f);
// Exit Button
auto ExitBtn = std::make_shared<tgui::Button>();
MenuLayout->add(ExitBtn);
}
int main()
{
// Create the window
sf::RenderWindow window(sf::VideoMode(400, 300), "TGUI window");
tgui::Gui gui(window);
try {
// Load the font
gui.setFont("Arial.ttf");
// Load the widgets
loadWidgets(gui);
} catch(const tgui::Exception& e) {
std::cerr << "Failed to load TGUI widgets: " << e.what() << std::endl;
return 1;
}
// Main loop
while(window.isOpen()) {
sf::Event event;
while(window.pollEvent(event)) {
// When the window is closed, the application ends
if(event.type == sf::Event::Closed)
window.close();
// When the window is resized, the view is changed
else if(event.type == sf::Event::Resized) {
window.setView(sf::View(sf::FloatRect(0, 0, event.size.width, event.size.height)));
gui.setView(window.getView());
}
// Pass the event to all the widgets
gui.handleEvent(event);
}
window.clear();
// Draw all created widgets
gui.draw();
window.display();
}
return EXIT_SUCCESS;
}