Class: SDC::Window

Inherits:
Object
  • Object
show all
Defined in:
engine_docs/automatic_doc_Window.rb,
engine_docs/automatic_doc_Window.rb

Overview

The basic window class everything gets drawn on

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, width, height, fullscreen = false) ⇒ Window

Creates a window with the given properties

Parameters:

  • title (String)
  • width (Integer)
  • height (Integer)
  • fullscreen (Boolean) (defaults to: false)


# File 'engine_docs/automatic_doc_Window.rb', line 9

Instance Attribute Details

#heightInteger

The height of the window

Returns:

  • (Integer)


# File 'engine_docs/automatic_doc_Window.rb', line 22

#vertical_sync_enabledBoolean

Uses VSync to display frames at a stable framerate (disabled by default)

Returns:

  • (Boolean)


# File 'engine_docs/automatic_doc_Window.rb', line 52

#visibleBoolean

Sets the visibility of the window

Returns:

  • (Boolean)


# File 'engine_docs/automatic_doc_Window.rb', line 77

#widthInteger

The width of the window

Returns:

  • (Integer)


# File 'engine_docs/automatic_doc_Window.rb', line 18

Instance Method Details

#clearnil

Clears all content on the window

Returns:

  • (nil)


# File 'engine_docs/automatic_doc_Window.rb', line 26

#closenil

Closes the window

Returns:

  • (nil)


# File 'engine_docs/automatic_doc_Window.rb', line 61

#draw(object, z, render_states = nil) ⇒ true

Draws the given object to the window at the given z position

Parameters:

Returns:

  • (true)


# File 'engine_docs/automatic_doc_Window.rb', line 93

#draw_translated(object, z, offset, render_states = nil) ⇒ true

Draws the given object to the window at the given z position with the given offset

Parameters:

Returns:

  • (true)


# File 'engine_docs/automatic_doc_Window.rb', line 101

#has_focus?Boolean

Returns true if the window is focussed

Returns:

  • (Boolean)


# File 'engine_docs/automatic_doc_Window.rb', line 72

#imgui_defined?Boolean

Returns true if imgui is active

Returns:

  • (Boolean)


# File 'engine_docs/automatic_doc_Window.rb', line 36

#is_open?Boolean

Returns true if the window is open

Returns:

  • (Boolean)


# File 'engine_docs/automatic_doc_Window.rb', line 56

#poll_eventEvent|nil

Polls for an event in the event queue and returns nil otherwise

Returns:



# File 'engine_docs/automatic_doc_Window.rb', line 88

#render_and_displaynil

Applies the render queue and displays the window

Returns:

  • (nil)


# File 'engine_docs/automatic_doc_Window.rb', line 31

#set_imgui_scale(scale) ⇒ nil

Sets the global imgui scale (default 1.0)

Parameters:

  • scale (Float)

Returns:

  • (nil)


# File 'engine_docs/automatic_doc_Window.rb', line 46

#set_view(view) ⇒ nil

Sets the current view of the window

Parameters:

Returns:

  • (nil)


# File 'engine_docs/automatic_doc_Window.rb', line 66

#update_imguinil

Updates imgui drawing routines

Returns:

  • (nil)


# File 'engine_docs/automatic_doc_Window.rb', line 41

#use_view(view) {|nil| ... } ⇒ nil

Sets the window view to the given value for the given block

Parameters:

Yields:

  • (nil)

Returns:

  • (nil)


# File 'engine_docs/automatic_doc_Window.rb', line 81