Example #1
0
 private void drawDialog(Graphics g) {
   Painter.drawDialog(
       g,
       0,
       gd.screenHeight - g.getFont().getHeight() * 3 - 20,
       gd.screenWidth,
       g.getFont().getHeight() * 3 + 20,
       Painter.DIALOG_DEEP);
   g.setFont(Const.Font.FONTSMALL_PLAIN);
   // 对话人
   Painter.drawString(
       g, gd.dialog_name + ":", 10, gd.screenHeight - g.getFont().getHeight() * 3 - 10, 0xffffff);
   // 两行对话内容
   Painter.drawString(
       g,
       gd.dialog_content[gd.dialog_index],
       10,
       gd.screenHeight - g.getFont().getHeight() * 2 - 10,
       0xffffff);
   if (gd.dialog_index + 1 < gd.dialog_content.length) {
     Painter.drawString(
         g,
         gd.dialog_content[gd.dialog_index + 1],
         10,
         gd.screenHeight - g.getFont().getHeight() - 10,
         0xffffff);
   }
 }
Example #2
0
 /** 绘图 */
 public void paint(Graphics g) {
   Painter.fillRect(g, 0, 0, gd.screenWidth, gd.screenHeight, 0x000000);
   drawMap(g);
   drawPlayer(g);
   switch (gd.pageIndex) {
     case PAGE_MAP:
       break;
     case PAGE_MENU:
       drawMenu(g);
       break;
     case PAGE_DIALOG:
       drawDialog(g);
       break;
     case PAGE_WAIT:
       Painter.drawString(
           g,
           "等待" + (gd.waitTime - gd.waitIndex) + "秒",
           5,
           gd.screenHeight - g.getFont().getHeight(),
           0xffffff);
       break;
   }
 }