Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- while( 1 )
- {
- xs = view_xview + 150;//X start
- ys = view_yview + 150;//Y start
- xe = view_xview + view_wview - 150;//X end
- ye = view_yview + view_hview - 150;//Y end
- bxs = view_xview + view_wview - 200;//Button x start
- bys = view_yview + view_hview - 180;//Button y start
- bxe = bxs + 40;//Button x end
- bye = bys + 20;//Button y end
- col[ 0 ] = c_blue;//Background
- col[ 1 ] = c_white;//Outline & Content
- col[ 2 ] = c_yellow;//Hover
- bt = 'Close';//Button text
- if ( keyboard_check( vk_space ) == true || keyboard_check( vk_enter ) == true || keyboard_check( vk_escape ) == true || ( mouse_check_button( mb_left ) and mouse_x >= bxs and mouse_y >= bys and mouse_x <= bxe and mouse_y <= bye ) )
- {
- io_clear();
- exit;
- }
- screen_refresh();
- draw_set_color( col[ 0 ] );
- draw_rectangle( xs , ys , xe , ye , 0 );
- draw_set_color( col[ 1 ] );
- draw_rectangle( xs , ys , xe , ye , 1 );
- draw_set_halign( fa_left );
- draw_set_valign( fa_top );
- draw_text( xs + 2 , ys + 2 , argument0 );
- if ( mouse_x >= bxs and mouse_y >= bys and mouse_x <= bxe and mouse_y <= bye )
- {
- draw_set_color( c_yellow );
- }
- draw_rectangle( bxs , bys , bxe , bye , 1 );
- draw_set_halign( fa_middle );
- draw_set_valign( fa_center );
- draw_text( mean( bxs , bxe ) , mean( bys , bye ) , bt );
- io_handle();
- sleep( 1000 / 60 );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement