projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GUIMerger/GUISplitter now have a reference to their output/input pin
[Mograsim.git]
/
net.mograsim.logic.model
/
src
/
net
/
mograsim
/
logic
/
model
/
model
/
components
/
atomic
/
GUIManualSwitch.java
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIManualSwitch.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIManualSwitch.java
index
ab6e379
..
b9a09e3
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIManualSwitch.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIManualSwitch.java
@@
-30,6
+30,7
@@
public class GUIManualSwitch extends GUIComponent
private static final double height = 15;
private static final double fontHeight = 5;
private static final double height = 15;
private static final double fontHeight = 5;
+ public final int logicWidth;
private final Pin outputPin;
private final LogicObserver logicObs;
private final Pin outputPin;
private final LogicObserver logicObs;
@@
-44,6
+45,7
@@
public class GUIManualSwitch extends GUIComponent
public GUIManualSwitch(ViewModelModifiable model, int logicWidth, String name)
{
super(model, name);
public GUIManualSwitch(ViewModelModifiable model, int logicWidth, String name)
{
super(model, name);
+ this.logicWidth = logicWidth;
logicObs = (i) -> model.requestRedraw();
setSize(width, height);
logicObs = (i) -> model.requestRedraw();
setSize(width, height);
@@
-147,7
+149,7
@@
public class GUIManualSwitch extends GUIComponent
@Override
public JsonElement getParamsForSerializing(IdentifierGetter idGetter)
{
@Override
public JsonElement getParamsForSerializing(IdentifierGetter idGetter)
{
- return new JsonPrimitive(
outputPin.
logicWidth);
+ return new JsonPrimitive(logicWidth);
}
static
}
static