public static void DCGameMessage(string msg, bool lf) { //{ Print a standard text message for the game GearHead.} //{ Set the background color to black.} Crt.TextBackground(Crt.Color.Black); //{ If needed, go to the next line.} if (lf) { DCNewMessage(); } //{ Set the text color.} Crt.TextColor(DCTextColor); //{ Set the window to the desired print area, and move to the right pos.} Crt.Window(WDM.RPGMsg_X, WDM.RPGMsg_Y, WDM.RPGMsg_X2, WDM.RPGMsg_Y2); Crt.GotoXY(GM_X, GM_Y); //{call the Delineate procedure to prettyprint it.} Crt.AutoScrollOn(); Delineate(msg, WDM.RPGMsg_WIDTH, GM_X); Crt.AutoScrollOff(); //{Save the current cursor position.} GM_X = Crt.WhereX(); GM_Y = Crt.WhereY(); //{restore the window to its original, full dimensions.} Crt.Window(1, 1, WDM.CON_WIDTH, WDM.CON_HEIGHT); }
public static void LovelyBox(Crt.Color edgeColor, int x1, int y1, int x2, int y2) { Crt.AutoScrollOff(); //{ Draw a lovely box!} Crt.TextColor(edgeColor); //{ Print the four corners.} Crt.GotoXY(x1, y1); Crt.Write((char)218); Crt.GotoXY(x2, y1); Crt.Write((char)191); Crt.GotoXY(x1, y2); Crt.Write((char)192); Crt.GotoXY(x2, y2); Crt.Write((char)217); //{ Print the two horizontal edges.} for (int x = x1 + 1; x < x2; ++x) { Crt.GotoXY(x, y1); Crt.Write((char)196); Crt.GotoXY(x, y2); Crt.Write((char)196); } //{ Print the two vertical edges.} for (int y = y1 + 1; y < y2; ++y) { Crt.GotoXY(x1, y); Crt.Write((char)179); Crt.GotoXY(x2, y); Crt.Write((char)179); } }
public static void DCNewMessage() { //{ Start a new line in the DCMessage area.} Crt.Window(WDM.RPGMsg_X, WDM.RPGMsg_Y, WDM.RPGMsg_X2, WDM.RPGMsg_Y2); Crt.GotoXY(GM_X, GM_Y); Crt.AutoScrollOn(); if (GM_X != 1) { Crt.Write("\n"); } Crt.TextColor(DCBulletColor); Crt.Write("> "); Crt.AutoScrollOff(); //{ Reset the Cursor Pos.} GM_X = Crt.WhereX(); GM_Y = Crt.WhereY(); Crt.Window(1, 1, WDM.CON_WIDTH, WDM.CON_HEIGHT); }