public override void Update(Vector2 OFFSET) { pos = new Vector2(Globals.screenWidth / 2 + Indent * 15 - rightBorder, 100 + ID * 32); text.pos = new Vector2(20 + Indent * 30, 92 + ID * 32); dim = new Vector2(Globals.screenWidth - 20 - rightBorder * 2 - Indent * 30, 30); sizeTxt.pos.Y = 92 + ID * 32; sizeTxt.pos.X = Globals.screenWidth - 150 - rightBorder; percentTxt.pos.Y = 92 + ID * 32; percentTxt.pos.X = Globals.screenWidth - 250 - rightBorder; sizeTxt.Update(OFFSET); text.Update(OFFSET); percentTxt.Update(OFFSET); base.Update(OFFSET); }
public override void Update(Vector2 OFFSET) { try { text.txt = (Globals.curDir == "") ? Globals.currentNode.path : "processing: " + Globals.curDir; } catch { text.txt = "Select Folder"; } if (Globals.GetBoxOverlap((pos - dim / 2) + OFFSET, dim, Globals.mouse.newMousePos, Vector2.Zero) && Globals.curDir == "") { color = new Color(50, 50, 50, 50); if (Globals.mouse.LeftClick()) { using (var dialog = new FolderBrowserDialog()) { if (DialogResult.OK == dialog.ShowDialog()) { Globals.currentNode = new DirectoryNode(null, dialog.SelectedPath, false); main.SwitchDirectory(Globals.currentNode); } } } } else { color = new Color(50, 50, 50, 80); } pos = new Vector2(Globals.screenWidth / 2 - 40, 20); dim = new Vector2(Globals.screenWidth - 100, 30); //60 text.Update(OFFSET); cdbtn.pos = new Vector2(Globals.screenWidth - 88 + cdbtn.dim.X / 2, pos.Y); cdbtn.dim = new Vector2(40, 30); if (Globals.curDir == "") { cdbtn.Update(OFFSET); } try { cdbtn.node = Globals.currentNode.parent; } catch { } base.Update(OFFSET); }