CORE/docs/references/Miscellaneous.md
JeremyStarTM 99703cf03e CORE rewrite (#1)
Reviewed-on: StarOpenSource/core#1

Rewrote CORE and improved the startup process and startup time significantly. The documentation has been beefed up too and is now much better. Existing projects may need major refactoring however.
Co-authored-by: JeremyStarTM <jeremystartm@staropensource.de>
Co-committed-by: JeremyStarTM <jeremystartm@staropensource.de>
2023-08-25 14:34:57 +02:00

1.8 KiB

hide
navigation

Miscellaneous (/root/CORE/Miscellaneous)

Contains small methods that do not deserve their own module.

Methods

get_title()

  • returns String
  • description Returns the main window title.
  • note This method simply returns the value of get_tree().root.title and is included here as DisplayServer.window_get_title() does not exist.

get_fps()

  • returns float
  • description Returns the current framerate aka. FPS aka. Frames Per Second
  • note If the delta value (which is used in the calculation) is zero, INF (infinity) will be returned.
    • argument flatten
      • type bool
      • mandatory no, default value is false
      • description The decimal numbers will be removed if true

get_rendertime()

  • returns float
  • description Returns the time in milliseconds it took for Godot to render a frame

get_delta()

  • returns float
  • description Returns the delta value you normally see as a argument in _process()

byte_to_mib()

  • returns float
  • description Converts a number of bytes to a number of Mebibytes.
    • argument bytes
      • type int
      • mandatory yes
      • description The number of bytes
    • argument flatten
      • type bool
      • mandatory no, default value is true
      • description The decimal numbers will be removed if true

flat_float()

  • returns float
  • description Removes all decimal numbers from a floating point number.
    • argument number
      • type float
      • mandatory yes
      • description The floating point number

flat_float_int()

  • returns int
  • description Removes all decimal numbers from a floating point number. Returns a integer instead of a float
    • argument number
      • type float
      • mandatory yes
      • description The floating point number