Changed Styling for Inputs and rearranged sizes
This commit is contained in:
348
out/elm.js
348
out/elm.js
@ -5747,6 +5747,108 @@ var $author$project$Main$update = F2(
|
||||
[$author$project$Main$ActNothing]))
|
||||
}),
|
||||
$elm$core$Platform$Cmd$none);
|
||||
case 'MsgCuInstrRegEdit':
|
||||
var text = msg.a;
|
||||
var _v6 = $elm$core$String$toInt(text);
|
||||
if (_v6.$ === 'Just') {
|
||||
var _int = _v6.a;
|
||||
var old_pc = model.pc;
|
||||
var new_pc = _Utils_update(
|
||||
old_pc,
|
||||
{instructionReg: _int});
|
||||
return _Utils_Tuple2(
|
||||
_Utils_update(
|
||||
model,
|
||||
{pc: new_pc}),
|
||||
$elm$core$Platform$Cmd$none);
|
||||
} else {
|
||||
return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none);
|
||||
}
|
||||
case 'MsgCuProgCounterEdit':
|
||||
var text = msg.a;
|
||||
var _v7 = $elm$core$String$toInt(text);
|
||||
if (_v7.$ === 'Just') {
|
||||
var _int = _v7.a;
|
||||
var old_pc = model.pc;
|
||||
var new_pc = _Utils_update(
|
||||
old_pc,
|
||||
{programmCounter: _int});
|
||||
return _Utils_Tuple2(
|
||||
_Utils_update(
|
||||
model,
|
||||
{pc: new_pc}),
|
||||
$elm$core$Platform$Cmd$none);
|
||||
} else {
|
||||
return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none);
|
||||
}
|
||||
case 'MsgCuUCounterEdit':
|
||||
var text = msg.a;
|
||||
var _v8 = $elm$core$String$toInt(text);
|
||||
if (_v8.$ === 'Just') {
|
||||
var _int = _v8.a;
|
||||
var old_pc = model.pc;
|
||||
var new_pc = _Utils_update(
|
||||
old_pc,
|
||||
{uCounter: _int});
|
||||
return _Utils_Tuple2(
|
||||
_Utils_update(
|
||||
model,
|
||||
{pc: new_pc}),
|
||||
$author$project$Main$sendUUpdate('uCycle updated'));
|
||||
} else {
|
||||
return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none);
|
||||
}
|
||||
case 'MsgEditAddressBus':
|
||||
var text = msg.a;
|
||||
var _v9 = $elm$core$String$toInt(text);
|
||||
if (_v9.$ === 'Just') {
|
||||
var _int = _v9.a;
|
||||
var old_pc = model.pc;
|
||||
var new_pc = _Utils_update(
|
||||
old_pc,
|
||||
{addressBus: _int});
|
||||
return _Utils_Tuple2(
|
||||
_Utils_update(
|
||||
model,
|
||||
{pc: new_pc}),
|
||||
$author$project$Main$sendUUpdate('uCycle updated'));
|
||||
} else {
|
||||
return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none);
|
||||
}
|
||||
case 'MsgEditDataBus':
|
||||
var text = msg.a;
|
||||
var _v10 = $elm$core$String$toInt(text);
|
||||
if (_v10.$ === 'Just') {
|
||||
var _int = _v10.a;
|
||||
var old_pc = model.pc;
|
||||
var new_pc = _Utils_update(
|
||||
old_pc,
|
||||
{dataBus: _int});
|
||||
return _Utils_Tuple2(
|
||||
_Utils_update(
|
||||
model,
|
||||
{pc: new_pc}),
|
||||
$elm$core$Platform$Cmd$none);
|
||||
} else {
|
||||
return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none);
|
||||
}
|
||||
case 'MsgAluEdit':
|
||||
var text = msg.a;
|
||||
var _v11 = $elm$core$String$toInt(text);
|
||||
if (_v11.$ === 'Just') {
|
||||
var _int = _v11.a;
|
||||
var old_pc = model.pc;
|
||||
var new_pc = _Utils_update(
|
||||
old_pc,
|
||||
{accumulator: _int});
|
||||
return _Utils_Tuple2(
|
||||
_Utils_update(
|
||||
model,
|
||||
{pc: new_pc}),
|
||||
$elm$core$Platform$Cmd$none);
|
||||
} else {
|
||||
return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none);
|
||||
}
|
||||
default:
|
||||
return _Utils_Tuple2(
|
||||
_Utils_update(
|
||||
@ -5814,6 +5916,9 @@ var $elm$html$Html$Events$onClick = function (msg) {
|
||||
var $elm$virtual_dom$VirtualDom$text = _VirtualDom_text;
|
||||
var $elm$html$Html$text = $elm$virtual_dom$VirtualDom$text;
|
||||
var $elm$html$Html$Attributes$type_ = $elm$html$Html$Attributes$stringProperty('type');
|
||||
var $author$project$Main$MsgEditAddressBus = function (a) {
|
||||
return {$: 'MsgEditAddressBus', a: a};
|
||||
};
|
||||
var $elm$core$String$fromList = _String_fromList;
|
||||
var $author$project$Main$addLeadingZero = F2(
|
||||
function (number, length) {
|
||||
@ -5868,7 +5973,40 @@ var $author$project$Main$addLeadingZero = F2(
|
||||
_Utils_chr('0'))),
|
||||
num_str) : num_str)))))));
|
||||
});
|
||||
var $elm$html$Html$Events$alwaysStop = function (x) {
|
||||
return _Utils_Tuple2(x, true);
|
||||
};
|
||||
var $elm$virtual_dom$VirtualDom$MayStopPropagation = function (a) {
|
||||
return {$: 'MayStopPropagation', a: a};
|
||||
};
|
||||
var $elm$html$Html$Events$stopPropagationOn = F2(
|
||||
function (event, decoder) {
|
||||
return A2(
|
||||
$elm$virtual_dom$VirtualDom$on,
|
||||
event,
|
||||
$elm$virtual_dom$VirtualDom$MayStopPropagation(decoder));
|
||||
});
|
||||
var $elm$json$Json$Decode$field = _Json_decodeField;
|
||||
var $elm$json$Json$Decode$at = F2(
|
||||
function (fields, decoder) {
|
||||
return A3($elm$core$List$foldr, $elm$json$Json$Decode$field, decoder, fields);
|
||||
});
|
||||
var $elm$html$Html$Events$targetValue = A2(
|
||||
$elm$json$Json$Decode$at,
|
||||
_List_fromArray(
|
||||
['target', 'value']),
|
||||
$elm$json$Json$Decode$string);
|
||||
var $elm$html$Html$Events$onInput = function (tagger) {
|
||||
return A2(
|
||||
$elm$html$Html$Events$stopPropagationOn,
|
||||
'input',
|
||||
A2(
|
||||
$elm$json$Json$Decode$map,
|
||||
$elm$html$Html$Events$alwaysStop,
|
||||
A2($elm$json$Json$Decode$map, tagger, $elm$html$Html$Events$targetValue)));
|
||||
};
|
||||
var $elm$html$Html$span = _VirtualDom_node('span');
|
||||
var $elm$html$Html$Attributes$value = $elm$html$Html$Attributes$stringProperty('value');
|
||||
var $author$project$Main$viewAddressBus = function (model) {
|
||||
return A2(
|
||||
$elm$html$Html$div,
|
||||
@ -5893,11 +6031,22 @@ var $author$project$Main$viewAddressBus = function (model) {
|
||||
_List_Nil,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text(
|
||||
A2($author$project$Main$addLeadingZero, model.pc.addressBus, 3))
|
||||
A2(
|
||||
$elm$html$Html$input,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$type_('number'),
|
||||
$elm$html$Html$Attributes$value(
|
||||
A2($author$project$Main$addLeadingZero, model.pc.addressBus, 3)),
|
||||
$elm$html$Html$Events$onInput($author$project$Main$MsgEditAddressBus)
|
||||
]),
|
||||
_List_Nil)
|
||||
]))
|
||||
]));
|
||||
};
|
||||
var $author$project$Main$MsgAluEdit = function (a) {
|
||||
return {$: 'MsgAluEdit', a: a};
|
||||
};
|
||||
var $author$project$Main$MsgManualStep = function (a) {
|
||||
return {$: 'MsgManualStep', a: a};
|
||||
};
|
||||
@ -5929,8 +6078,27 @@ var $author$project$Main$viewAlu = function (model) {
|
||||
_List_Nil,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text(
|
||||
'Accumulator: ' + A2($author$project$Main$addLeadingZero, model.pc.accumulator, 8))
|
||||
A2(
|
||||
$elm$html$Html$label,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$for('alu-accumulator')
|
||||
]),
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text('Accumulator:')
|
||||
])),
|
||||
A2(
|
||||
$elm$html$Html$input,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$type_('number'),
|
||||
$elm$html$Html$Attributes$id('alu-accumulator'),
|
||||
$elm$html$Html$Attributes$value(
|
||||
A2($author$project$Main$addLeadingZero, model.pc.accumulator, 8)),
|
||||
$elm$html$Html$Events$onInput($author$project$Main$MsgAluEdit)
|
||||
]),
|
||||
_List_Nil)
|
||||
])),
|
||||
A2(
|
||||
$elm$html$Html$div,
|
||||
@ -5996,6 +6164,15 @@ var $author$project$Main$viewAlu = function (model) {
|
||||
]))
|
||||
]));
|
||||
};
|
||||
var $author$project$Main$MsgCuInstrRegEdit = function (a) {
|
||||
return {$: 'MsgCuInstrRegEdit', a: a};
|
||||
};
|
||||
var $author$project$Main$MsgCuProgCounterEdit = function (a) {
|
||||
return {$: 'MsgCuProgCounterEdit', a: a};
|
||||
};
|
||||
var $author$project$Main$MsgCuUCounterEdit = function (a) {
|
||||
return {$: 'MsgCuUCounterEdit', a: a};
|
||||
};
|
||||
var $elm$html$Html$table = _VirtualDom_node('table');
|
||||
var $elm$html$Html$th = _VirtualDom_node('th');
|
||||
var $elm$html$Html$thead = _VirtualDom_node('thead');
|
||||
@ -6013,7 +6190,6 @@ var $author$project$Main$MsgCuEditAction = F2(
|
||||
});
|
||||
var $elm$html$Html$option = _VirtualDom_node('option');
|
||||
var $elm$html$Html$select = _VirtualDom_node('select');
|
||||
var $elm$json$Json$Decode$field = _Json_decodeField;
|
||||
var $author$project$Main$selectCuValueDecoder = A2(
|
||||
$elm$json$Json$Decode$field,
|
||||
'target',
|
||||
@ -6166,13 +6342,6 @@ var $author$project$Main$viewCuUCode = function (model) {
|
||||
A2($elm$html$Html$Lazy$lazy, $author$project$Main$viewCuUCodeContent, model)
|
||||
]));
|
||||
};
|
||||
var $author$project$Main$viewInstrEntry = function (i) {
|
||||
var _v0 = $author$project$Main$seperateInstructionsEntry(i);
|
||||
var instruction = _v0.a;
|
||||
var address = _v0.b;
|
||||
return $elm$html$Html$text(
|
||||
A2($author$project$Main$addLeadingZero, instruction, 3) + (' ' + A2($author$project$Main$addLeadingZero, address, 5)));
|
||||
};
|
||||
var $author$project$Main$viewCu = function (model) {
|
||||
return A2(
|
||||
$elm$html$Html$div,
|
||||
@ -6263,24 +6432,96 @@ var $author$project$Main$viewCu = function (model) {
|
||||
_List_Nil,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text(
|
||||
'Programm Counter: ' + A2($author$project$Main$addLeadingZero, model.pc.programmCounter, 3))
|
||||
])),
|
||||
A2(
|
||||
$elm$html$Html$p,
|
||||
_List_Nil,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text('Instruction Register: '),
|
||||
$author$project$Main$viewInstrEntry(model.pc.instructionReg)
|
||||
])),
|
||||
A2(
|
||||
$elm$html$Html$p,
|
||||
_List_Nil,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text(
|
||||
'µCode Counter: ' + A2($author$project$Main$addLeadingZero, model.pc.uCounter, 4))
|
||||
A2(
|
||||
$elm$html$Html$div,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$class('input-row')
|
||||
]),
|
||||
_List_fromArray(
|
||||
[
|
||||
A2(
|
||||
$elm$html$Html$label,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$for('cu-progcounter')
|
||||
]),
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text('Programm Counter:')
|
||||
])),
|
||||
A2(
|
||||
$elm$html$Html$input,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$type_('number'),
|
||||
$elm$html$Html$Attributes$id('cu-progcounter'),
|
||||
$elm$html$Html$Attributes$value(
|
||||
A2($author$project$Main$addLeadingZero, model.pc.programmCounter, 3)),
|
||||
$elm$html$Html$Events$onInput($author$project$Main$MsgCuProgCounterEdit)
|
||||
]),
|
||||
_List_Nil)
|
||||
])),
|
||||
A2(
|
||||
$elm$html$Html$div,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$class('input-row')
|
||||
]),
|
||||
_List_fromArray(
|
||||
[
|
||||
A2(
|
||||
$elm$html$Html$label,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$for('cu-instrReg')
|
||||
]),
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text('Instruction Register:')
|
||||
])),
|
||||
A2(
|
||||
$elm$html$Html$input,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$type_('number'),
|
||||
$elm$html$Html$Attributes$id('cu-instrReg'),
|
||||
$elm$html$Html$Attributes$value(
|
||||
A2($author$project$Main$addLeadingZero, model.pc.instructionReg, 8)),
|
||||
$elm$html$Html$Events$onInput($author$project$Main$MsgCuInstrRegEdit)
|
||||
]),
|
||||
_List_Nil)
|
||||
])),
|
||||
A2(
|
||||
$elm$html$Html$div,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$class('input-row')
|
||||
]),
|
||||
_List_fromArray(
|
||||
[
|
||||
A2(
|
||||
$elm$html$Html$label,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$for('cu-uCounter')
|
||||
]),
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text('µCode Counter:')
|
||||
])),
|
||||
A2(
|
||||
$elm$html$Html$input,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$type_('number'),
|
||||
$elm$html$Html$Attributes$id('cu-uCounter'),
|
||||
$elm$html$Html$Attributes$value(
|
||||
A2($author$project$Main$addLeadingZero, model.pc.uCounter, 4)),
|
||||
$elm$html$Html$Events$onInput($author$project$Main$MsgCuUCounterEdit)
|
||||
]),
|
||||
_List_Nil)
|
||||
]))
|
||||
])),
|
||||
A2(
|
||||
$elm$html$Html$div,
|
||||
@ -6325,6 +6566,9 @@ var $author$project$Main$viewCu = function (model) {
|
||||
]))
|
||||
]));
|
||||
};
|
||||
var $author$project$Main$MsgEditDataBus = function (a) {
|
||||
return {$: 'MsgEditDataBus', a: a};
|
||||
};
|
||||
var $author$project$Main$viewDataBus = function (model) {
|
||||
return A2(
|
||||
$elm$html$Html$div,
|
||||
@ -6349,8 +6593,16 @@ var $author$project$Main$viewDataBus = function (model) {
|
||||
_List_Nil,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$text(
|
||||
A2($author$project$Main$addLeadingZero, model.pc.dataBus, 8))
|
||||
A2(
|
||||
$elm$html$Html$input,
|
||||
_List_fromArray(
|
||||
[
|
||||
$elm$html$Html$Attributes$type_('number'),
|
||||
$elm$html$Html$Attributes$value(
|
||||
A2($author$project$Main$addLeadingZero, model.pc.dataBus, 8)),
|
||||
$elm$html$Html$Events$onInput($author$project$Main$MsgEditDataBus)
|
||||
]),
|
||||
_List_Nil)
|
||||
]))
|
||||
]));
|
||||
};
|
||||
@ -6363,38 +6615,6 @@ var $author$project$Main$MsgRamEditInstr = F2(
|
||||
function (a, b) {
|
||||
return {$: 'MsgRamEditInstr', a: a, b: b};
|
||||
});
|
||||
var $elm$html$Html$Events$alwaysStop = function (x) {
|
||||
return _Utils_Tuple2(x, true);
|
||||
};
|
||||
var $elm$virtual_dom$VirtualDom$MayStopPropagation = function (a) {
|
||||
return {$: 'MayStopPropagation', a: a};
|
||||
};
|
||||
var $elm$html$Html$Events$stopPropagationOn = F2(
|
||||
function (event, decoder) {
|
||||
return A2(
|
||||
$elm$virtual_dom$VirtualDom$on,
|
||||
event,
|
||||
$elm$virtual_dom$VirtualDom$MayStopPropagation(decoder));
|
||||
});
|
||||
var $elm$json$Json$Decode$at = F2(
|
||||
function (fields, decoder) {
|
||||
return A3($elm$core$List$foldr, $elm$json$Json$Decode$field, decoder, fields);
|
||||
});
|
||||
var $elm$html$Html$Events$targetValue = A2(
|
||||
$elm$json$Json$Decode$at,
|
||||
_List_fromArray(
|
||||
['target', 'value']),
|
||||
$elm$json$Json$Decode$string);
|
||||
var $elm$html$Html$Events$onInput = function (tagger) {
|
||||
return A2(
|
||||
$elm$html$Html$Events$stopPropagationOn,
|
||||
'input',
|
||||
A2(
|
||||
$elm$json$Json$Decode$map,
|
||||
$elm$html$Html$Events$alwaysStop,
|
||||
A2($elm$json$Json$Decode$map, tagger, $elm$html$Html$Events$targetValue)));
|
||||
};
|
||||
var $elm$html$Html$Attributes$value = $elm$html$Html$Attributes$stringProperty('value');
|
||||
var $author$project$Main$viewRamContent = function (model) {
|
||||
var ram2table = function (entry) {
|
||||
var val = entry.b;
|
||||
|
Reference in New Issue
Block a user