diff --git a/docs/functions/user_interaction/focus_window.md b/docs/functions/user_interaction/focus_window.md deleted file mode 100644 index 8b9d21a..0000000 --- a/docs/functions/user_interaction/focus_window.md +++ /dev/null @@ -1,19 +0,0 @@ -# functions - -focus_window - - - - -This function focuses the main window of your game on the user's screen. - - -# bool focus_window() - -## Parameters - -None - -## Return value - -true on success, false otherwise. \ No newline at end of file diff --git a/docs/functions/user_interaction/get_focused_window.md b/docs/functions/user_interaction/get_focused_window.md deleted file mode 100644 index e4d3257..0000000 --- a/docs/functions/user_interaction/get_focused_window.md +++ /dev/null @@ -1,14 +0,0 @@ -# functions - -get_focused_window - -this function returns the ID of the focused window - -# uint get_focused_window() - -## Return value - -The ID of the focused window if set, 0 otherwise. - -## Remarks - diff --git a/docs/functions/user_interaction/get_input.md b/docs/functions/user_interaction/get_input.md index e6ef572..f5f57e8 100644 --- a/docs/functions/user_interaction/get_input.md +++ b/docs/functions/user_interaction/get_input.md @@ -33,8 +33,7 @@ alert("Waiting", "You have eight seconds to type some text."); show_game_window("Typing test"); while(true) { -delay(5); -update_game_window(); +wait(5); if(wait_time.elapsed_millis>= 8000) { wait_time.pause(); diff --git a/docs/functions/user_interaction/get_window_handle.md b/docs/functions/user_interaction/get_window_handle.md new file mode 100644 index 0000000..f2e06ce --- /dev/null +++ b/docs/functions/user_interaction/get_window_handle.md @@ -0,0 +1,11 @@ +# functions + +get_window_handle + +this function returns the ID of the focused window called handle + +# uint get_window_handle() + +## Return value + +The handle to the current window \ No newline at end of file diff --git a/docs/functions/user_interaction/key_down.md b/docs/functions/user_interaction/key_down.md index 215ed99..8f2aaeb 100644 --- a/docs/functions/user_interaction/key_down.md +++ b/docs/functions/user_interaction/key_down.md @@ -33,7 +33,7 @@ void main() show_game_window("Test Game"); while(true) { -update_game_window(); +wait(5); if(key_down(SDLK_LALT) && key_pressed(SDLK_F4)) { exit(); diff --git a/docs/functions/user_interaction/key_pressed.md b/docs/functions/user_interaction/key_pressed.md index 5a524c7..b7e57a4 100644 --- a/docs/functions/user_interaction/key_pressed.md +++ b/docs/functions/user_interaction/key_pressed.md @@ -33,10 +33,10 @@ void main() show_game_window("Test Game"); while(true) { -update_game_window(); +wait(5); if(key_down(SDLK_LALT) && key_pressed(SDLK_F4)) { -quit(); +exit(); } // Other code goes here. } diff --git a/docs/functions/user_interaction/key_released.md b/docs/functions/user_interaction/key_released.md index 87e27ca..12b6002 100644 --- a/docs/functions/user_interaction/key_released.md +++ b/docs/functions/user_interaction/key_released.md @@ -29,7 +29,7 @@ void main() show_game_window("Test Game"); while(true) { -update_game_window(); +wait(5); if(key_pressed(SDLK_SPACE)) { speak("Space bar pressed."); @@ -40,7 +40,7 @@ speak("Space bar released."); } if(key_pressed(SDLK_ESCAPE)) { -quit(); +exit(); } // Other code goes here. } diff --git a/docs/functions/user_interaction/reset_all_forced_keys.md b/docs/functions/user_interaction/reset_all_forced_keys.md index f8d85a5..e20db9e 100644 --- a/docs/functions/user_interaction/reset_all_forced_keys.md +++ b/docs/functions/user_interaction/reset_all_forced_keys.md @@ -31,7 +31,7 @@ ding.load("c:/windows/media/ding.wav"); show_window("Ding Test"); while(true) { -update_window(); +wait(5); if((time.elapsed_millis<1000)||(!key_down(SDLK_SPACE))) { if(key_pressed(SDLK_ESCAPE)) diff --git a/docs/functions/user_interaction/show_window.md b/docs/functions/user_interaction/show_window.md index b9d23ed..a0d76a0 100644 --- a/docs/functions/user_interaction/show_window.md +++ b/docs/functions/user_interaction/show_window.md @@ -40,8 +40,7 @@ void main() show_window("ngt test window",400,600); while(true) { -delay(5); -update_game_window(); +wait(5); } } ``` diff --git a/docs/general/global_constants.md b/docs/general/global_constants.md index 33cba44..a4ca19a 100644 --- a/docs/general/global_constants.md +++ b/docs/general/global_constants.md @@ -18,6 +18,7 @@ These are properties that can be used globally, meaning from anywhere. | window_title | Sets the title of the current window. | string | | window_closeable | Sets whether the window can be closed using the companation of ALT+F4. | bool | | window_fullscreen | Sets whether the window should be in full screen. | bool | + ## General properties | Property | Description | Type |