git @ Cat's Eye Technologies Lexeduct / 3873115
Make the UI look slightly nicer. Chris Pressey 6 years ago
1 changed file(s) with 13 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
2424 input = yoob.makeTextArea(container, 40, 20, cfg.initialText);
2525 input.onkeyup = function() {
2626 if ($this.liveMode) {
27 // TODO don't do this if it's a deadkey like shift
2728 $this.process();
2829 }
2930 };
3031
3132 var transformersPanel = yoob.makeDiv(container);
32 transformersPanel.style.border = "2px solid black";
33 transformersPanel.style.border = "1px solid black";
34 transformersPanel.style.padding = "2px";
35 transformersPanel.style.margin = "2px";
3336 transformersPanel.style.display = "inline-block";
3437 transformersPanel.style.verticalAlign = "top";
3538
97100 paramInput.onkeyup = function() {
98101 slot.selectedParams[paramName] = paramInput.value;
99102 if ($this.liveMode) {
103 // TODO don't do this if it's a deadkey like shift
100104 $this.process();
101105 }
102106 };
104108 };
105109
106110 this.makeTransformerSlot = function(container, index) {
111 var slotPanel = yoob.makeDiv(container);
112 slotPanel.style.padding = "2px";
113 slotPanel.style.margin = "2px";
114 slotPanel.style.border = "1px solid black";
107115 var select = yoob.makeSelect(
108 container, "Transformer " + (index+1), transformerNames
116 slotPanel, "Transformer " + (index+1), transformerNames
109117 );
110 yoob.makeLineBreak(container);
111 var parametersPanel = yoob.makeDiv(container);
112 parametersPanel.style.padding = "2px";
113 parametersPanel.style.border = "1px solid blue";
118 yoob.makeLineBreak(slotPanel);
119 var parametersPanel = yoob.makeDiv(slotPanel);
114120 parametersPanel.style.textAlign = "right";
115121
116122 var $this = this;
124130
125131 return {
126132 name: 'identity',
127 selectedParams: {},
128 select: select,
129 parametersPanel: parametersPanel
133 selectedParams: {}
130134 };
131135 };
132136