Manual_Input.cpp 873 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (c) 2008-2023 the Urho3D project
  2. // License: MIT
  3. #include "../Precompiled.h"
  4. #include "../AngelScript/APITemplates.h"
  5. #include "../AngelScript/Manual_Input.h"
  6. namespace Urho3D
  7. {
  8. // This function is called before ASRegisterGenerated()
  9. void ASRegisterManualFirst_Input(asIScriptEngine* engine)
  10. {
  11. }
  12. // ========================================================================================
  13. // template <class T> T* Context::GetSubsystem() const | File: ../Core/Context.h
  14. static Input* GetInput()
  15. {
  16. return GetScriptContext()->GetSubsystem<Input>();
  17. }
  18. // This function is called after ASRegisterGenerated()
  19. void ASRegisterManualLast_Input(asIScriptEngine* engine)
  20. {
  21. // template <class T> T* Context::GetSubsystem() const | File: ../Core/Context.h
  22. engine->RegisterGlobalFunction("Input@+ get_input()", AS_FUNCTION(GetInput), AS_CALL_CDECL);
  23. }
  24. }