Conversation
GauntletGames-2086
left a comment
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
This page should be linked somewhere, otherwise it cannot be accessed on the SMODS wiki.
There was a problem hiding this comment.
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)` |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Should link to the generate_ui function documentation.
No description provided.