Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deck Skins - Suit Label Colors and UI Suit Icons #289

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Kekulism
Copy link

@Kekulism Kekulism commented Nov 1, 2024

Adding onto OneSuchKeeper's previous PR, this adds support for changing suit label colors and suit icons in the Full Deck menu for the DeckSkin GameObject.

These extra options get loaded/refreshed when the main menu loads, when the player changes their deck skin, or when the player toggles high contrast colors. If the current skin is default or a Friends of Jimbo collab, the colors and icons reset to default (this is also future-proofed for if any future collabs are added).

The DeckSkin API now accepts:

  • lc_colour - Optional - The color of the skin's suit label that is shown in card descriptions. Accepts the hex table (ex: HEX("e14e62") ), but will also accept a string containing the hex code.
  • hc_colour - Optional - The color of the skin's suit label that is shown in card descriptions when the high contrast colors setting is on. Accepts the hex table (ex: HEX("e14e62") ), but will also accept a string containing the hex code.
  • lc_ui_atlas - Optional - The name of the atlas used for the skin's suit's icon in the Full Deck menu
  • hc_ui_atlas - Optional - The name of the atlas used for the skin's suit's icon in the Full Deck menu when the high contrast colors setting is on. If missing the lc_ui_atlas will be used instead.
  • ui_pos - Optional - A table containing the x and y position of the skin's suit's icon in the atlases specified in lc_ui_atlas and/or hc_ui_atlas

--Usage Example--
SMODS.Atlas{
key = "lc_icons",
path = "lc_Icons.png",
px = 18,
py = 18,
atlas_table = 'ASSET_ATLAS'
}

SMODS.Atlas{
key = "hc_icons",
path = "hc_Icons.png",
px = 18,
py = 18,
atlas_table = 'ASSET_ATLAS'
}

SMODS.Atlas{
key = "myLowContrast",
path = "myLowContrast.png",
px = 71,
py = 95,
atlas_table = 'ASSET_ATLAS'
}

SMODS.Atlas{
key = "myHighContrast",
path = "myHighContrast.png",
px = 71,
py = 95,
atlas_table = 'ASSET_ATLAS'
}

SMODS.DeckSkin{
key = "myDeckSkin",
suit = 'Spades',
ranks = { '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', "King", "Ace" },
hc_atlas = "myHighContrast",
lc_atlas = "myLowContrast",
loc_txt = {
['en-us'] = 'My Cool Deck Skin!'
},
posStyle = 'suit',
lc_colour = "e886f7",
hc_colour = "ab2abf",
lc_ui_atlas = "lc_icons",
hc_ui_atlas = "hc_icons",
ui_pos = { x = 0, y = 0 }
}

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.

1 participant