Ready for merge
This commit is contained in:
parent
03cb438b9b
commit
fe9af9b409
@ -51,11 +51,11 @@ app.inspect = function () {
|
|||||||
app.win.toggleDevTools()
|
app.win.toggleDevTools()
|
||||||
}
|
}
|
||||||
|
|
||||||
app.toggle_fullscreen = function () {
|
app.toggleFullscreen = function () {
|
||||||
app.win.setFullScreen(!app.win.isFullScreen())
|
app.win.setFullScreen(!app.win.isFullScreen())
|
||||||
}
|
}
|
||||||
|
|
||||||
app.toggle_visible = function () {
|
app.toggleVisible = function () {
|
||||||
if (process.platform == 'win32') {
|
if (process.platform == 'win32') {
|
||||||
if (!app.win.isMinimized()) { app.win.minimize() } else { app.win.restore() }
|
if (!app.win.isMinimized()) { app.win.minimize() } else { app.win.restore() }
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,20 +4,20 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<!-- Generics -->
|
||||||
<script type="text/javascript" src="scripts/lib/theme.js"></script>
|
<script type="text/javascript" src="scripts/lib/theme.js"></script>
|
||||||
<script type="text/javascript" src="scripts/lib/controller.js"></script>
|
|
||||||
<script type="text/javascript" src="scripts/lib/history.js"></script>
|
<script type="text/javascript" src="scripts/lib/history.js"></script>
|
||||||
|
<script type="text/javascript" src="scripts/lib/controller.js"></script>
|
||||||
|
<!-- Dotgrid -->
|
||||||
<script type="text/javascript" src="scripts/dotgrid.js"></script>
|
<script type="text/javascript" src="scripts/dotgrid.js"></script>
|
||||||
<script type="text/javascript" src="scripts/cursor.js"></script>
|
<script type="text/javascript" src="scripts/manager.js"></script>
|
||||||
<script type="text/javascript" src="scripts/guide.js"></script>
|
|
||||||
<script type="text/javascript" src="scripts/renderer.js"></script>
|
<script type="text/javascript" src="scripts/renderer.js"></script>
|
||||||
|
<script type="text/javascript" src="scripts/cursor.js"></script>
|
||||||
<script type="text/javascript" src="scripts/interface.js"></script>
|
<script type="text/javascript" src="scripts/interface.js"></script>
|
||||||
<script type="text/javascript" src="scripts/tool.js"></script>
|
<script type="text/javascript" src="scripts/tool.js"></script>
|
||||||
<script type="text/javascript" src="scripts/generator.js"></script>
|
<script type="text/javascript" src="scripts/generator.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="scripts/picker.js"></script>
|
<script type="text/javascript" src="scripts/picker.js"></script>
|
||||||
|
<!-- Styles -->
|
||||||
<link rel="stylesheet" type="text/css" href="links/reset.css"/>
|
<link rel="stylesheet" type="text/css" href="links/reset.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="links/fonts.css"/>
|
<link rel="stylesheet" type="text/css" href="links/fonts.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="links/main.css"/>
|
<link rel="stylesheet" type="text/css" href="links/main.css"/>
|
||||||
@ -35,8 +35,8 @@
|
|||||||
DOTGRID.controller = new Controller();
|
DOTGRID.controller = new Controller();
|
||||||
|
|
||||||
DOTGRID.controller.add("default","*","About",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Dotgrid'); },"CmdOrCtrl+,");
|
DOTGRID.controller.add("default","*","About",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Dotgrid'); },"CmdOrCtrl+,");
|
||||||
DOTGRID.controller.add("default","*","Fullscreen",() => { app.toggle_fullscreen(); },"CmdOrCtrl+Enter");
|
DOTGRID.controller.add("default","*","Fullscreen",() => { app.toggleFullscreen(); },"CmdOrCtrl+Enter");
|
||||||
DOTGRID.controller.add("default","*","Hide",() => { app.toggle_visible(); },"CmdOrCtrl+H");
|
DOTGRID.controller.add("default","*","Hide",() => { app.toggleVisible(); },"CmdOrCtrl+H");
|
||||||
DOTGRID.controller.add("default","*","Inspect",() => { app.inspect(); },"CmdOrCtrl+.");
|
DOTGRID.controller.add("default","*","Inspect",() => { app.inspect(); },"CmdOrCtrl+.");
|
||||||
DOTGRID.controller.add("default","*","Reset",() => { DOTGRID.reset(); DOTGRID.theme.reset(); },"CmdOrCtrl+Backspace");
|
DOTGRID.controller.add("default","*","Reset",() => { DOTGRID.reset(); DOTGRID.theme.reset(); },"CmdOrCtrl+Backspace");
|
||||||
DOTGRID.controller.add("default","*","Quit",() => { app.exit(); },"CmdOrCtrl+Q");
|
DOTGRID.controller.add("default","*","Quit",() => { app.exit(); },"CmdOrCtrl+Q");
|
||||||
@ -94,8 +94,8 @@
|
|||||||
DOTGRID.controller.add("default","Theme","Download Themes..",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Themes'); })
|
DOTGRID.controller.add("default","Theme","Download Themes..",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Themes'); })
|
||||||
|
|
||||||
DOTGRID.controller.add("picker","*","About",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Dotgrid'); },"CmdOrCtrl+,");
|
DOTGRID.controller.add("picker","*","About",() => { require('electron').shell.openExternal('https://github.com/hundredrabbits/Dotgrid'); },"CmdOrCtrl+,");
|
||||||
DOTGRID.controller.add("picker","*","Fullscreen",() => { app.toggle_fullscreen(); },"CmdOrCtrl+Enter");
|
DOTGRID.controller.add("picker","*","Fullscreen",() => { app.toggleFullscreen(); },"CmdOrCtrl+Enter");
|
||||||
DOTGRID.controller.add("picker","*","Hide",() => { app.toggle_visible(); },"CmdOrCtrl+H");
|
DOTGRID.controller.add("picker","*","Hide",() => { app.toggleVisible(); },"CmdOrCtrl+H");
|
||||||
DOTGRID.controller.add("picker","*","Inspect",() => { app.inspect(); },"CmdOrCtrl+.");
|
DOTGRID.controller.add("picker","*","Inspect",() => { app.inspect(); },"CmdOrCtrl+.");
|
||||||
DOTGRID.controller.add("picker","*","Documentation",() => { DOTGRID.controller.docs(); },"CmdOrCtrl+Esc");
|
DOTGRID.controller.add("picker","*","Documentation",() => { DOTGRID.controller.docs(); },"CmdOrCtrl+Esc");
|
||||||
DOTGRID.controller.add("picker","*","Reset",() => { DOTGRID.reset(); DOTGRID.theme.reset(); },"CmdOrCtrl+Backspace");
|
DOTGRID.controller.add("picker","*","Reset",() => { DOTGRID.reset(); DOTGRID.theme.reset(); },"CmdOrCtrl+Backspace");
|
||||||
|
@ -1,7 +1,17 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
function Dotgrid (width, height) {
|
function Dotgrid (width, height) {
|
||||||
const defaultTheme = { background: '#eee', f_high: '#000', f_med: '#999', f_low: '#ccc', f_inv: '#000', b_high: '#000', b_med: '#888', b_low: '#aaa', b_inv: '#ffb545' }
|
const defaultTheme = {
|
||||||
|
background: '#eee',
|
||||||
|
f_high: '#000',
|
||||||
|
f_med: '#999',
|
||||||
|
f_low: '#ccc',
|
||||||
|
f_inv: '#000',
|
||||||
|
b_high: '#000',
|
||||||
|
b_med: '#888',
|
||||||
|
b_low: '#aaa',
|
||||||
|
b_inv: '#ffb545'
|
||||||
|
}
|
||||||
|
|
||||||
// ISU
|
// ISU
|
||||||
|
|
||||||
@ -49,6 +59,19 @@ function Dotgrid (width, height) {
|
|||||||
DOTGRID.renderer.update()
|
DOTGRID.renderer.update()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.clear = function () {
|
||||||
|
this.history.clear()
|
||||||
|
this.tool.reset()
|
||||||
|
this.reset()
|
||||||
|
this.renderer.update()
|
||||||
|
this.interface.update(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
this.reset = function () {
|
||||||
|
this.tool.clear()
|
||||||
|
this.update()
|
||||||
|
}
|
||||||
|
|
||||||
// File
|
// File
|
||||||
|
|
||||||
this.new = function () {
|
this.new = function () {
|
||||||
@ -133,19 +156,6 @@ function Dotgrid (width, height) {
|
|||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
|
|
||||||
this.reset = function () {
|
|
||||||
this.tool.clear()
|
|
||||||
this.update()
|
|
||||||
}
|
|
||||||
|
|
||||||
this.clear = function () {
|
|
||||||
this.history.clear()
|
|
||||||
this.tool.reset()
|
|
||||||
this.reset()
|
|
||||||
this.renderer.update()
|
|
||||||
this.interface.update(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
this.resize = function () {
|
this.resize = function () {
|
||||||
const size = { width: step(window.innerWidth - 90, 15), height: step(window.innerHeight - 120, 15) }
|
const size = { width: step(window.innerWidth - 90, 15), height: step(window.innerHeight - 120, 15) }
|
||||||
|
|
||||||
@ -163,6 +173,8 @@ function Dotgrid (width, height) {
|
|||||||
document.title = `Dotgrid — ${size.width}x${size.height}`
|
document.title = `Dotgrid — ${size.width}x${size.height}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Events
|
||||||
|
|
||||||
this.drag = function (e) {
|
this.drag = function (e) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
|
@ -206,7 +206,7 @@ function Tool (dotgrid) {
|
|||||||
|
|
||||||
this.source = function (type) {
|
this.source = function (type) {
|
||||||
if (type == 'grid') { dotgrid.renderer.toggle() }
|
if (type == 'grid') { dotgrid.renderer.toggle() }
|
||||||
if (type == 'screen') { app.toggle_fullscreen() }
|
if (type == 'screen') { app.toggleFullscreen() }
|
||||||
|
|
||||||
if (type == 'open') { dotgrid.open() }
|
if (type == 'open') { dotgrid.open() }
|
||||||
if (type == 'save') { dotgrid.save() }
|
if (type == 'save') { dotgrid.save() }
|
||||||
|
@ -21,11 +21,11 @@
|
|||||||
<!-- Generics -->
|
<!-- Generics -->
|
||||||
<script type="text/javascript" src="desktop/sources/scripts/lib/theme.js"></script>
|
<script type="text/javascript" src="desktop/sources/scripts/lib/theme.js"></script>
|
||||||
<script type="text/javascript" src="desktop/sources/scripts/lib/history.js"></script>
|
<script type="text/javascript" src="desktop/sources/scripts/lib/history.js"></script>
|
||||||
|
<!-- Dotgrid -->
|
||||||
<script type="text/javascript" src="desktop/sources/scripts/dotgrid.js"></script>
|
<script type="text/javascript" src="desktop/sources/scripts/dotgrid.js"></script>
|
||||||
<script type="text/javascript" src="desktop/sources/scripts/manager.js"></script>
|
<script type="text/javascript" src="desktop/sources/scripts/manager.js"></script>
|
||||||
<script type="text/javascript" src="desktop/sources/scripts/renderer.js"></script>
|
<script type="text/javascript" src="desktop/sources/scripts/renderer.js"></script>
|
||||||
<script type="text/javascript" src="desktop/sources/scripts/cursor.js"></script>
|
<script type="text/javascript" src="desktop/sources/scripts/cursor.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="desktop/sources/scripts/interface.js"></script>
|
<script type="text/javascript" src="desktop/sources/scripts/interface.js"></script>
|
||||||
<script type="text/javascript" src="desktop/sources/scripts/tool.js"></script>
|
<script type="text/javascript" src="desktop/sources/scripts/tool.js"></script>
|
||||||
<script type="text/javascript" src="desktop/sources/scripts/generator.js"></script>
|
<script type="text/javascript" src="desktop/sources/scripts/generator.js"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user