Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • HorizontalMenu

Index

Constructors

  • new HorizontalMenu(game: Game, data: GoldenSun, buttons: string[], titles: string[], callbacks: { on_cancel?: Function; on_press: Function }, title_window_width?: number, dock_right?: boolean): HorizontalMenu

Properties

buttons: { sprite: Sprite; title: string }[]
buttons_keys: string[]
buttons_number: number
custom_scale: { active_default: number; max_scale: number }

Type declaration

  • active_default: number
  • max_scale: number
data: GoldenSun
dock_right: boolean
game: Game
group: Group
menu_active: boolean
menu_open: boolean
on_cancel: Function
on_press: Function
selected_button_index: number
selected_button_tween: Tween
title_text_obj: TextObj
title_window: Window
title_window_width: number
titles: string[]
x: number
y: number

Methods

  • activate(): void
  • change_button(step: number): void
  • close(callback?: Function, animate?: boolean): void
  • deactivate(hide?: boolean): void
  • destroy(): void
  • mount_buttons(filtered_buttons?: string[]): void
  • next_button(): void
  • open(callback?: Function, select_index?: number, start_active?: boolean, custom_scale?: { active_default: number; max_scale: number }, confirm_sfx?: string | (() => string)): void
  • Parameters

    • Optional callback: Function
    • select_index: number = 0
    • start_active: boolean = true
    • Optional custom_scale: { active_default: number; max_scale: number }
      • active_default: number
      • max_scale: number
    • Optional confirm_sfx: string | (() => string)

    Returns void

  • previous_button(): void
  • reset_button(): void
  • set_button(): void
  • set_controls(confirm_sfx?: string | (() => string)): void
  • set_to_position(index: number): void

Generated using TypeDoc