Constants

Some constants can help you to work with the GM-I18n API. They are used to define specific behaviors or properties of the API.


I18N_DRAWING

The I18N_DRAWING constant is used to define the type of drawing preset member in the I18nDrawings struct.

Values

Enum
enum I18N_DRAWING {
    FONT,
    HALIGN,
    VALIGN,
    COLOR,
    SCALE,
    ROTATION,
    ALPHA,
    SEP,
    WIDTH
}

Used By

i18n_get_drawings_data()

Examples

Create Event
// assume the system is initialized on global variable
// assume you have added the "header", "body", and "button" drawing presets

// get the font asset from "header" drawing preset in "en" locale (static)
var font = i18n_get_drawings_data("header", I18N_DRAWING.FONT, "en");

// get the text separation from "body" drawing preset in current locale (dynamic)
var sep = i18n_get_drawings_data("body", I18N_DRAWING.SEP);

I18N_DRAW_TEXT

Internal   The I18N_DRAW_TEXT constant is used to define the type of draw_text_* function used by the i18n_draw_message() function.

Values

Enum
enum I18N_DRAW_TEXT {
    NORMAL,
    EXTENDED,
    COLORED,
    TRANSFORMED,
    EXT_COLORED,
    EXT_TRANSFORMED,
    TRANSFORMED_COLORED,
    EXT_TRANSFORMED_COLORED
}

Used By

I18nDrawings Internal
i18n_draw_message()

This constant is used internally by thei18n_draw_message()function. You don't need to use it directly.

I18N_REF

The I18N_REF constant is used to define the type of reference created by the i18n_create_ref_message() and i18n_create_ref_asset() functions.

Values

Enum
enum I18N_REF {
    ALL,
    MESSAGES,
    ASSETS
}

Used By

i18n_update_refs()

Examples

Key Pressed - Space
// update the references without changing the locale
i18n_update_refs(I18N_REF.ALL);             // update all references (message and asset)
i18n_update_refs(I18N_REF.MESSAGES);        // update only message references
i18n_update_refs(I18N_REF.ASSETS);          // update only asset references

  You may rarely use these constants, but it's good to know them!