Sprite dB: Difference between revisions
Tayfunwiki (talk | contribs) (Created page with "..") |
Tayfunwiki (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
.. | = 🖼️ Sprite Database (SpriteDb) = | ||
The '''SpriteDb''' window allows you to organize, tag, and categorize sprites visually for use with Intrigues. | |||
Use it to define visual assets like character portraits, icons, and UI elements grouped by logic or theme. | |||
---- | |||
== 📂 Categories == | |||
Sprites are grouped under '''Categories'''. You can create new categories via the '''New Category''' input at the top. | |||
To add sprites to a category: | |||
* Simply '''drag and drop''' Sprite assets from the Project window onto the desired category section. | |||
---- | |||
== 🏷️ Tags == | |||
Each sprite can be assigned '''Tags''' to help with sorting, filtering, and runtime querying. | |||
To add a tag: | |||
* '''Right-click''' a sprite → select '''Add Tag''' | |||
To assign an existing tag: | |||
* '''Drag the tag''' onto one or multiple selected sprites | |||
* Use '''Shift + Click''' or '''Ctrl + Click''' to make multi-selection | |||
To hide tags: | |||
* '''Hold <code>Ctrl</code>''' → tag labels will toggle visibility | |||
---- | |||
== 🖱️ Selection Controls == | |||
* '''Shift + Left Click''' → Multi-select range | |||
* '''Ctrl + Left Click''' → Multi-select individual | |||
---- | |||
== 🔍 Search == | |||
Use the search bar to quickly filter sprites by name or tag. | |||
---- | |||
== 🧠 Usage in Runtime == | |||
You can retrieve sprites at runtime via: | |||
=== GetAssets (returns a list): === | |||
<syntaxhighlight lang="c#"> | |||
var portraits = IM.GetAssets("Portraits", "Male", "Northlander"); | |||
</syntaxhighlight> | |||
=== GetAsset (returns one result): === | |||
<syntaxhighlight lang="c#"> | |||
public static Sprite GetAsset(string category, params string[] tags); | |||
var portrait = IM.GetAsset("Portraits", "Female", "Imperian"); | |||
</syntaxhighlight> | |||
---- | |||
== 📷 Interface Preview == | |||
[[File:Sprite dB.png|thumb|Sprite dB]] | |||
----Use SpriteDb to create a structured, taggable asset pool for all your dynamic portrait, faction, and context-based sprite needs. |
Revision as of 13:24, 29 May 2025
🖼️ Sprite Database (SpriteDb)
The SpriteDb window allows you to organize, tag, and categorize sprites visually for use with Intrigues.
Use it to define visual assets like character portraits, icons, and UI elements grouped by logic or theme.
📂 Categories
Sprites are grouped under Categories. You can create new categories via the New Category input at the top.
To add sprites to a category:
- Simply drag and drop Sprite assets from the Project window onto the desired category section.
🏷️ Tags
Each sprite can be assigned Tags to help with sorting, filtering, and runtime querying.
To add a tag:
- Right-click a sprite → select Add Tag
To assign an existing tag:
- Drag the tag onto one or multiple selected sprites
- Use Shift + Click or Ctrl + Click to make multi-selection
To hide tags:
- Hold
Ctrl
→ tag labels will toggle visibility
🖱️ Selection Controls
- Shift + Left Click → Multi-select range
- Ctrl + Left Click → Multi-select individual
🔍 Search
Use the search bar to quickly filter sprites by name or tag.
🧠 Usage in Runtime
You can retrieve sprites at runtime via:
GetAssets (returns a list):
var portraits = IM.GetAssets("Portraits", "Male", "Northlander");
GetAsset (returns one result):
public static Sprite GetAsset(string category, params string[] tags);
var portrait = IM.GetAsset("Portraits", "Female", "Imperian");
📷 Interface Preview
Use SpriteDb to create a structured, taggable asset pool for all your dynamic portrait, faction, and context-based sprite needs.