#include "fcb_inc_vars"
#include "fcb_inc_cvdisp"

//==========================================/
void main()
//==========================================/
    {
    string CMD_TXT_QUOTE = GetLocalString(FCB_HOST, CMD_QUOTE);
    string BULLET_POINT = c_hid("**");

    string SETCOLOR = CMD_TXT_QUOTE + "setcolor" + CMD_TXT_QUOTE;
    string CONCAT = CMD_TXT_QUOTE + "concat" + CMD_TXT_QUOTE;
    string SETCGRD = CMD_TXT_QUOTE + "setcgrd" + CMD_TXT_QUOTE;

    string temp0 = set_string_color("setcolor(" + CMD_TXT_QUOTE + "Apple" + CMD_TXT_QUOTE + ", 255, 0, 0)", 0, 200, 200);
    string temp1 = set_string_color("setcolor(" + CMD_TXT_QUOTE + "Orange" + CMD_TXT_QUOTE + ", 220, 140, 50)", 0, 200, 200);

    string temp2 = set_string_color("setcgrd(" + CMD_TXT_QUOTE + "Evil Looki" + CMD_TXT_QUOTE + ", 200, 0, 0, 0, 0, 0)", 0, 200, 200);
    string temp3 = set_string_color("setcgrd(" + CMD_TXT_QUOTE + "ng Club +4" + CMD_TXT_QUOTE + ", 0, 0, 0, 200, 0, 0)", 0, 200, 200);

    string disp_txt =
    BULLET_POINT + "NOTE: This guide will cover the various uses of custom colors in item name text. To use default white text simply type the desired name as is in the chat bar and hit enter to procede." + UI_TXT_INDENT2 +

    c_hlt2("--==== Part I: Using " + SETCOLOR + " ====--") + UI_TXT_INDENT2 +

    "IGIPE provides an easy method for setting item names in various colored text. To do this first go back to main menu and select " + CMD_TXT_QUOTE + UI_TXT_SETNAME_ENTER + CMD_TXT_QUOTE + ". The following message will be displayed:" + UI_TXT_INDENT2 +
    c_hdr1(UI_TXT_SETNAME_NONE) + UI_TXT_INDENT2 +
    BULLET_POINT + "Enter the following command in the chat bar:" + UI_TXT_INDENT +
    c_hlt1("%setcolor(" + CMD_TXT_QUOTE + "item_name" + CMD_TXT_QUOTE + ", rval, gval, bval)") + UI_TXT_INDENT +
    "where rval, gval and bval correspond to red, green and blue intensities respectively on a scale of 0 to 255." + UI_TXT_INDENT2 +

    "Examples:" + UI_TXT_INDENT +
    c_hlt1("%setcolor(" + CMD_TXT_QUOTE + "Bloody Dagger" + CMD_TXT_QUOTE + ", 255, 0, 0)") + UI_TXT_INDENT +
    "will show up as " + set_string_color("Bloody Dagger", 260, 0, 0) + UI_TXT_INDENT +
    c_hlt1("%setcolor(" + CMD_TXT_QUOTE + "Banana Kukri" + CMD_TXT_QUOTE + ", 255, 255, 0)") + UI_TXT_INDENT +
    "will show up as " + set_string_color("Banana Kukri", 260, 260, 0) + UI_TXT_INDENT2 +

    c_hlt2("--==== Part II: Using " + CONCAT + " ====--") + UI_TXT_INDENT2 +

    "The " + CONCAT + " function connects multiple strings together to create one string." + UI_TXT_INDENT2 +
    "For example:" + UI_TXT_INDENT +
    c_hlt1("%concat(" + CMD_TXT_QUOTE + "Apple" + CMD_TXT_QUOTE + ", " + CMD_TXT_QUOTE + "Orange" + CMD_TXT_QUOTE + ")") + UI_TXT_INDENT +
    "will show up as AppleOrange, which is actually just the same as having entered " + CMD_TXT_QUOTE + "AppleOrange" + CMD_TXT_QUOTE + "." + UI_TXT_INDENT2 +
    "So what is the point of this?" + UI_TXT_INDENT2 +
    BULLET_POINT + "This function is useful for nesting " + SETCOLOR + " as follows:" + UI_TXT_INDENT +
    c_hlt1("%concat(") + temp0 + c_hlt1(", ") + temp1 + c_hlt1(")") + UI_TXT_INDENT +
    "which shows up as " + set_string_color("Apple", 260, 0, 0) + set_string_color("Orange", 220, 140, 50) + "." + UI_TXT_INDENT2 +
    BULLET_POINT + "Note that any number of strings may be connected together using " + CONCAT + ". Each string should be seperated by a comma as follows:" + UI_TXT_INDENT +
    c_hlt1("%concat(" + CMD_TXT_QUOTE + "s0" + CMD_TXT_QUOTE + ", " + CMD_TXT_QUOTE + "s1" + CMD_TXT_QUOTE + ", " + CMD_TXT_QUOTE + "s2" + CMD_TXT_QUOTE + ", ... , " + CMD_TXT_QUOTE + "sn" + CMD_TXT_QUOTE + ")") + UI_TXT_INDENT2 +

    c_hlt2("--==== Part III: Using " + SETCGRD + " ====--") + UI_TXT_INDENT2 +

    "The " + SETCGRD + " function generates a color gradation from one color to another as follows:" + UI_TXT_INDENT +
    set_gradation("Elite Banana Kukri +13", 260, 260, 0, 260, 260, 260) + UI_TXT_INDENT2 +
    BULLET_POINT + "The following command is used:" + UI_TXT_INDENT +
    c_hlt1("%setcgrd(" + CMD_TXT_QUOTE + "item_name" + CMD_TXT_QUOTE + ", r1, g1, b1, r2, g2, b2)") + UI_TXT_INDENT +
    "where r1, g1, b1 correspond to the RGB values (0-255) of the left most color and r2, g2, b2 correspond to the RGB values (0-255) of the right most color." + UI_TXT_INDENT2 +
    "For example:" + UI_TXT_INDENT +
    c_hlt1("%setcgrd(" + CMD_TXT_QUOTE + "Evil Looking Club +4" + CMD_TXT_QUOTE + ", 200, 0, 0, 0, 0, 0)") + UI_TXT_INDENT +
    "will show up as " + set_gradation("Evil Looking Club +4", 200, 0, 0, 0, 0, 0) + UI_TXT_INDENT2 +
    "Finally, mixing with " + CONCAT + " as follows:" + UI_TXT_INDENT +
    c_hlt1("%concat(") + temp2 + c_hlt1(", ") + temp3 + c_hlt1(")") + UI_TXT_INDENT +
    "will show up as " + set_gradation("Evil Looki", 200, 0, 0, 0, 0, 0) + set_gradation("ng Club +4", 0, 0, 0, 200, 0, 0) + UI_TXT_INDENT2 +

    c_hlt2("--==== Some Comments ====--") + UI_TXT_INDENT2 +

    BULLET_POINT + "Color accuracy in IGIPE is VERY POOR to NON-EXSISTENT. The above functions all work on a scale of 0 to 255 but there are actually only about 17 values per color channel." + UI_TXT_INDENT2 +

    "";

    //--------------------------------------/
    ui_set_active_disp_index();
    ui_disp_set_txt(DISP_INDEX_LOCAL1, "", disp_txt);
    ui_disp_state_new(DISP_INDEX_LOCAL1, 1);
    }
