mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-11 17:17:42 +03:00
RectangleDrawable WIP.
Drawables now can keep a position. Some code clean up. --HG-- branch : dev
This commit is contained in:
@@ -10,6 +10,7 @@ EE::Window::Window * win = NULL;
|
||||
float circ = 0, circ2 = 0;
|
||||
int op = 1;
|
||||
ArcDrawable arcDrawable( 100, 64 );
|
||||
RectangleDrawable rectDrawable( Vector2f(0,0), Sizef(250,250) );
|
||||
|
||||
void mainLoop()
|
||||
{
|
||||
@@ -84,6 +85,8 @@ void mainLoop()
|
||||
arcDrawable.setArcStartAngle( circ2 );
|
||||
arcDrawable.draw( winCenter );
|
||||
|
||||
rectDrawable.draw();
|
||||
|
||||
// Draw frame
|
||||
win->display();
|
||||
}
|
||||
@@ -102,6 +105,10 @@ EE_MAIN_FUNC int main (int argc, char * argv [])
|
||||
arcDrawable.setColorFilter( ColorA( 0, 255, 0, 150 ) );
|
||||
arcDrawable.setFillMode( DRAW_FILL );
|
||||
|
||||
rectDrawable.setColorFilter( ColorA( 255, 0, 0, 150 ) );
|
||||
rectDrawable.setFillMode( DRAW_FILL );
|
||||
rectDrawable.setCorners( 64 );
|
||||
|
||||
// Set the MainLoop function and run it
|
||||
// This is the application loop, it will loop until the window is closed.
|
||||
// This is only a requirement if you want to support Emscripten builds ( WebGL + Canvas ).
|
||||
|
||||
Reference in New Issue
Block a user