/* * Initialize all game data */ public void GameInit() { //Console.SetBufferSize(120, 55); //Console.SetWindowSize(120, 55); Console.Title = "Crystals Of Time v." + typeof(Program).Assembly.GetName().Version.ToString(); Console.CursorVisible = false; Console.TreatControlCAsInput = true; string path = System.Diagnostics.Process.GetCurrentProcess().ProcessName; path += ".cfg"; language = loadConfig(path); Lang = new Strings("Data\\" + language + ".lng"); topTextArea = new TextArea(1,1,110,3); bottomPanel = new StatusPanel(0, 51, 110, 4); //time = new Time(); startFlowOfTime = false; leveledUp = false; //turnCounter = 0; ItemsDataTable = Item.ParseItemsFile("Data\\Items\\misc.txt"); ArmorsDataTable = Item.ParseItemsFile("Data\\Items\\armors.txt"); WeaponsDataTable = Item.ParseItemsFile("Data\\Items\\weapons.txt"); start_screen(); news_screen(); main_menu(); keywindows = new KeyBindingsWindow(20, 10, 75, 27, Lang[StringName.KEYBINDINGS_WND_TITLE]); pcsheetwindow = new CharacterInfoWindow(1, 5, 91, 35, Lang[StringName.PCINFO_WND_TITLE]); backpackwindow = new BackpackWindow(1, 5, 90, 35, Lang[StringName.BACKPACK_WND_TITLE]);//90 inventorywindow = new InventoryWindow(3, 5, 90, 39, Lang[StringName.INVENTORY_WND_TITLE]); detailswindow = new DetailsWindow(75, 10, 40, 20, Lang[StringName.DETAILS_WND_TITLE]); damagetypewindow = new ChangeAttackTypeWindow(30, 10, 45, 10, Lang[StringName.ATTACKTYPE_WND_TITLE]); levelupwindow = new LevelUpWindow(20, 10, 55, 30, Lang[StringName.LEVELUP_WND_TITLE]); }
public void ShowWindow(Character pc, DetailsWindow child) { _pc = pc; _child = child; base.drawWindow(); drawText(); windowLoop(); }
//CONSTRUCTORS public InventoryWindow(int left, int top, int width, int height, string title) : base(left, top, width, height, title) { _child = null; }
//CONSTRUCTORS public BackpackWindow(int left, int top, int width, int height, string title) : base(left, top, width, height, title) { _child = null; }
public void ShowWindow(Character pc, WindowMode mode = WindowMode.DISPLAY, int slotID = 0, DetailsWindow child = null) { _pc = pc; cursorPos = 0; _windowmode = mode; _slotID = slotID; _child = child; pack = _pc.Backpack.Items; if (mode == WindowMode.DISPLAY) { _title = Game.Lang[StringName.BACKPACK_WND_TITLE]; } else if (mode == WindowMode.DROP) { _title = Game.Lang[StringName.BACKPACK_WND_TITLE_DROP]; } else { _title = Game.Lang[StringName.BACKPACK_WND_TITLE_EQUIP]; SlotType st = EquipmentSlot.GetSlotType(_slotID); pack = _pc.Backpack.GetItemsBySlot(st); } base.drawWindow(); drawText(); windowLoop(); }