class Rosegold::Window

Overview

Slot accessor methods raise an error if the window is not ready. Note that slots are still available even after the window has been closed.

Direct Known Subclasses

Defined in:

rosegold/world/window.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Rosegold::Client, id : UInt8, title : Rosegold::Chat, type_id : UInt32) #

[View source]

Instance Method Detail

def click(slot : WindowSlot, right = false, shift = false, double = false) #

[View source]
def click(slot_number, right = false, shift = false, double = false) #

[View source]
def close #

[View source]
def closed=(closed : Bool) #

If true, this window will never become ready in the future.


[View source]
def closed? : Bool #

If true, this window will never become ready in the future.


[View source]
def content : Array(WindowSlot) #

Slots specific to the window, ie. excluding inventory and hotbar.


[View source]
def cursor : WindowSlot #

[View source]
def cursor=(cursor : WindowSlot) #

[View source]
def drop(slot : WindowSlot, stack_mode : StackMode) #

[View source]
def drop(slot_number, stack_mode : StackMode) #

[View source]
def drop_cursor(stack_mode : StackMode) #

[View source]
def handle_closed #

[View source]
def hotbar : Array(WindowSlot) #

[View source]
def id : UInt8 #

[View source]
def inventory : Array(WindowSlot) #

[View source]
def main_hand : WindowSlot #

[View source]
def ready? #

If true, this window is in sync with the server.


[View source]
def slots : Array(WindowSlot) #

[View source]
def slots=(slots : Array(WindowSlot)) #

[View source]
def state_id : UInt32 #

Used for tracking synchronization with the server.


[View source]
def state_id=(state_id : UInt32) #

Used for tracking synchronization with the server.


[View source]
def swap_hotbar(hotbar_nr, slot : WindowSlot) #

Hotbar starts at 0.


[View source]
def swap_hotbar(hotbar_nr, slot_number) #

Hotbar starts at 0.


[View source]
def swap_off_hand(slot : WindowSlot) #

[View source]
def swap_off_hand(slot_number) #

[View source]
def title : Chat #

[View source]
def to_s(io) #

[View source]
def type_id : UInt32 #

PlayerWindow reuses id 0


[View source]