HomeWikiSourceDownloadsDiscord

Kristal Wiki


General Information


These pages get you ready to use the engine.

  • Main Page
  • Downloading Kristal
  • Installing and Playing Projects
  • Glossary

General Project Creation


These pages teach you about project development.

  • Lua Tutorial
  • Understanding the Basics
  • Creating a Project
  • Writing Text
  • Using Libraries
  • Creating an Item
  • Creating a Spell
  • Actors
  • Party Members
  • Custom Keybinds
  • Releasing Projects

The Overworld


Everything to do with the overworld.

  • Designing a Map
  • Cutscenes

Battles


Everything related to creating battles.

  • Battlers
  • Encounters
  • Enemy Attacks (Waves)
  • Wavemaking Tricks and References

Advanced


These pages teach you more complex but powerful parts of the engine.

  • Debugging
  • Hooks
  • The UI System

API Reference


An auto-generated API reference for Kristal.

⮬ Back to Top ⮭

Kristal Wiki


General Information


These pages get you ready to use the engine.

  • Main Page
  • Downloading Kristal
  • Installing and Playing Projects
  • Glossary

General Project Creation


These pages teach you about project development.

  • Lua Tutorial
  • Understanding the Basics
  • Creating a Project
  • Writing Text
  • Using Libraries
  • Creating an Item
  • Creating a Spell
  • Actors
  • Party Members
  • Custom Keybinds
  • Releasing Projects

The Overworld


Everything to do with the overworld.

  • Designing a Map
  • Cutscenes

Battles


Everything related to creating battles.

  • Battlers
  • Encounters
  • Enemy Attacks (Waves)
  • Wavemaking Tricks and References

Advanced


These pages teach you more complex but powerful parts of the engine.

  • Debugging
  • Hooks
  • The UI System

API Reference


An auto-generated API reference for Kristal.

⮬ Back to Top ⮭

AbstractMenuComponent

┗> Component > Object > Class



Constructor


AbstractMenuComponent(x_sizing: Sizing?, y_sizing: Sizing?, options: table?)

Arguments:

x_sizing: Sizing?
y_sizing: Sizing?
options: table?




Methods


AbstractMenuComponent:close()



AbstractMenuComponent:getMenuItems()

Returns:

1: table


AbstractMenuComponent:keepInBounds()



AbstractMenuComponent:keepSelectedOnScreen()



AbstractMenuComponent:next()



AbstractMenuComponent:onAddToStage(stage: Stage)

Arguments:

stage: Stage

The Stage object in Kristal is designed to be the highest parent object at all times.
All throughout gameplay, the active stage is Game.stage, while when in the Kristal menu, Kristal.Stage is the stage instead.



AbstractMenuComponent:onFocused()



AbstractMenuComponent:previous()



AbstractMenuComponent:setScrollType(type: any)

Arguments:

type: any


AbstractMenuComponent:setSelected(item: any)

Arguments:

item: any


AbstractMenuComponent:update()



AbstractMenuComponent:updateSelected(old_item: any)

Arguments:

old_item: any



Fields


AbstractMenuComponent.close_sound: string


AbstractMenuComponent.open_sound: string


AbstractMenuComponent.scroll_type: string|'paged'|'scroll'


AbstractMenuComponent.selected_item: integer



Undocumented



AbstractMenuComponent.close_callback: nil



AbstractMenuComponent.scroll_x: number



AbstractMenuComponent.scroll_y: number


DELTARUNE by Toby Fox. Website designed by NyakoFox. © 2026 Kristal Team. All rights reserved.