MerchantTabType - jimdroberts/FishMMO GitHub Wiki

Description

Specifies the types of tabs available in a merchant's UI, representing different categories of goods or services.


Basic Usage

Setup

  1. Use the MerchantTabType enum to represent the current tab or category in a merchant's UI.
  2. Assign values such as None, Ability, AbilityEvent, or Item to indicate the selected tab.

Example

// Example 1: Setting the current tab in the merchant UI
MerchantTabType currentTab = MerchantTabType.Item;

// Example 2: Checking the selected tab
if (currentTab == MerchantTabType.Ability) {
    // Show abilities for sale
}

Best Practices

  • Use MerchantTabType to clearly define and check the current category in merchant UIs.
  • Prefer using the enum values (None, Ability, AbilityEvent, Item) for clarity and maintainability.
  • Store the selected tab in UI state or merchant logic for efficient lookups and updates.
⚠️ **GitHub.com Fallback** ⚠️