CORE/docs/references/events.gd.md
JeremyStarTM 83ea84b9ab Documentation/website release and more
This commit added:
- A website and documentation (two in one) containing a install guide and code references
- Character counting script (count_characters.sh)
- Godot development project support (making a temporary godot project)
- Makefile
2023-07-09 00:16:15 +02:00

2.9 KiB

hide
navigation

Events (core.events)

The Events component makes tracking changes in your application/game easier.

Signals

window_title

  • emitted on window title change
  • argument window_title (type String)
  • argument previous_window_title (type String)

window_size

  • emitted on window size change
  • argument update_coordinate (type String, can be X, Y or BOTH)
  • argument window_size (type Vector2i)
  • argument previous_window_size (type Vector2i)

window_pos

  • emitted on window position change
  • argument update_coordinate (type String, can be X, Y or BOTH)
  • argument window_pos (type Vector2i)
  • argument previous_window_pos (type Vector2i)

logger_all

  • emitted on log output
  • argument type (type String, can be "DIAG", "INFO", "WARN" or "ERROR")
  • argument script (type String)
  • argument message (type String)

logger_diag

  • emitted on diagnostic log output
  • argument script (type String)
  • argument message (type String)

logger_info

  • emitted on informational log output
  • argument script (type String)
  • argument message (type String)

logger_warn

  • emitted on warning log output
  • argument script (type String)
  • argument message (type String)

logger_error

  • emitted on error log output
  • argument script (type String)
  • argument message (type String)

Internal variables

window_title_prev

  • type String
  • default value ""
  • description The previous title.

window_size_x_prev

  • type int
  • default value 0
  • description The previous window size (x coordinate)

window_size_y_prev

  • type int
  • default value 0
  • description The previous window size (y coordinate)

window_pos_x_prev

  • type int
  • default value 0
  • description The previous window position (x coordinate)

window_pos_y_prev

  • type int
  • default value 0
  • description The previous window position (y coordinate)

Internal functions

_ready()

  • returns void
  • description connects the logger's "logevent" signal with the "logger_update()" function

_process()

  • returns void
  • description checks for window title, size and position changes and emits a signal if one changes
    • argument _delta
      • type float
      • mandatory yes
      • description The delta value passed by the engine

logger_update()

  • returns void
  • description emits "logger_all" signal and checks against type and sends the corresponding "logger_<TYPE>" signal
    • argument type
      • type String
      • mandatory yes
      • description The log type
    • argument script
      • type String
      • mandatory yes
      • description The script responsible for the log output
    • argument message
      • type String
      • mandatory yes
      • description The log message
    • argument _logmessage
      • type String
      • mandatory yes
      • description The printed (processed) log message