1
General / Re: why this code not playing voice of cat ?
« on: September 15, 2013, 10:09:03 am »
Got it
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.
#include <SFML/window.hpp>
#include <SFML/system.hpp>
#include <SFML/audio.hpp>
#include <SFML/graphics.hpp>
#include <TGUI/TGUI.hpp>
//#include <SFML/Video.hpp>
//#include <conio.h>
//#include <iostream>
int main()
{
// Create the window
sf::RenderWindow window(sf::VideoMode(800, 600), "Window");
tgui::Gui gui(window);
// Load the font (you should check the return value to make sure that it is loaded)
gui.setGlobalFont("C:/Users/corleone/Documents/Visual Studio 2010/Projects/MySfml/MySfml/TGUI-0.6-alpha2-Visual-C++10-2010-32-bits/TGUI-0.6-alpha2/fonts/DejaVuSans.ttf");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
// Pass the event to all the widgets (if there would be widgets)
gui.handleEvent(event);
}
//window.clear();
// Draw all created widgets
gui.draw();
tgui::Button::Ptr button(gui);
button->load("C:/Users/corleone/Documents/Visual Studio 2010/Projects/MySfml/MySfml/TGUI-0.6-alpha2-Visual-C++10-2010-32-bits/TGUI-0.6-alpha2/widgets/Button/BabyBlue/Normal.conf");
window.display();
}
return EXIT_SUCCESS;
}
:(