コード例 #1
0
ファイル: ListPopupBase.java プロジェクト: luwrain/luwrain
 @Override
 public boolean onEnvironmentEvent(EnvironmentEvent event) {
   NullCheck.notNull(event, "event");
   if (closing.onEnvironmentEvent(event)) return true;
   switch (event.getCode()) {
     case INTRODUCE:
       luwrain.silence();
       luwrain.playSound(Sounds.INTRO_POPUP);
       luwrain.say(getAreaName());
       return true;
     default:
       return super.onEnvironmentEvent(event);
   }
 }
コード例 #2
0
ファイル: ListPopupBase.java プロジェクト: rPman/luwrain
 private void onNewHotPointY(boolean briefIntroduction) {
   if (hotPointY <= 0) {
     hotPointX = 0;
     luwrain.hint(Hints.EMPTY_LINE);
     luwrain.onAreaNewHotPoint(this);
     return;
   }
   final Object item = items[hotPointY - 1];
   luwrain.playSound(Sounds.NEW_LIST_ITEM);
   if (item == null) {
     hotPointX = 0;
     luwrain.hint(Hints.EMPTY_LINE);
   } else {
     hotPointX = getInitialHotPointX(item);
     appearance.introduceItem(item, briefIntroduction ? ListItemAppearance.BRIEF : 0);
   }
   luwrain.onAreaNewHotPoint(this);
 }
コード例 #3
0
ファイル: ListPopupBase.java プロジェクト: rPman/luwrain
 @Override
 public boolean onEnvironmentEvent(EnvironmentEvent event) {
   NullCheck.notNull(event, "event");
   if (closing.onEnvironmentEvent(event)) return true;
   if (region.onEnvironmentEvent(event, hotPointX, hotPointY)) return false;
   switch (event.getCode()) {
     case REFRESH:
       refresh();
       return true;
     case INTRODUCE:
       luwrain.silence();
       luwrain.playSound(Sounds.INTRO_POPUP);
       luwrain.say(getAreaName());
       return true;
     default:
       return false;
   }
 }