// Use this for initialization
    void Awake()
    {
        input  = GetComponent <UIInput>();
        filter = GetComponent <InputBoxFilter>();

        //The type doesn't change during runtime, so we can just set it here
        if (panel.varData.type == SubactionVarType.FLOAT)
        {
            filter.filterType = InputBoxFilter.FilterType.DECIMAL;
        }
        else if (panel.varData.type == SubactionVarType.INT)
        {
            filter.filterType = InputBoxFilter.FilterType.INT;
        }
        else
        {
            filter.filterType = InputBoxFilter.FilterType.NONE;
        }

        //We need to change the text without firing another update, so unready then re-ready after setting
        ready       = false;
        input.value = panel.varData.data;
        ready       = true;
    }
Example #2
0
 private void Awake()
 {
     input  = GetComponent <UIInput>();
     filter = GetComponent <InputBoxFilter>();
 }