This commit is contained in:
@@ -20,6 +20,7 @@ public class StatusBar extends JPanel {
|
||||
private final JLabel luName;
|
||||
private final JLabel lockStatus;
|
||||
private final JLabel modelInfo;
|
||||
private final JButton lpButton;
|
||||
|
||||
private Telnet3270Client client;
|
||||
private TerminalPanel terminalPanel;
|
||||
@@ -45,7 +46,7 @@ public class StatusBar extends JPanel {
|
||||
modelInfo = createLabel("", oiaFont, OIA_DIM);
|
||||
cursorPosition = createLabel("001/001", oiaFont, OIA_FG);
|
||||
|
||||
JButton lpButton = new JButton("LightPen: OFF");
|
||||
lpButton = new JButton("LightPen: OFF");
|
||||
lpButton.setFont(oiaFont);
|
||||
lpButton.setForeground(OIA_FG);
|
||||
lpButton.setBackground(OIA_BG);
|
||||
@@ -177,5 +178,11 @@ public class StatusBar extends JPanel {
|
||||
int row = sb.getCursorRow() + 1;
|
||||
int col = sb.getCursorCol() + 1;
|
||||
cursorPosition.setText(String.format("%03d/%03d", row, col));
|
||||
|
||||
// Light Pen indicator — sync with actual state
|
||||
if (terminalPanel != null) {
|
||||
lpButton.setText("LightPen: " + (terminalPanel.isLightPenMode() ? "ON" : "OFF"));
|
||||
lpButton.setForeground(terminalPanel.isLightPenMode() ? new Color(255, 255, 80) : OIA_FG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,7 +215,12 @@ public class TerminalPanel extends JPanel {
|
||||
sb.setCursorAddress(newAddr);
|
||||
clearSelection();
|
||||
if (lightPenMode) {
|
||||
if (client.getInputProcessor().lightPenSelect(newAddr)) {
|
||||
System.out.println("LP click: row=" + selectionStartRow + " col=" + selectionStartCol
|
||||
+ " addr=" + newAddr + " mouseY=" + e.getY() + " oy=" + getRenderOffsetY()
|
||||
+ " cellH=" + cellHeight);
|
||||
boolean result = client.getInputProcessor().lightPenSelect(newAddr);
|
||||
System.out.println("LP lightPenSelect result: " + result);
|
||||
if (result) {
|
||||
refreshScreen();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user