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

Author Topic: PYGUIML and GUIML : GUI for SFML and PYSFML (bastien leonard's binding)  (Read 3091 times)

0 Members and 1 Guest are viewing this topic.

gaulois94

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Good night,

Well, today, I will to talk you about GUIML and PYGUIML. This libraries are GUI for SFML and PYSFML. In this time, this GUI are in development, and haven't many Widget.

The Goal of this libraries it's be very simple. Indeed, we can use and create Widgets very simple. For exemple, this code

#include "Widget.h"
#include "Button.h"
#include "Window.h"
#include "Frame.h"
#include <iostream>

int main()
{
        guiml::Window window(sf::VideoMode(800, 600), "teste");
        guiml::Frame frame(&window, sf::IntRect(100, 100, 550, 400), sf::Color(0, 255, 255), guiml::Image(), guiml::Label(NULL, std::string("Teste")), sf::Color(255, 0, 0));
        guiml::Label label(NULL, std::string("Sa marche"));
        guiml::Button button(&frame, label, sf::IntRect(40, 14, 250, 160));
        while(window.isOpen())
        {
                if(button.isActived())
                        std::cout << "1" << std::endl;
                window.update();
        }
        return 0;
}

do



The "1" behind the console significated that the Button "Sa marche" (in frenche, it meens "It Works") was actived with de Right Click Mouse.

This lib managed also the window resize : if you resize your window, the widgets' position and size are adjusted.

The PYSFML version don't are very advanced, but I will correct it ;) .

You can download and see the sources of PYSFML here https://github.com/Gaulois94/PYGUIML and for GUIML here : https://github.com/Gaulois94/GUIML
 
Thanks for all.

ps : sorry for my bad english, I'm French and I'm 16 years old.
« Last Edit: May 23, 2012, 10:15:55 pm by gaulois94 »