示例#1
0
 public Dialog_DefineBinding(KeyPrefsData keyPrefsData, KeyBindingDef keyDef, KeyPrefs.BindingSlot slot)
 {
     this.keyDef                  = keyDef;
     this.slot                    = slot;
     this.keyPrefsData            = keyPrefsData;
     base.forcePause              = true;
     base.onlyOneOfTypeAllowed    = true;
     base.absorbInputAroundWindow = true;
 }
 public Dialog_DefineBinding(KeyPrefsData keyPrefsData, KeyBindingDef keyDef, KeyPrefs.BindingSlot slot)
 {
     this.keyDef                  = keyDef;
     this.slot                    = slot;
     this.keyPrefsData            = keyPrefsData;
     this.closeOnAccept           = false;
     this.closeOnCancel           = false;
     this.forcePause              = true;
     this.onlyOneOfTypeAllowed    = true;
     this.absorbInputAroundWindow = true;
 }
示例#3
0
        public Dialog_KeyBindings()
        {
            forcePause              = true;
            onlyOneOfTypeAllowed    = true;
            absorbInputAroundWindow = true;
            scrollPosition          = new Vector2(0f, 0f);
            keyPrefsData            = KeyPrefs.KeyPrefsData.Clone();
            contentHeight           = 0f;
            KeyBindingCategoryDef keyBindingCategoryDef = null;

            foreach (KeyBindingDef allDef in DefDatabase <KeyBindingDef> .AllDefs)
            {
                if (keyBindingCategoryDef != allDef.category)
                {
                    keyBindingCategoryDef = allDef.category;
                    contentHeight        += 44f;
                }
                contentHeight += 34f;
            }
        }
        public Dialog_KeyBindings()
        {
            this.forcePause              = true;
            this.onlyOneOfTypeAllowed    = true;
            this.absorbInputAroundWindow = true;
            this.scrollPosition          = new Vector2(0f, 0f);
            this.keyPrefsData            = KeyPrefs.KeyPrefsData.Clone();
            this.contentHeight           = 0f;
            KeyBindingCategoryDef keyBindingCategoryDef = null;

            foreach (KeyBindingDef current in DefDatabase <KeyBindingDef> .AllDefs)
            {
                if (keyBindingCategoryDef != current.category)
                {
                    keyBindingCategoryDef = current.category;
                    this.contentHeight   += 44f;
                }
                this.contentHeight += 34f;
            }
        }