Differences From Artifact [32e0c6f4fbd77c98]:
- File        
src/gui.d
- 2012-07-14 17:38:38 - part of checkin [deca17f61a] on branch trunk - trampoline map supported. (user: kinaba) [annotate]
 
To Artifact [8a1eba48f0346eec]:
- File        
src/gui.d
- 2012-07-14 17:43:01 - part of checkin [71cbce70b5] on branch trunk - Changed a corp symbol from 'D' to 'd' for avoid conflict. (user: kinaba) [annotate]
 
   60                  this.setStyle(ControlStyles.OPAQUE, true);                            60                  this.setStyle(ControlStyles.OPAQUE, true);
   61                  this.font = new Font("MS Gothic", cell-2, GraphicsUnit.PIXEL);        61                  this.font = new Font("MS Gothic", cell-2, GraphicsUnit.PIXEL);
   62                  this.backColor = Color(255,255,255);                                  62                  this.backColor = Color(255,255,255);
   63                  this.colors['#'] =                                                    63                  this.colors['#'] =
   64                  this.colors['.'] = Color(255,191,127);                                64                  this.colors['.'] = Color(255,191,127);
   65                  this.colors['*'] = Color(255,127,127);                                65                  this.colors['*'] = Color(255,127,127);
   66                  this.colors['R'] = Color(128,128,0);                                  66                  this.colors['R'] = Color(128,128,0);
   67                  this.colors['D'] = Color(255,0,0);                               |    67                  this.colors['d'] = Color(255,0,0);
   68                  this.colors['\\'] =                                                   68                  this.colors['\\'] =
   69                  this.colors['L'] =                                                    69                  this.colors['L'] =
   70                  this.colors['O'] = Color(127,255,127);                                70                  this.colors['O'] = Color(127,255,127);
   71                  this.colors['W'] = Color(204,229,255);                                71                  this.colors['W'] = Color(204,229,255);
   72                  foreach(char c; 'A'..'J') this.colors[c] = Color(142,142,255);        72                  foreach(char c; 'A'..'J') this.colors[c] = Color(142,142,255);
   73                  foreach(char c; '1'..':') this.colors[c] = Color(255,142,255);        73                  foreach(char c; '1'..':') this.colors[c] = Color(255,142,255);
   74                  this.render['#'] = "■";                                               74                  this.render['#'] = "■";
   75                  this.render['*'] = "✹";                                               75                  this.render['*'] = "✹";
   76                  this.render['.'] = "♒";                                               76                  this.render['.'] = "♒";
   77                  this.render['\\'] = "λ";                                              77                  this.render['\\'] = "λ";
   78                  this.render['R'] = "☃";                                               78                  this.render['R'] = "☃";
   79                  this.render['D'] = "☠";                                          |    79                  this.render['d'] = "☠";
   80                  this.render['L'] = "☒";                                               80                  this.render['L'] = "☒";
   81                  this.render['O'] = "☐";                                               81                  this.render['O'] = "☐";
   82                  foreach(c,tp; g.map.tr_target) {                                      82                  foreach(c,tp; g.map.tr_target) {
   83                          char d = g.map[tp];                                           83                          char d = g.map[tp];
   84                          this.render[c] = [cast(dchar)('㋀'+d-'1')].to!string();        84                          this.render[c] = [cast(dchar)('㋀'+d-'1')].to!string();
   85                  }                                                                     85                  }
   86                  foreach(char c; '1'..':') this.render[c] = [cast(dchar)('㏠'+c-'1      86                  foreach(char c; '1'..':') this.render[c] = [cast(dchar)('㏠'+c-'1
................................................................................................................................................................................
  104                  // Paint map.                                                        104                  // Paint map.
  105                  for(int y=1; y<=g.map.H; ++y)                                        105                  for(int y=1; y<=g.map.H; ++y)
  106                  for(int x=1; x<=g.map.W; ++x) {                                      106                  for(int x=1; x<=g.map.W; ++x) {
  107                          Rect r = Rect(cell*(x-1), scrH-cell*y, cell, cell);          107                          Rect r = Rect(cell*(x-1), scrH-cell*y, cell, cell);
  108                          char c = g.map[y,x];                                         108                          char c = g.map[y,x];
  109                          if( c != ' ' ) {                                             109                          if( c != ' ' ) {
  110                                  if( c == 'R' && g.dead )                             110                                  if( c == 'R' && g.dead )
  111                                          c = 'D';                                 |   111                                          c = 'd';
  112                                  graphicContext.drawText(this.render[c], font, th     112                                  graphicContext.drawText(this.render[c], font, th
  113                          }                                                            113                          }
  114                  }                                                                    114                  }
  115                                                                                       115  
  116                  // Update textual info.                                              116                  // Update textual info.
  117                  this.text = .text("Score: ", g.score, " Air: ", g.hp, " Tide: ",     117                  this.text = .text("Score: ", g.score, " Air: ", g.hp, " Tide: ",
  118                  invalidate();                                                        118                  invalidate();