Skip to content

Conversation

Kekulism
Copy link

No description provided.

Copy link
Member

@GauntletGames-2086 GauntletGames-2086 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition, although this being a separate page seems a bit odd.

More concerned about the API itself being inconsistent with other SMODS object functions, and might need changed before this can be merged (DeckSkin object is passed as 2nd var rather than passing as self).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page should be linked somewhere, otherwise it cannot be accessed on the SMODS wiki.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also considering this not being a dedicated page, and instead all of the details on the functions are on the SMODS.DeckSkin page. Probably better for organization.

- `has_ds_card_ui(card, deckskin, palette)`
- Enable UI on cards in preview
- Called for every currently displayed card in preview
- `generate_ds_card_ui(card, deckskin, palette, info_queue, desc_nodes, specific_vars, full_UI_table)`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both these functions should mention (or link to) the DeckSkin crediting page for extra details.

## Enabling the UI (has_ds_card_ui)
For every palette you define in your DeckSkin, there is the `display_ranks` list that defines which ranks will show in the preview, and in what order. When the preview is shown on screen, `has_ds_card_ui` is called for each card. If the return of the function is `true`, then the UI will be enabled for that card.

Utilizing the `card`, `deckskin`, and `palette` args, you can filter out the enabled ui by checking the rank of the cards, checking the key of the current palette, and more.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably mention what these args are specifically. Someone could be confused as to whether the deckskin refers to the SMODS.DeckSkin object this function is defined on or some other SMODS.DeckSkin object.

```

## Defining the UI (generate_ds_card_ui)
For every card that has its UI enabled by `has_ds_card_ui`, you can define the contents of it with `generate_ds_card_ui`, much like you would define the ui with `generate_ui` in Centers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should link to the generate_ui function documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants