mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-12 22:36:02 -04:00
makes the wire tool tips optional, closes #297
This commit is contained in:
parent
58540f28f2
commit
87a78f23a8
@ -795,5 +795,11 @@ public final class Keys {
|
||||
public static final Key<Boolean> SETTINGS_SHOW_TUTORIAL =
|
||||
new Key<>("showTutorial", true).setSecondary();
|
||||
|
||||
/**
|
||||
* Enables the wire tool tips
|
||||
*/
|
||||
public static final Key<Boolean> SETTINGS_WIRETOOLTIP =
|
||||
new Key<>("wireToolTips", false);
|
||||
|
||||
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ public final class Settings implements AttributeListener {
|
||||
intList.add(Keys.SETTINGS_GRID);
|
||||
intList.add(Keys.SETTINGS_SHOW_WIRE_BITS);
|
||||
intList.add(Keys.SETTINGS_NOTOOLTIPS);
|
||||
intList.add(Keys.SETTINGS_WIRETOOLTIP);
|
||||
intList.add(Keys.SETTINGS_LIBRARY_PATH);
|
||||
intList.add(Keys.SETTINGS_JAR_PATH);
|
||||
intList.add(Keys.SETTINGS_ATF1502_FITTER);
|
||||
|
@ -551,20 +551,21 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
|
||||
if (v != null)
|
||||
return v.getValueString();
|
||||
else {
|
||||
if (highLighted == null || highLighted.isEmpty() || toolTipHighlighted) {
|
||||
try {
|
||||
if (toolTipNetList == null)
|
||||
toolTipNetList = new NetList(getCircuit());
|
||||
Net n = toolTipNetList.getNetOfPos(w.p1);
|
||||
if (n != null) {
|
||||
removeHighLighted();
|
||||
addHighLighted(n.getWires());
|
||||
toolTipHighlighted = true;
|
||||
if (Settings.getInstance().get(Keys.SETTINGS_WIRETOOLTIP))
|
||||
if (highLighted == null || highLighted.isEmpty() || toolTipHighlighted) {
|
||||
try {
|
||||
if (toolTipNetList == null)
|
||||
toolTipNetList = new NetList(getCircuit());
|
||||
Net n = toolTipNetList.getNetOfPos(w.p1);
|
||||
if (n != null) {
|
||||
removeHighLighted();
|
||||
addHighLighted(n.getWires());
|
||||
toolTipHighlighted = true;
|
||||
}
|
||||
} catch (PinException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (PinException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1213,6 +1213,8 @@ Sind evtl. die Namen der Variablen nicht eindeutig?</string>
|
||||
</string>
|
||||
<string name="key_grid">Raster anzeigen</string>
|
||||
<string name="key_grid_tt">Zeigt im Hauptfenster ein Raster an, um das platzieren der Elemente zu erleichtern.</string>
|
||||
<string name="key_wireToolTips">Leitungen als ToolTip</string>
|
||||
<string name="key_wireToolTips_tt">Wenn gesetzt, werden Leitungen hervorgehoben, wenn die Maus darauf zeigt.</string>
|
||||
<string name="key_mapToKey">Auf Tastatur legen</string><!-- Button -->
|
||||
<string name="key_mapToKey_tt">Taste wird durch die Tastatur bedienbar. Um die Cursor-Tasten zu nutzen, kann als
|
||||
Bezeichnung UP, DOWN, LEFT oder RIGHT verwendet werden.</string>
|
||||
|
@ -1200,6 +1200,8 @@
|
||||
It must be ensured that the names of all files in this folder and all subfolders are unique.</string>
|
||||
<string name="key_grid">Show Grid</string>
|
||||
<string name="key_grid_tt">Shows a grid in the main window.</string>
|
||||
<string name="key_wireToolTips">Wire tool tips</string>
|
||||
<string name="key_wireToolTips_tt">If set, lines are highlighted when the mouse hovers over them.</string>
|
||||
<string name="key_mapToKey">Map to keyboard</string><!-- Button -->
|
||||
<string name="key_mapToKey_tt">Button is mapped to the keyboard.
|
||||
To use the cursor keys use UP, DOWN, LEFT or RIGHT as label.</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user