C:\Users\buildzoid\Desktop\GameEngineOnlyBranch\src\game\gameGUI.java
  1 package game;
  2 
  3 import java.awt.Color;
  4 import java.awt.event.KeyEvent;
  5 import java.util.ArrayList;
  6 import javax.swing.Action;
  7 
  8 public class gameGUI extends javax.swing.JFrame {
  9 
 10     // Universal variables
 11     private boolean gamelive = false;
 12     private char[][] grafik = new char[9][15];// this is what stores the room graphical data localy and dynamically
 13     private String[] sgrafik = new String[9];
 14     private int sectx = 25;
 15     private int secty = 0;
 16     private short world = 1;
 17     public boolean moveoveride = false;
 18     
 19     public gameGUI() {
 20         Action A = null;
 21         initComponents();
 22     }
 23 
 24     //finds the x coordinate of a char
 25     public int fx(char target) {
 26         for (int i = 0; i < grafik.length; i++) {
 27             for (int j = 0; j < grafik[i].length; j++) {
 28                 if (grafik[i][j] == target) {
 29                     return j;
 30                 }
 31             }
 32         }
 33         return -1;
 34     }
 35 
 36     //finds the y coordinate of a char
 37     public int fy(char target) {
 38         for (short i = 0; i < grafik.length; i++) {
 39             for (int j = 0; j < grafik[i].length; j++) {
 40                 if (grafik[i][j] == target) {
 41                     return i;
 42                 }
 43             }
 44         }
 45         return -1;
 46     }
 47 
 48     //finds a door on the top or bottom wall
 49     // search code: FD
 50     public int fdy(int yd) {
 51         if (yd == -1) {
 52             for (short i = 0; i < grafik[0].length; i++) {
 53                 if (grafik[0][i] == '-') {
 54                     return i;
 55                 }
 56             }
 57         }
 58         if (yd == 1) {
 59             for (short i = 0; i < grafik[8].length; i++) {
 60                 if (grafik[8][i] == '-') {
 61                     return i;
 62                 }
 63             }
 64         }
 65         return -1;
 66     }
 67 
 68     //finds a door on the left or right wall
 69     // search code: FD
 70     public int fdx(int xd) {
 71         if (xd == -1) {
 72             for (short i = 0; i < grafik.length; i++) {
 73                 if (grafik[i][0] == '-') {
 74                     return i;
 75                 }
 76             }
 77         }
 78         if (xd == 1) {
 79             for (short i = 0; i < grafik.length; i++) {
 80                 if (grafik[i][14] == '-') {
 81                     return i;
 82                 }
 83             }
 84         }
 85         return -1;
 86     }
 87 
 88     //
 89     //renders the current text image to the Screen
 90     public void render() {
 91         Screen2.setFont(new java.awt.Font("Consolas", 0, 24));
 92         Color[] BFcolors = mapmanager.getcolor(world, sectx, secty);
 93         String out = "";
 94         for (short i = 0; i < grafik.length; i++) {
 95             for (short j = 0; j < grafik[i].length; j++) {
 96                 out = out + grafik[i][j];
 97             }
 98             if (i < grafik.length - 1) {
 99                 out = out + "\n";
100             }
101         }
102         Screen2.setText(out);
103         Screen2.setBackground(BFcolors[0]);
104         Screen2.setForeground(BFcolors[1]);
105         PlayTab.setBackground(BFcolors[0]);
106         if (ColorSettigs.isSelected()) {
107             Screen2.setBackground(new Color(255, 255, 255));
108             Screen2.setForeground(new Color(0, 0, 0));
109         }
110     }
111 

511 // </editor-fold>
512     //Keyboard controls 
513     private void MainTabsKeyPressed(java.awt.event.KeyEvent evt) {                                    
514         if (gamelive) {
515             if (keyboardsideoption.isSelected()) {
516                 if (evt.getKeyCode() == KeyEvent.VK_O) {
517                     movementactionsy(-1);
518                     render();
519                     mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
520                 } else if (evt.getKeyCode() == KeyEvent.VK_L) {
521                     movementactionsy(1);
522                     render();
523                     mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
524                     render();
525                 } else if (evt.getKeyCode() == KeyEvent.VK_K) {
526                     movementactionsx(-1);
527                     render();
528                     mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
529                     render();
530                 } else if (evt.getKeyCode() == KeyEvent.VK_SEMICOLON) {
531                     movementactionsx(1);
532                     render();
533                     mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
534                     render();
535                 }
536             } else {
537                 if (evt.getKeyCode() == KeyEvent.VK_W) {
538                     movementactionsy(-1);
539                     render();
540                     mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
541                     render();
542                 } else if (evt.getKeyCode() == KeyEvent.VK_S) {
543                     movementactionsy(1);
544                     render();
545                     mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
546                     render();
547                 } else if (evt.getKeyCode() == KeyEvent.VK_A) {
548                     movementactionsx(-1);
549                     render();
550                     mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
551                     render();
552                 } else if (evt.getKeyCode() == KeyEvent.VK_D) {
553                     movementactionsx(1);
554                     render();
555                     mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
556                     render();
557                 }
558             }
559         }
560     }                                   
561 
562 
563     private void D_line_SliderMouseDragged(java.awt.event.MouseEvent evt) {                                           
564         D_line_slider_disp.setText("" + D_line_Slider.getValue());
565     }                                          
566 
567     //Opnes the inventory
568     private void bagMouseReleased(java.awt.event.MouseEvent evt) {                                  
569         new InvetGUI().setVisible(true);
570     }                                 
571 
572     //Options 2 in coversation
573     private void opt2MouseReleased(java.awt.event.MouseEvent evt) {                                   
574         // TODO add your handling code here:
575     }                                  
576 
577     //Equivalent of the e to use button
578     private void engageMouseReleased(java.awt.event.MouseEvent evt) {                                     
579         // TODO add your handling code here:
580     }                                    
581 
582     // 
583     private void opt1MouseReleased(java.awt.event.MouseEvent evt) {                                   
584         // TODO add your handling code here:
585     }                                  
586 
587     private void findMouseReleased(java.awt.event.MouseEvent evt) {                                   
588         // TODO add your handling code here:
589     }                                  
590 
591 //BUTTONS///////////////////////////////////////////////////////////////////////////
592 // <editor-fold>
593 //Movement Buttons
594 //go up
595     private void gouMouseReleased(java.awt.event.MouseEvent evt) {                                  
596         movementactionsy(-1);
597         render();
598         mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
599         render();
600     }                                 
601 
602 // go left
603     private void golMouseReleased(java.awt.event.MouseEvent evt) {                                  
604         movementactionsx(-1);
605         render();
606         mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
607         render();
608     }                                 
609 
610     private void godMouseReleased(java.awt.event.MouseEvent evt) {                                  
611         movementactionsy(1);
612         render();
613         mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
614         render();
615     }                                 
616 
617     private void PLAYMouseReleased(java.awt.event.MouseEvent evt) {                                   
618         DPS.actions[0]=1;
619         grafik = mapmanager.getgrafik(world, sectx, secty);
620         grafik[4][2] = 'P';
621         render();
622         gamelive = true;
623     }                                  
624 
625     private void EXTBTNMouseReleased(java.awt.event.MouseEvent evt) {                                     
626         this.dispose();//this ends the program
627     }                                    
628 
629     private void gorMouseReleased(java.awt.event.MouseEvent evt) {                                  
630         movementactionsx(1);
631         render();
632         mapmanager.dothing(world, sectx, secty, fx('P'), fy('P'));
633         render();
634     }                                 
635 
636     //MOVEMENT BLOCKS///////////////////////////////////////////////////////////////////////////
637     //movement possibilities on Y axis // Contains all standard building entry handling
638     public void movementactionsy(int yd) {
639         if (MFC.getmovelocker()) {
640             if (FMcb.isSelected()) {
641                 //Room to Room TP
642                 if (secty + yd < 50 && secty + yd >= -1 && !moveoveride) {
643                     int tempx = fdy(yd);
644                     if (tempx == -1) {
645                     } else {
646                         if (mapmanager.getlvl(world, sectx, secty) == -1) {
647                             Dscreenin("You have entered a safe area");
648                         } else {
649                             Dscreenin("You have entered a level:" + mapmanager.getlvl(world, sectx, secty) + " Danger Zone");
650                         }
651                         secty += yd;
652                         grafik = mapmanager.getgrafik(world, sectx, secty);
653                         grafik[4 - (3 * yd)][tempx] = 'P';
654                     }
655                 }
656                 //regular walking
657             } else if (grafik[fy('P') + yd][fx('P')] == ' '
658                     || grafik[fy('P') + yd][fx('P')] == '~'
659                     || grafik[fy('P') + yd][fx('P')] == '.'
660                     || grafik[fy('P') + yd][fx('P')] == ',') {
661                 int tempy = fy('P');
662                 int tempx = fx('P');
663                 grafik = mapmanager.getgrafik(world, sectx, secty);
664                 grafik[tempy + yd][tempx] = 'P';
665                 //Walking into a new room
666             } else if (grafik[fy('P') + yd][fx('P')] == '-' && !moveoveride) {
667                 secty += yd;
668                 if (mapmanager.getlvl(world, sectx, secty) == -1) {
669                     Dscreenin("You have entered a safe area: " + sectx + "," + secty);
670                 } else {
671                     Dscreenin("You have entered a level:" + mapmanager.getlvl(world, sectx, secty) + " Danger Zone: " + sectx + "," + secty);
672                 }
673                 int tempx = fx('P');
674                 grafik = mapmanager.getgrafik(world, sectx, secty);
675                 grafik[4 - (3 * yd)][tempx] = 'P';
676                 //THE FOLLOWING IS CODE FOR HANDLING BUILDINGS
677                 //Stores
678             } else if (grafik[fy('P') + yd][fx('P')] == 'h') { //disabled due to lack of functional items
679                 new StoreGUI().setVisible(true);
680                 MFC.setmovelocker(false);
681                 //Training Ground
682             } else if (grafik[fy('P') + yd][fx('P')] == 'N') {
683                 new ArenaGUI().setVisible(true);
684                 MFC.setmovelocker(false);
685                 //Training Grounds
686             } else if (grafik[fy('P') + yd][fx('P')] == 'M') {
687                 
688                 //Healer
689             } else if (grafik[fy('P') + yd][fx('P')] == 'O') {
690                 DPS.HPMOD = 0;
691                 Dscreenin("You and your team are healed");
692             }
693         } else if (MFC.getmovelocker() == false) {
694             Dscreenin("You are in an interaction movement is locked");
695         }
696     }
697 
698     //movement possibilities on X axis
699     public void movementactionsx(int xd) {
700         if (MFC.getmovelocker()) {
701             if (FMcb.isSelected()) { // Teleporting
702                 if (sectx + xd < 199 && sectx + xd >= 0) {
703                     int tempy = fdx(xd);
704                     if (tempy == -1) {
705                     } else {
706                         if (mapmanager.getlvl(world, sectx, secty) == -1) {
707                             Dscreenin("You have entered a safe area");
708                         } else {
709                             Dscreenin("You have entered a level:" + mapmanager.getlvl(world, sectx, secty) + " Danger Zone");
710                         }
711                         sectx += xd;
712                         grafik = grafik = mapmanager.getgrafik(world, sectx, secty);
713                         grafik[tempy][7 - (6 * xd)] = 'P';
714                     }
715                 }
716                 //Walking
717             } else if (grafik[fy('P')][fx('P') + xd] == ' '
718                     || grafik[fy('P')][fx('P') + xd] == '~'
719                     || grafik[fy('P')][fx('P') + xd] == '.'
720                     || grafik[fy('P')][fx('P') + xd] == ',') {
721                 int tempy = fy('P');
722                 int tempx = fx('P');
723                 grafik = mapmanager.getgrafik(world, sectx, secty);
724                 grafik[tempy][tempx + xd] = 'P';
725                 //Walking to room
726             } else if (grafik[fy('P')][fx('P') + xd] == '-') {
727                 sectx += xd;
728                 if (mapmanager.getlvl(world, sectx, secty) == -1) {
729                     Dscreenin("You have entered a safe area: "  + sectx + "," + secty);
730                 } else {
731                     Dscreenin("You have entered a level:" + mapmanager.getlvl(world, sectx, secty) + " Danger Zone: "  + sectx + "," + secty);
732                 }
733                 int tempy = fy('P');
734                 grafik = grafik = mapmanager.getgrafik(world, sectx, secty);
735                 grafik[tempy][7 - (6 * xd)] = 'P';
736             }
737         } else if (MFC.getmovelocker() == false) {
738             Dscreenin("You are in an interaction movement is locked");
739         }
740     }
741 
742     // Method that determines the chance of an event
743     public int echance() {
744         int[] MobIDs = mapmanager.gmids(world, sectx, secty);
745         if (Math.random() * 5 == 2) {
746             int test = (int) (Math.random() * 100);
747             if (test <= 100 && test > 60) { // 40% chance
748                 MFC.EIDs[0].ID = MobIDs[0];
749                 MFC.EIDs[0].QuickXP(mapmanager.getlvl(world, sectx, secty));
750             } else if (test <= 60 && test > 35) { // 25% chance
751                 return 2;
752             } else if (test <= 35 && test > 20) { // 15% chance
753                 return 3;
754             } else if (test <= 20 && test > 10) { // 10% chance
755                 return 4;
756             } else if (test <= 10 && test > 4) { // 6% chance
757                 return 5;
758             } else if (test <= 4 && test > 0) { // 4% chance
759                 return 6;
760             }
761         }
762         return -1;
763     }
764 
765     //Controls Dialog screen input to prevent RAM overflow 
766     public void Dscreenin(String input) {
767         ScreenD.setText(ScreenD.getText() + input + '\n');
768         int counter = 0;
769         for (int i = 0; i < ScreenD.getText().length(); i++) {
770             if (ScreenD.getText().charAt(i) == '\n') {
771                 counter++;
772             }
773         }
774         //System.out.println("Lines in D screen: " + counter); //Debug command
775         if (counter > D_line_Slider.getValue()) {
776             String temp1 = ScreenD.getText();
777             ScreenD.setText(null);
778             int i = 0;
779             int counter2 = 0;
780             String temp2 = "";
781             boolean cutloop = true;
782             while (cutloop) {
783                 i++;
784                 if (temp1.charAt(i) == '\n') {
785                     counter2++;
786                 }
787                 if (counter - counter2 == D_line_Slider.getValue()) {
788                     cutloop = false;
789                 }
790             }
791             while (i < temp1.length() - 1) {
792                 i++;
793                 temp2 = temp2 + temp1.charAt(i);
794             }
795             ScreenD.setText(null);
796             //System.out.println("temp2 is: " +temp2 +"\n");
797             ScreenD.setText(temp2);
798             temp2 = null;
799             temp1 = null;
800         }
801     }
802 
803     ////////////////////////////////////////////////////////////////////////////////////////////
804     ////////////////////////////////////////////////////////////////////////////////////////////
805     ////////////////////////////////////////////////////////////////////////////////////////////
806     ////////////////////////////////////////////////////////////////////////////////////////////
807     ////////////////////////////////////////////////////////////////////////////////////////////
808     ////////////////////////////////////////////////////////////////////////////////////////////
809     public static void main(String args[]) {
810         /* Set the Nimbus look and feel 
811          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
812          */
813         try {
814             for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
815                 if ("Metal".equals(info.getName())) {
816                     javax.swing.UIManager.setLookAndFeel(info.getClassName());
817                     break;
818                 }
819             }
820         } catch (ClassNotFoundException ex) {
821             java.util.logging.Logger.getLogger(gameGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
822         } catch (InstantiationException ex) {
823             java.util.logging.Logger.getLogger(gameGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
824         } catch (IllegalAccessException ex) {
825             java.util.logging.Logger.getLogger(gameGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
826         } catch (javax.swing.UnsupportedLookAndFeelException ex) {
827             java.util.logging.Logger.getLogger(gameGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
828         }
829         //</editor-fold>
830         java.awt.EventQueue.invokeLater(new Runnable() {
831             public void run() {
832                 new gameGUI().setVisible(true);
833             }
834         });
835     }


AUTO-GENERATED GUI CODE FROM THIS POINT ON:

112     @SuppressWarnings("unchecked")
113     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
114     private void initComponents() {
115 
116         jLayeredPane1 = new javax.swing.JLayeredPane();
117         MainTabs = new javax.swing.JTabbedPane();
118         WelcomeTab = new javax.swing.JPanel();
119         PLAY = new javax.swing.JButton();
120         jScrollPane2 = new javax.swing.JScrollPane();
121         MainScreenArt = new javax.swing.JTextArea();
122         EXTBTN = new javax.swing.JButton();
123         PlayTab = new javax.swing.JPanel();
124         god = new javax.swing.JButton();
125         gor = new javax.swing.JButton();
126         gol = new javax.swing.JButton();
127         jScrollPane1 = new javax.swing.JScrollPane();
128         Screen2 = new javax.swing.JTextArea();
129         gou = new javax.swing.JButton();
130         jScrollPane4 = new javax.swing.JScrollPane();
131         ScreenD = new javax.swing.JTextArea();
132         find = new javax.swing.JButton();
133         FMcb = new javax.swing.JCheckBox();
134         jScrollPane5 = new javax.swing.JScrollPane();
135         Screen4 = new javax.swing.JTextArea();
136         jScrollPane6 = new javax.swing.JScrollPane();
137         Screen5 = new javax.swing.JTextArea();
138         opt1 = new javax.swing.JButton();
139         engage = new javax.swing.JButton();
140         opt2 = new javax.swing.JButton();
141         bag = new javax.swing.JButton();
142         jPanel1 = new javax.swing.JPanel();
143         jLabel1 = new javax.swing.JLabel();
144         jLabel2 = new javax.swing.JLabel();
145         ColorSettigs = new javax.swing.JCheckBox();
146         keyboardsideoption = new javax.swing.JCheckBox();
147         D_line_Slider = new javax.swing.JSlider();
148         jLabel3 = new javax.swing.JLabel();
149         D_line_slider_disp = new javax.swing.JLabel();
150 
151         org.jdesktop.layout.GroupLayout jLayeredPane1Layout = new org.jdesktop.layout.GroupLayout(jLayeredPane1);
152         jLayeredPane1.setLayout(jLayeredPane1Layout);
153         jLayeredPane1Layout.setHorizontalGroup(
154             jLayeredPane1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
155             .add(0, 100, Short.MAX_VALUE)
156         );
157         jLayeredPane1Layout.setVerticalGroup(
158             jLayeredPane1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
159             .add(0, 100, Short.MAX_VALUE)
160         );
161 
162         setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
163         setAutoRequestFocus(false);
164         setBackground(new java.awt.Color(255, 255, 255));
165         setMaximumSize(new java.awt.Dimension(800, 658));
166         setMinimumSize(new java.awt.Dimension(800, 658));
167         setPreferredSize(new java.awt.Dimension(800, 658));
168         setResizable(false);
169 
170         MainTabs.setBackground(new java.awt.Color(255, 255, 255));
171         MainTabs.addKeyListener(new java.awt.event.KeyAdapter() {
172             public void keyPressed(java.awt.event.KeyEvent evt) {
173                 MainTabsKeyPressed(evt);
174             }
175         });
176 
177         WelcomeTab.setBackground(new java.awt.Color(255, 255, 255));
178         WelcomeTab.setPreferredSize(new java.awt.Dimension(792, 599));
179 
180         PLAY.setBackground(new java.awt.Color(255, 255, 255));
181         PLAY.setFont(new java.awt.Font("Consolas", 0, 18)); // NOI18N
182         PLAY.setText("PLAY");
183         PLAY.setToolTipText("");
184         PLAY.setFocusable(false);
185         PLAY.addMouseListener(new java.awt.event.MouseAdapter() {
186             public void mouseReleased(java.awt.event.MouseEvent evt) {
187                 PLAYMouseReleased(evt);
188             }
189         });
190 
191         MainScreenArt.setColumns(20);
192         MainScreenArt.setFont(new java.awt.Font("Consolas", 0, 16)); // NOI18N
193         MainScreenArt.setRows(5);
194         MainScreenArt.setText("OC2DRPG Engine Demo V1.0\n");
195         MainScreenArt.setAutoscrolls(false);
196         MainScreenArt.setFocusable(false);
197         jScrollPane2.setViewportView(MainScreenArt);
198 
199         EXTBTN.setBackground(new java.awt.Color(255, 255, 255));
200         EXTBTN.setFont(new java.awt.Font("Consolas", 0, 18)); // NOI18N
201         EXTBTN.setText("EXIT");
202         EXTBTN.setToolTipText("");
203         EXTBTN.setFocusable(false);
204         EXTBTN.addMouseListener(new java.awt.event.MouseAdapter() {
205             public void mouseReleased(java.awt.event.MouseEvent evt) {
206                 EXTBTNMouseReleased(evt);
207             }
208         });
209 
210         org.jdesktop.layout.GroupLayout WelcomeTabLayout = new org.jdesktop.layout.GroupLayout(WelcomeTab);
211         WelcomeTab.setLayout(WelcomeTabLayout);
212         WelcomeTabLayout.setHorizontalGroup(
213             WelcomeTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
214             .add(WelcomeTabLayout.createSequentialGroup()
215                 .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 703, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
216                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
217                 .add(WelcomeTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
218                     .add(PLAY, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
219                     .add(EXTBTN, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
220                 .add(97, 97, 97))
221         );
222         WelcomeTabLayout.setVerticalGroup(
223             WelcomeTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
224             .add(WelcomeTabLayout.createSequentialGroup()
225                 .add(WelcomeTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
226                     .add(WelcomeTabLayout.createSequentialGroup()
227                         .add(PLAY, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
228                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
229                         .add(EXTBTN, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 290, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
230                     .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 599, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
231                 .add(0, 0, Short.MAX_VALUE))
232         );
233 
234         MainTabs.addTab("Welcome", WelcomeTab);
235 
236         PlayTab.setBackground(new java.awt.Color(255, 255, 255));
237         PlayTab.setPreferredSize(new java.awt.Dimension(792, 599));
238 
239         god.setBackground(new java.awt.Color(255, 255, 255));
240         god.setText("DOWN");
241         god.setFocusable(false);
242         god.setMnemonic(KeyEvent.VK_UP);
243         god.addMouseListener(new java.awt.event.MouseAdapter() {
244             public void mouseReleased(java.awt.event.MouseEvent evt) {
245                 godMouseReleased(evt);
246             }
247         });
248 
249         gor.setBackground(new java.awt.Color(255, 255, 255));
250         gor.setText("RIGHT");
251         gor.setFocusable(false);
252         gor.addMouseListener(new java.awt.event.MouseAdapter() {
253             public void mouseReleased(java.awt.event.MouseEvent evt) {
254                 gorMouseReleased(evt);
255             }
256         });
257 
258         gol.setBackground(new java.awt.Color(255, 255, 255));
259         gol.setText("LEFT");
260         gol.setFocusable(false);
261         gol.addMouseListener(new java.awt.event.MouseAdapter() {
262             public void mouseReleased(java.awt.event.MouseEvent evt) {
263                 golMouseReleased(evt);
264             }
265         });
266 
267         Screen2.setColumns(15);
268         Screen2.setFont(new java.awt.Font("Consolas", 0, 24)); // NOI18N
269         Screen2.setRows(9);
270         Screen2.setFocusable(false);
271         Screen2.setRequestFocusEnabled(false);
272         jScrollPane1.setViewportView(Screen2);
273 
274         gou.setBackground(new java.awt.Color(255, 255, 255));
275         gou.setMnemonic('W');
276         gou.setText("UP");
277         gou.setToolTipText("");
278         gou.setFocusable(false);
279         gou.addMouseListener(new java.awt.event.MouseAdapter() {
280             public void mouseReleased(java.awt.event.MouseEvent evt) {
281                 gouMouseReleased(evt);
282             }
283         });
284 
285         ScreenD.setColumns(16);
286         ScreenD.setFont(new java.awt.Font("Consolas", 0, 14)); // NOI18N
287         ScreenD.setRows(6);
288         ScreenD.setFocusable(false);
289         ScreenD.setRequestFocusEnabled(false);
290         jScrollPane4.setViewportView(ScreenD);
291 
292         find.setBackground(new java.awt.Color(255, 255, 255));
293         find.setText("[F]IND");
294         find.setFocusable(false);
295         find.addMouseListener(new java.awt.event.MouseAdapter() {
296             public void mouseReleased(java.awt.event.MouseEvent evt) {
297                 findMouseReleased(evt);
298             }
299         });
300 
301         FMcb.setText("Fast Movement");
302         FMcb.setFocusable(false);
303 
304         Screen4.setBackground(new java.awt.Color(0, 0, 0));
305         Screen4.setColumns(20);
306         Screen4.setFont(new java.awt.Font("Consolas", 0, 24)); // NOI18N
307         Screen4.setRows(9);
308         Screen4.setFocusable(false);
309         Screen4.setRequestFocusEnabled(false);
310         jScrollPane5.setViewportView(Screen4);
311 
312         Screen5.setBackground(new java.awt.Color(0, 0, 0));
313         Screen5.setColumns(20);
314         Screen5.setFont(new java.awt.Font("Consolas", 0, 24)); // NOI18N
315         Screen5.setRows(9);
316         Screen5.setFocusable(false);
317         Screen5.setRequestFocusEnabled(false);
318         jScrollPane6.setViewportView(Screen5);
319 
320         opt1.setBackground(new java.awt.Color(255, 255, 255));
321         opt1.setText("1");
322         opt1.setFocusable(false);
323         opt1.addMouseListener(new java.awt.event.MouseAdapter() {
324             public void mouseReleased(java.awt.event.MouseEvent evt) {
325                 opt1MouseReleased(evt);
326             }
327         });
328 
329         engage.setBackground(new java.awt.Color(255, 255, 255));
330         engage.setText("[E]NGAGE");
331         engage.setFocusable(false);
332         engage.addMouseListener(new java.awt.event.MouseAdapter() {
333             public void mouseReleased(java.awt.event.MouseEvent evt) {
334                 engageMouseReleased(evt);
335             }
336         });
337 
338         opt2.setBackground(new java.awt.Color(255, 255, 255));
339         opt2.setText("2");
340         opt2.setFocusable(false);
341         opt2.addMouseListener(new java.awt.event.MouseAdapter() {
342             public void mouseReleased(java.awt.event.MouseEvent evt) {
343                 opt2MouseReleased(evt);
344             }
345         });
346 
347         bag.setBackground(new java.awt.Color(255, 255, 255));
348         bag.setText("[B]AG");
349         bag.setFocusable(false);
350         bag.addMouseListener(new java.awt.event.MouseAdapter() {
351             public void mouseReleased(java.awt.event.MouseEvent evt) {
352                 bagMouseReleased(evt);
353             }
354         });
355 
356         org.jdesktop.layout.GroupLayout PlayTabLayout = new org.jdesktop.layout.GroupLayout(PlayTab);
357         PlayTab.setLayout(PlayTabLayout);
358         PlayTabLayout.setHorizontalGroup(
359             PlayTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
360             .add(PlayTabLayout.createSequentialGroup()
361                 .add(21, 21, 21)
362                 .add(PlayTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
363                     .add(PlayTabLayout.createSequentialGroup()
364                         .add(gol)
365                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
366                         .add(PlayTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
367                             .add(gou, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
368                             .add(god, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 87, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
369                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
370                         .add(PlayTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
371                             .add(PlayTabLayout.createSequentialGroup()
372                                 .add(FMcb)
373                                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
374                                 .add(find)
375                                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
376                                 .add(engage)
377                                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
378                                 .add(bag)
379                                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
380                                 .add(opt1)
381                                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
382                                 .add(opt2))
383                             .add(gor)))
384                     .add(PlayTabLayout.createSequentialGroup()
385                         .add(jScrollPane6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
386                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
387                         .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
388                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
389                         .add(jScrollPane5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
390                     .add(jScrollPane4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 745, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
391                 .addContainerGap(21, Short.MAX_VALUE))
392         );
393         PlayTabLayout.setVerticalGroup(
394             PlayTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
395             .add(PlayTabLayout.createSequentialGroup()
396                 .add(PlayTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
397                     .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1)
398                     .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane5)
399                     .add(jScrollPane6))
400                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
401                 .add(jScrollPane4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
402                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
403                 .add(PlayTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
404                     .add(PlayTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
405                         .add(gou, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 52, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
406                         .add(find, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 52, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
407                         .add(engage, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 52, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
408                         .add(bag, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 52, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
409                         .add(opt2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 52, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
410                         .add(opt1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 52, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
411                     .add(FMcb))
412                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
413                 .add(PlayTabLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
414                     .add(god, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 52, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
415                     .add(gol, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 52, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
416                     .add(gor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 52, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
417                 .add(0, 102, Short.MAX_VALUE))
418         );
419 
420         MainTabs.addTab("Play", PlayTab);
421 
422         jPanel1.setBackground(new java.awt.Color(255, 255, 255));
423         jPanel1.setPreferredSize(new java.awt.Dimension(792, 599));
424 
425         jLabel1.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N
426         jLabel1.setText("Graphical Settings");
427 
428         jLabel2.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N
429         jLabel2.setText("Control Settings");
430 
431         ColorSettigs.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N
432         ColorSettigs.setText("BW Color");
433         ColorSettigs.setFocusable(false);
434 
435         keyboardsideoption.setFont(new java.awt.Font("Monospaced", 0, 12)); // NOI18N
436         keyboardsideoption.setText("Enable right hand move ment controls Keys: O K L ;");
437         keyboardsideoption.setFocusable(false);
438 
439         D_line_Slider.setMinimum(5);
440         D_line_Slider.setMinorTickSpacing(1);
441         D_line_Slider.setSnapToTicks(true);
442         D_line_Slider.setToolTipText("");
443         D_line_Slider.setFocusable(false);
444         D_line_Slider.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
445             public void mouseDragged(java.awt.event.MouseEvent evt) {
446                 D_line_SliderMouseDragged(evt);
447             }
448         });
449 
450         jLabel3.setText("Maximum Dialog lines:");
451         jLabel3.setFocusable(false);
452 
453         D_line_slider_disp.setText("50");
454         D_line_slider_disp.setFocusable(false);
455 
456         org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
457         jPanel1.setLayout(jPanel1Layout);
458         jPanel1Layout.setHorizontalGroup(
459             jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
460             .add(jPanel1Layout.createSequentialGroup()
461                 .addContainerGap()
462                 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
463                     .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
464                     .add(ColorSettigs)
465                     .add(keyboardsideoption)
466                     .add(jPanel1Layout.createSequentialGroup()
467                         .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
468                             .add(jLabel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
469                             .add(jLabel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE))
470                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
471                         .add(D_line_slider_disp, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 36, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
472                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
473                         .add(D_line_Slider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
474                 .addContainerGap(381, Short.MAX_VALUE))
475         );
476         jPanel1Layout.setVerticalGroup(
477             jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
478             .add(jPanel1Layout.createSequentialGroup()
479                 .addContainerGap()
480                 .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 27, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
481                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
482                 .add(ColorSettigs)
483                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
484                 .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
485                     .add(D_line_slider_disp, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
486                     .add(D_line_Slider, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
487                     .add(jLabel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
488                 .add(148, 148, 148)
489                 .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 27, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
490                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
491                 .add(keyboardsideoption)
492                 .addContainerGap(307, Short.MAX_VALUE))
493         );
494 
495         MainTabs.addTab("Config", jPanel1);
496 
497         org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
498         getContentPane().setLayout(layout);
499         layout.setHorizontalGroup(
500             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
501             .add(MainTabs, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 792, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
502         );
503         layout.setVerticalGroup(
504             layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
505             .add(MainTabs, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
506         );
507 
508         pack();
509     }// </editor-fold>                        
510 

836     // Variables declaration - do not modify                     
837     private javax.swing.JCheckBox ColorSettigs;
838     private javax.swing.JSlider D_line_Slider;
839     private javax.swing.JLabel D_line_slider_disp;
840     private javax.swing.JButton EXTBTN;
841     private javax.swing.JCheckBox FMcb;
842     private javax.swing.JTextArea MainScreenArt;
843     private javax.swing.JTabbedPane MainTabs;
844     private javax.swing.JButton PLAY;
845     private javax.swing.JPanel PlayTab;
846     private javax.swing.JTextArea Screen2;
847     private javax.swing.JTextArea Screen4;
848     private javax.swing.JTextArea Screen5;
849     private javax.swing.JTextArea ScreenD;
850     private javax.swing.JPanel WelcomeTab;
851     private javax.swing.JButton bag;
852     private javax.swing.JButton engage;
853     private javax.swing.JButton find;
854     private javax.swing.JButton god;
855     private javax.swing.JButton gol;
856     private javax.swing.JButton gor;
857     private javax.swing.JButton gou;
858     private javax.swing.JLabel jLabel1;
859     private javax.swing.JLabel jLabel2;
860     private javax.swing.JLabel jLabel3;
861     private javax.swing.JLayeredPane jLayeredPane1;
862     private javax.swing.JPanel jPanel1;
863     private javax.swing.JScrollPane jScrollPane1;
864     private javax.swing.JScrollPane jScrollPane2;
865     private javax.swing.JScrollPane jScrollPane4;
866     private javax.swing.JScrollPane jScrollPane5;
867     private javax.swing.JScrollPane jScrollPane6;
868     private javax.swing.JCheckBox keyboardsideoption;
869     private javax.swing.JButton opt1;
870     private javax.swing.JButton opt2;
871     // End of variables declaration                   
872 
873 }
874