X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fmodel%2Fcomponents%2Fatomic%2FGUIMerger.java;h=85cafecde4eff748c490ab6e075e7435de69ea9a;hb=3c3b223ffd0d54242a8cda1920a562ab01efba60;hp=e72cf8a6bb9430c7548534507f5bd423b10e40ae;hpb=976f7f2be00457b5cda2489545635ccd076c9afd;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIMerger.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIMerger.java index e72cf8a6..85cafecd 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIMerger.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/GUIMerger.java @@ -12,6 +12,7 @@ import net.mograsim.logic.core.wires.Wire.ReadEnd; import net.mograsim.logic.model.model.ViewModelModifiable; import net.mograsim.logic.model.model.components.GUIComponent; import net.mograsim.logic.model.model.wires.Pin; +import net.mograsim.logic.model.model.wires.PinUsage; import net.mograsim.logic.model.modeladapter.ViewLogicModelAdapter; import net.mograsim.logic.model.modeladapter.componentadapters.MergerAdapter; import net.mograsim.logic.model.serializing.IdentifierGetter; @@ -40,11 +41,11 @@ public class GUIMerger extends GUIComponent { super(model, name); this.logicWidth = logicWidth; - setSize(width, logicWidth * heightPerPin); - double inputHeight = 0; - for (int i = 0; i < logicWidth; i++, inputHeight += 10) - addPin(new Pin(this, "I" + i, 1, 0, inputHeight)); - addPin(this.outputPin = new Pin(this, "O", logicWidth, width, (logicWidth - 1) * heightPerPin / 2)); + setSize(width, (logicWidth - 1) * heightPerPin); + double inputHeight = (logicWidth - 1) * heightPerPin; + for (int i = 0; i < logicWidth; i++, inputHeight -= 10) + addPin(new Pin(this, "I" + i, 1, PinUsage.TRISTATE, 0, inputHeight)); + addPin(this.outputPin = new Pin(this, "O", logicWidth, PinUsage.TRISTATE, width, (logicWidth - 1) * heightPerPin / 2)); inputEnds = new ReadEnd[logicWidth]; }