Beispiel #1
0
    public override void onInput(KCode key)
    {
        int newIndex = m_fileName.KeyInput(key, m_curIndex);

        if (newIndex >= 0)
        {
            m_curIndex = newIndex;
        }
        else
        {
            switch (key)
            {
            case KCode.Escape:
                m_stateMgr.GotoState(StateEnums.eStateList);
                return;

            case KCode.Return:
                CodeMgr.SharedInstance.SaveSourceCode(m_fileName.TEXT + ".BAS", m_stateMgr.CUR_SOURCE_CODE);
                m_stateMgr.GotoState(StateEnums.eStateList);
                return;

            default:
                break;
            }
        }

        refresh();
    }