예제 #1
0
 @Override
 public void drawBackground(int mouseX, int mouseY, float gameTicks) {
   glEnable(GL_BLEND);
   ApplyColor();
   super.drawBackground(mouseX, mouseY, gameTicks);
   drawIcon(stat.getIcon(level), posX + 3, posY + 3);
   if (direction != ForgeDirection.UNKNOWN) {
     glPushMatrix();
     glTranslated(posX, posY, 0);
     glTranslated(sizeX / 2, sizeY / 2, 0);
     glTranslated(direction.offsetX * (sizeX * 0.75), -direction.offsetY * (sizeY * 0.75), 0);
     if (direction == ForgeDirection.EAST) {
       glRotated(90, 0, 0, 1);
     } else if (direction == ForgeDirection.WEST) {
       glRotated(-90, 0, 0, 1);
     } else if (direction == ForgeDirection.DOWN) {
       glRotated(180, 0, 0, 1);
     }
     glTranslated(-3.5, -3.5, 0);
     ClientProxy.holoIcons.renderIcon("up_arrow", 0, 0);
     glPopMatrix();
   }
   ResetColor();
   glDisable(GL_BLEND);
 }
예제 #2
0
 @Override
 public void onAction(int mouseX, int mouseY, int mouseButton) {
   if (super.intersectsWith(mouseX, mouseY)) {
     if (stat.canBeUnlocked(player, level + 1) && level < stat.maxLevel()) {
       GuiBase.playSound(Reference.MOD_ID + ":" + "gui.biotic_stat_unlock", 1, 1);
       MatterOverdrive.packetPipeline.sendToServer(
           new PacketUnlockBioticStat(stat.getUnlocalizedName(), ++level));
     }
   }
   super.onAction(mouseX, mouseY, mouseButton);
 }