Пример #1
0
 public Panel(String title, 
                   ConsoleColor titleColor, 
                   ConsoleColor fieldsColor, 
                   ConsoleColor valuesColor, 
                   Object obj, 
                   Position position, 
                   Dimensions dimensions, 
                   BorderSymbols borders)
 {
     this.title = title;
     this.titleColor = titleColor;
     this.fieldsColor = fieldsColor;
     this.valuesColor = valuesColor;
     this.obj = obj;
     this.position = position;
     this.dimensions = dimensions;
     this.borders = borders;
     //need to error check here to make sure the position
     //and dimension passed do not exceed the max width
     //of the console screen buffer.
 }
Пример #2
0
        public void initialize()
        {
            fileCollisionMapping        = "collisionMappings.txt";
            fileInput                   = "input.txt";
            fileLevelingStats           = "levelingDefault.txt";
            mapList                     = "mapList.txt";
            NPCDialogFileName           = "NPCDialogStrings.txt";
            isInitialized               = true;

            shotType                    = "FireShot";

            mainWindowDimensions        = new Dimensions(48, 32);
            mainWindowPosition          = new Position((Console.WindowWidth / 2) - (int)Math.Floor((double)(mainWindowDimensions.width / 2)), 1);
            mainWindowBorders           = new BorderSymbols("-", "-", "|", "|", ConsoleColor.Green, ConsoleColor.Green, ConsoleColor.Green, ConsoleColor.Green);
            //mainWindowPosition        = new Position(5, 5);
            subWindowDimensions         = new Dimensions((int) Math.Floor((double)(mainWindowDimensions.width / 2.0)) - 1,(int) Math.Floor((double)(mainWindowDimensions.height / 2.0)) - 1);
            subWindowPosition           = new Position(mainWindowPosition.x + (int)(mainWindowDimensions.width / 2.0) - (int)Math.Floor((double)(subWindowDimensions.width / 2.0)), mainWindowPosition.y + (int)(mainWindowDimensions.height / 2.0) - (int)Math.Floor((double)(subWindowDimensions.height / 2.0)));
            //subWindowPosition         = new Position(10, 10);

            StatsPanel                  = new Position(mainWindowPosition.x + mainWindowDimensions.width + 2, 1);
            //StatsPanel                = new Position(70, 5);
            GameTitle                   = "ASCII RPG: The Last Stance";
            ConsoleBufferWidth          = 100;
            ConsoleBufferHeight         = 80;
            ConsoleWidth                = 80;
            ConsoleHeight               = 50;

            logWindowPosition           = new Position(mainWindowPosition.x, mainWindowPosition.y + mainWindowDimensions.height + 2);
            logWindowDimensions = new Dimensions(mainWindowDimensions.width, 12);

            logTabPanel = new TabPanel();
            logTabPanel.position = new Position(logWindowPosition.x, logWindowPosition.y - 1);

            logTabPanel.addTab(LogTypes.GeneralLog, 'G', "General", ConsoleColor.Magenta);
            logTabPanel.addTab(LogTypes.BattleLog, 'B', "Battle", ConsoleColor.DarkRed);
            logTabPanel.addTab(LogTypes.ChatLog, 'C', "Chat", ConsoleColor.Green);

            ConsoleColor initialLogBorderColor = logTabPanel.tabs.First().Value.Third;
            logWindowBorders = new BorderSymbols("-", "-", "|", "|", initialLogBorderColor, initialLogBorderColor, initialLogBorderColor, initialLogBorderColor);
        }
Пример #3
0
 public Frame(Dimensions dimensions, Position position, BorderSymbols borders)
 {
     this.dimensions = dimensions;
     this.position = position;
     this.borders = borders;
 }
Пример #4
0
 public BorderSymbols(BorderSymbols borders)
 {
     setBorderSymbols(borders.topBorder, borders.bottomBorder, borders.leftBorder, borders.rightBorder);
     setBorderColors(borders.topBorderColor, borders.bottomBorderColor, borders.leftBorderColor, borders.rightBorderColor);
 }