Sprite dB: Difference between revisions

From Intrigues Wiki
No edit summary
Line 1: Line 1:
= 🖼️ Sprite Database (SpriteDb) =
= 🖼️ Sprite Database (SpriteDb) =
The '''SpriteDb''' window allows you to organize, tag, and categorize sprites visually for use with Intrigues.
The '''SpriteDb''' window allows you to organize, tag, and categorize sprites visually for use with Intrigues.[[File:Sprite dB.png|thumb|Sprite dB]]Use it to define visual assets like character portraits, icons, and UI elements grouped by logic or theme.
 
Use it to define visual assets like character portraits, icons, and UI elements grouped by logic or theme.
----
----


Line 55: Line 53:
public static Sprite GetAsset(string category, params string[] tags);  
public static Sprite GetAsset(string category, params string[] tags);  
var portrait = IM.GetAsset("Portraits", "Female", "Imperian");
var portrait = IM.GetAsset("Portraits", "Female", "Imperian");
</syntaxhighlight>
</syntaxhighlight>Use SpriteDb to create a structured, taggable asset pool for all your dynamic portrait, faction, and context-based sprite needs.
----
 
== 📷 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.

Sprite dB

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");

Use SpriteDb to create a structured, taggable asset pool for all your dynamic portrait, faction, and context-based sprite needs.