@@ -57,6 +57,11 @@ public class OptionsPane extends JFrame implements ActionListener {
57
57
JLabel GPUBitmapPixelScaleLabel = new JLabel ("GPU Bitmap Pixel Scale: " );
58
58
JTextField GPUBitmapPixelScaleTextField = new JTextField ("" +data .GPUMode );
59
59
60
+ JLabel LCDModeLabel = new JLabel ("LCD Mode: " );
61
+ ButtonGroup lcdModeButtonGroup = new ButtonGroup ();
62
+ JRadioButton LCDModeRadioSmall = new JRadioButton ("16x2" );
63
+ JRadioButton LCDModeRadioLarge = new JRadioButton ("20x4" );
64
+
60
65
JLabel KeyboardLocationLabel = new JLabel ("Keyboard Memory Location: " );
61
66
JTextField KeyboardLocationTextField = new JTextField ("" +data .keyboardLocation );
62
67
JLabel KeyboardLocationHexLabel = new JLabel (Integer .toHexString (data .GPUBufferBegin ));
@@ -129,6 +134,9 @@ public OptionsPane() {
129
134
SwingComponentsList .add (KeyboardLocationLabel );
130
135
SwingComponentsList .add (KeyboardLocationTextField );
131
136
SwingComponentsList .add (KeyboardLocationHexLabel );
137
+ SwingComponentsList .add (LCDModeLabel );
138
+ SwingComponentsList .add (LCDModeRadioLarge );
139
+ SwingComponentsList .add (LCDModeRadioSmall );
132
140
133
141
this .setTitle ("Options" );
134
142
this .setContentPane (p );
@@ -148,6 +156,9 @@ public OptionsPane() {
148
156
p .add (component );
149
157
}
150
158
159
+ lcdModeButtonGroup .add (LCDModeRadioSmall );
160
+ lcdModeButtonGroup .add (LCDModeRadioLarge );
161
+
151
162
//Swing Positioning
152
163
resetSwingPositions ();
153
164
}
@@ -313,6 +324,9 @@ public void updateSwingComponents() {
313
324
GPUBitmapPixelScaleTextField .setText ("" +data .GPUBitmapPixelScale );
314
325
ForegroundColorChooser .setText ("#" +Integer .toHexString (data .fgColor .getRGB ()).substring (2 ));
315
326
BackgroundColorChooser .setText ("#" +Integer .toHexString (data .bgColor .getRGB ()).substring (2 ));
327
+
328
+ LCDModeRadioSmall .setSelected (!data .lcdBigMode );
329
+ LCDModeRadioLarge .setSelected (data .lcdBigMode );
316
330
}
317
331
318
332
private void writeDataToFile (File f ) {
@@ -364,6 +378,10 @@ public void applySwingValues() {
364
378
365
379
EaterEmulator .fc .setDirectory (data .defaultFileChooserDirectory );
366
380
fc .setDirectory (data .defaultFileChooserDirectory );
381
+
382
+ data .lcdBigMode = LCDModeRadioLarge .isSelected ();
383
+ EaterEmulator .lcd .bigMode = data .lcdBigMode ;
384
+ EaterEmulator .lcd .updateMode ();
367
385
}
368
386
369
387
private void resetSwingPositions () {
@@ -394,7 +412,7 @@ private void resetSwingPositions() {
394
412
GPUModeOptionLabel .setBounds (225 ,240 ,75 ,25 );
395
413
GPUModeOptionTextField .setBounds (300 ,240 ,25 ,25 );
396
414
397
- GPUBitmapPixelScaleLabel .setBounds (200 ,280 ,100 ,25 );
415
+ GPUBitmapPixelScaleLabel .setBounds (150 ,280 ,150 ,25 );
398
416
GPUBitmapPixelScaleTextField .setBounds (300 ,280 ,25 ,25 );
399
417
400
418
VRAMRangeLabel .setBounds (175 ,320 ,300 ,25 );
@@ -405,11 +423,15 @@ private void resetSwingPositions() {
405
423
KeyboardLocationTextField .setBounds (300 ,440 ,100 ,25 );
406
424
KeyboardLocationHexLabel .setBounds (400 ,440 ,100 ,25 );
407
425
408
- ForegroundColorLabel .setBounds (175 ,480 ,125 ,25 );
409
- ForegroundColorChooser .setBounds (300 ,480 ,100 ,25 );
426
+ LCDModeLabel .setBounds (225 ,480 ,75 ,25 );
427
+ LCDModeRadioSmall .setBounds (300 ,480 ,100 ,25 );
428
+ LCDModeRadioLarge .setBounds (400 ,480 ,100 ,25 );
429
+
430
+ ForegroundColorLabel .setBounds (175 ,520 ,125 ,25 );
431
+ ForegroundColorChooser .setBounds (300 ,520 ,100 ,25 );
410
432
411
- BackgroundColorLabel .setBounds (175 ,520 ,125 ,25 );
412
- BackgroundColorChooser .setBounds (300 ,520 ,100 ,25 );
433
+ BackgroundColorLabel .setBounds (175 ,560 ,125 ,25 );
434
+ BackgroundColorChooser .setBounds (300 ,560 ,100 ,25 );
413
435
414
436
applyOptionsButton .setBounds (200 ,625 ,150 ,25 );
415
437
saveOptionsButton .setBounds (350 ,625 ,150 ,25 );
0 commit comments