示例#1
0
 public static void RemoveHighlight()
 {
     if(Highlighted != null){
         colorchar[,] highlight = new colorchar[Highlighted.height,Highlighted.width];
         int hh = Highlighted.height;
         int hw = Highlighted.width;
         int hr = Highlighted.row;
         int hc = Highlighted.col;
         for(int i=0;i<hh;++i){
             for(int j=0;j<hw;++j){
                 highlight[i,j] = Screen.Char(i+hr,j+hc);
             }
         }
         Screen.UpdateGLBuffer(Highlighted.row,Highlighted.col,highlight);
         Highlighted = null;
     }
 }
示例#2
0
 public static void CreateStatsButton(ConsoleKey key_,bool shifted,int row,int height)
 {
     Button[,] buttons = ButtonMap;
     if(buttons[row,0] == null){ //if there's already a button there, do nothing.
         Button b = new Button(key_,false,false,shifted,row,0,height,Global.STATUS_WIDTH);
         for(int i=row;i<row+height;++i){
             for(int j=0;j<Global.STATUS_WIDTH;++j){
                 buttons[i,j] = b;
             }
         }
     }
 }
示例#3
0
 public static void RemoveButton(Button b)
 {
     Button[,] buttons = button_map[button_map.Count-1];
     if(buttons == null){
         return;
     }
     int row = b.rect.Y;
     int col = b.rect.X;
     int height = b.rect.Height;
     int width = b.rect.Width;
     for(int i=row;i<row+height;++i){
         for(int j=col;j<col+width;++j){
             buttons[i,j] = null;
         }
     }
 }
示例#4
0
 public static void CreateMapButton(ConsoleKey key_,bool shifted,int row,int height)
 {
     Button[,] buttons = ButtonMap;
     row += Global.MAP_OFFSET_ROWS;
     int col = Global.MAP_OFFSET_COLS;
     int width = Global.COLS;
     if(buttons[row,col] == null){ //if there's already a button there, do nothing.
         Button b = new Button(key_,false,false,shifted,row,col,height,width);
         for(int i=row;i<row+height;++i){
             for(int j=col;j<col+width;++j){
                 buttons[i,j] = b;
             }
         }
     }
 }