public ContextFile( string text, IContextListener owner, FieldBinding field = null, ContextFileType type = ContextFileType.Level) : base(owner) { this.itemSize.x = 150f; this.itemSize.y = 16f; this._text = text; this._field = field; this.depth = new Depth(0.8f); this._type = type; this.fancy = true; if (field != null) { return; } this._field = new FieldBinding((object)this, "isChecked"); }
public void Open( string rootFolder, string currentFolder, bool save, bool selectLevels = false, bool loadLevel = true, ContextFileType type = ContextFileType.Level) { this._type = type; this._selectLevels = selectLevels; this._loadLevel = loadLevel; if (this._type == ContextFileType.Block || this._type == ContextFileType.Background || this._type == ContextFileType.Platform) { this._badTileset = new Sprite("badTileset"); } if (this._type == ContextFileType.Parallax) { this._badParallax = new Sprite("badParallax"); } if (this._type == ContextFileType.ArcadeStyle) { this._badArcade = new Sprite("badArcade"); } this._preview = (Tex2D)null; this._previewSprite = (Sprite)null; float num1 = 350f; float num2 = 350f; Vec2 vec2_1 = new Vec2((float)((double)this.layer.width / 2.0 - (double)num1 / 2.0) + this.hOffset, (float)((double)this.layer.height / 2.0 - (double)num2 / 2.0)); Vec2 vec2_2 = new Vec2((float)((double)this.layer.width / 2.0 + (double)num1 / 2.0) + this.hOffset, (float)((double)this.layer.height / 2.0 + (double)num2 / 2.0)); this.position = vec2_1 + new Vec2(4f, 40f); this._save = save; rootFolder = rootFolder.Replace('\\', '/'); currentFolder = currentFolder.Replace('\\', '/'); this._currentDirectory = !(currentFolder == "") ? currentFolder : rootFolder; this._rootFolder = rootFolder; this.SetDirectory(this._currentDirectory); Editor.lockInput = (ContextMenu)this; SFX.Play("openClick", 0.4f); this.opened = true; }
public ContextFile( string text, IContextListener owner, FieldBinding field, ContextFileType type, string valTooltip) : base(owner) { this.itemSize.x = 150f; this.itemSize.y = 16f; this._text = text; this._field = field; this.depth = new Depth(0.8f); this._type = type; this.fancy = true; if (field == null) { this._field = new FieldBinding((object)this, "isChecked"); } this.tooltip = valTooltip; }