Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <Bragi.hpp>
  2. #pragma comment( lib, "GUIWrapper.lib" )
  3.  
  4. #include <stdio.h>
  5. #include <math.h>
  6.  
  7. bool MyResizeFunction( Bragi::Window* Wnd, int* W, int* H ) {
  8.     *W = (int)fmod( (double)rand(), 800 );
  9.     *H = (int)fmod( (double)rand(), 600 );
  10.     return true;
  11. }
  12.  
  13. int main() {
  14.     Bragi::Window Wnd = Bragi::Window( "Some title" );
  15.     Wnd.SetPosition( 400, 200 );
  16.     Wnd.SetSize( 500, 500 );
  17.     Wnd.SetVisible( true );
  18.  
  19.     Wnd.OnResize = &MyResizeFunction;
  20.  
  21.     Wnd.SetTitle( "New title" );
  22.    
  23.     while( true ) {
  24.         Wnd.Think();
  25.     }
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement