Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobuxstation committed Dec 24, 2023
1 parent 279354d commit 5aaf4b4
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "venom86",
"version": "1.0.2",
"version": "1.0.3",
"description": "x86 Emulation by Qrodex",
"main": "index.js",
"scripts": {
Expand Down
27 changes: 24 additions & 3 deletions scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function init(name, fda, fdb, cdrom, hda, hdb, ram, vram) {
`
document.getElementById('previews').appendChild(preview)

let controls = document.createElement('div')
let controls = document.createElement('footer')
controls.className = 'vmitem'
document.getElementById(contID).appendChild(controls)

Expand Down Expand Up @@ -98,14 +98,35 @@ async function init(name, fda, fdb, cdrom, hda, hdb, ram, vram) {
alttabbtn.innerText = 'Send Alt+Tab'
controls.appendChild(alttabbtn)
alttabbtn.onclick = function (e) {
vm.keyboard_send_keys([18, 9])
vm.keyboard_send_scancodes([
0x38 | 0x80,
0x0F | 0x80,
]);
}

let cadbtn = document.createElement('button')
cadbtn.innerText = 'Send Ctrl+Alt+Del'
controls.appendChild(cadbtn)
cadbtn.onclick = function (e) {
vm.keyboard_send_keys([17, 18, 46])
vm.keyboard_send_scancodes([
0x1D, // ctrl
0x38, // alt
0x53, // delete

// break codes
0x1D | 0x80,
0x38 | 0x80,
0x53 | 0x80,
]);
}

let scaleinput = document.createElement('input')
scaleinput.value = 1.0
scaleinput.type = 'number'
scaleinput.step = 0.25
controls.appendChild(scaleinput)
scaleinput.onchange = function (e) {
vm.screen_set_scale(scaleinput.value, scaleinput.value)
}

let vmloop
Expand Down
19 changes: 17 additions & 2 deletions style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ details,
border: #3d3d3d solid 1px;
}

footer {
width: fit-content;
}

container div {
text-align: center;
height: fit-content !important;
width: 100% !important;
}

fieldset {
background: none;
border: #3d3d3d dashed 2px;
Expand Down Expand Up @@ -160,16 +170,21 @@ legend {
width: 50%;
}

.vmitem button {
.vmitem button, container input {
background: none;
border: #3d3d3d dashed 2px;
padding: 10px;
border-radius: 5px;
margin: 5px;
cursor: pointer;
width: fit-content;
}

container input {
width: 75px;
}

fieldset:hover, .vmitem button:hover {
fieldset:hover, .vmitem button:hover, container input:hover {
border:#6d6d6d dashed 2px;
}

Expand Down

0 comments on commit 5aaf4b4

Please sign in to comment.