Take screenshot
This commit is contained in:
parent
f2aea875d5
commit
7a602b985b
|
@ -42,6 +42,7 @@
|
|||
<input type="button" value="Get floppy image" id="get_floppy">
|
||||
<input type="button" value="Lock mouse" id="lock_mouse">
|
||||
<input type="button" value="Go fullscreen" id="fullscreen">
|
||||
<input type="button" value="Take screenshot (only graphic modes)" id="take_screenshot">
|
||||
|
||||
Scale:
|
||||
<input type="number" min="0.25" step="0.25" value="1.0" id="scale" style="width: 50px">
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
<input type="button" value="Get modified floppy image" id="get_floppy">
|
||||
<input type="button" value="Lock mouse" id="lock_mouse">
|
||||
<input type="button" value="Go fullscreen" id="fullscreen">
|
||||
<input type="button" value="Take screenshot (only graphic modes)" id="take_screenshot">
|
||||
|
||||
Scale:
|
||||
<input type="number" min="0.25" step="0.25" value="1.0" id="scale" style="width: 50px">
|
||||
|
|
|
@ -661,6 +661,11 @@ function dump_file(ab, name)
|
|||
lock_mouse(elem);
|
||||
};
|
||||
|
||||
$("take_screenshot").onclick = function()
|
||||
{
|
||||
screen_adapter.make_screenshot();
|
||||
};
|
||||
|
||||
settings.screen_adapter = screen_adapter;
|
||||
settings.keyboard_adapter = new KeyboardAdapter();
|
||||
settings.mouse_adapter = new MouseAdapter();
|
||||
|
|
|
@ -99,6 +99,14 @@ function ScreenAdapter()
|
|||
|
||||
graphic_screen.style.display = "none";
|
||||
|
||||
this.make_screenshot = function()
|
||||
{
|
||||
try {
|
||||
window.open(graphic_screen.toDataURL());
|
||||
}
|
||||
catch(e) {}
|
||||
};
|
||||
|
||||
this.put_char = function(row, col, chr, bg_color, fg_color)
|
||||
{
|
||||
changed_rows[row] = 1;
|
||||
|
|
Loading…
Reference in a new issue