awsc.hotkey.HotkeyDisplay

class awsc.hotkey.HotkeyDisplay(*args, holder, session=None, cols=2, highlight_color=None, generic_color=None, **kwargs)

The hotkey display is the display element in the top right, listing valid hotkeys accepted by the current controls on screen. Each element will provider its own hotkey display instance, filled with its own and the global hotkeys.

Attributes:
translationsdict

A mapping of key names to their nicely presentable forms.

holderawsc.termui.control.HotkeyControl

The control whose hotkeys this displays.

colsint

The number of info columns to divide the available space to.

highlight_colorawsc.termui.color.Color

The color of the keys on the hotkey display.

generic_colorawsc.termui.color.Color

The color of the tooltips on the hotkey display.

sessionawsc.session.Session

A reference to the session object.

Methods

add_block(block)

Adds a new child block to this block.

before_paint()

Hook function for acting on the block before any blocks are painted for the current frame.

bottomright()

Returns the coordinates of the bottom right corner of the block.

clear_blocks([tag])

Removes all blocks with the matching tag from the child blocks of this block.

input(key)

Input handler hook function.

opener(*args, caller, **kwargs)

Simplified initializer for a hotkey display, following the patterns defined by other controls.

paint()

Hook function for painting the block.

remove_block(block)

Removes a specific block from this block.

reparent()

Shorthand function for removing a Block from its parent and re-adding it.

topleft()

Returns the coordinates of the top left corner of the block.

on_become_frame

__init__(*args, holder, session=None, cols=2, highlight_color=None, generic_color=None, **kwargs)

Initializes a Control object.

Parameters:
borderawsc.termui.control.Border

The border of the control.

Methods

__init__(*args, holder[, session, cols, ...])

Initializes a Control object.

add_block(block)

Adds a new child block to this block.

before_paint()

Hook function for acting on the block before any blocks are painted for the current frame.

bottomright()

Returns the coordinates of the bottom right corner of the block.

clear_blocks([tag])

Removes all blocks with the matching tag from the child blocks of this block.

input(key)

Input handler hook function.

on_become_frame()

opener(*args, caller, **kwargs)

Simplified initializer for a hotkey display, following the patterns defined by other controls.

paint()

Hook function for painting the block.

remove_block(block)

Removes a specific block from this block.

reparent()

Shorthand function for removing a Block from its parent and re-adding it.

topleft()

Returns the coordinates of the top left corner of the block.

Attributes

border

Returns the border of the control.

corners

Read-only property for calculating the four corners of the block.

height

Read-only property for the height of the block.

inner

Read-only property for calculating the four inner corners of the block.

translations

w_in

Read-only property for the inner width of the block.

width

Read-only property for the width of the block.