-
Notifications
You must be signed in to change notification settings - Fork 3
Galdur API
Adding pages to the Galdur system requires knowledge of the games UI elements. If you are unsure of this, I am happy to help you create your page
Adding your page to Galdur requires you to use the following function.
Galdur.add_new_page(args)
The args
of this function should be in the following format:
args = {
name = 'loc_key', -- this name is displayed on the next page button
description = 'function to return UIElement',
pre_start = 'function to run before game is started',
post_start = 'function to run after game is started',
confirm = 'function to run on page confirm',
quick_start_text = 'function that returns the text to add to the tooltip'
}
The name
and description
arguments are required.
Your page function must return a UIElement to be added to the Galdur system.
You can include the Galdur deck preview and chip tower in your page by using these functions.
Galdur.include_deck_preview()
- put this at the start of your page function if you want to include the deck preview
Galdur.include_chip_tower()
- put this at the start of your page function if you want to include the chip tower
Galdur.display_deck_preview()
- use this in your UIElement to display the deck preview
Galdur.display_chip_tower()
- use this in your UIElement to display the chip tower
If you need to access the selected deck and stake, you can use Galdur.run_setup.choices.deck
or Galdur.run_setup.choices.stake
respectively. If you need to pass any variables to Game:start_run
function, you can either use global variables, or add them to Galdur.run_setup.choices
.
Cryptid Compat
If your page displays card objects, you can add galdur_selector = true
to the card config to make sure Cryptid does not force it's shaders to apply to your objects.
If you are struggling to add your page to Galdur, please DM me on Discord and I will be more than happy to help out