diff --git a/.eslintrc.js b/.eslintrc.js
index af86acc..b8b3f40 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -114,7 +114,7 @@ module.exports = {
"$ColorBox": "writable",
"$Window": "writable",
"$ToolWindow": "writable",
- "$FormToolWindow": "writable",
+ "$DialogWindow": "writable",
"$Handles": "writable",
"$ChooseShapeStyle": "writable",
"OnCanvasSelection": "writable",
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 81e48e1..7c8c5fe 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -9,25 +9,35 @@
"**/out": true
},
"cSpell.words": [
- "APNGs",
"Adlm",
+ "Æвзаг",
"Afaan",
"Afaraf",
+ "airb",
+ "ajeļ",
"Allaire",
+ "allowfullscreen",
+ "anypalette",
+ "apng",
+ "APNGs",
"Aragonés",
"Asụsụ",
- "Avaric",
+ "autosave",
+ "autoupdating",
"Avañe'ẽ",
+ "Avaric",
"Ayisyen",
"Aymar",
"Azərbaycan",
- "BMPs",
"Bahasa",
"Bamanankan",
"Basa",
+ "bepis",
"Bgau",
+ "bgcolor",
"Bislama",
"Bizaad",
+ "BMPs",
"Bokmål",
"Bopo",
"Bosanski",
@@ -36,88 +46,150 @@
"Bresenham's",
"Brezhoneg",
"Català",
+ "Český",
+ "Čeština",
"Chamoru",
"Chewa",
"Chichewa",
"Chinyanja",
"Chuang",
+ "classid",
+ "clipart",
"Clippy",
+ "clsid",
+ "cmaps",
+ "colorbox",
+ "contenteditable",
"Corel",
"Corsa",
"Corsu",
"Cpath",
"Crect",
"Csvg",
+ "ctype",
"Cue",
"Cuengh",
"Cueŋƅ",
"Cymraeg",
"Cyrl",
- "DIALOGEX",
+ "d'Òc",
"Dansk",
"Darude",
"Davvis",
"Davvisámegiella",
+ "desaturated",
"Deutsch",
"Dhivehi",
+ "DIALOGEX",
"Dili",
"Divehi",
+ "djvu",
"Dorerin",
+ "draggable",
"Dzongkha",
"Eesti",
+ "egbe",
+ "ellipticals",
+ "endonym",
+ "eqeqeq",
+ "equivalize",
+ "ertical",
+ "esque",
"Euskara",
"Euskera",
- "Excelsi",
"Eʋegbe",
+ "Excelsi",
+ "eyedrop",
"Fa'a",
"Faka",
+ "farbling",
"Faroese",
+ "fieldsets",
+ "firebaseapp",
"Fiteny",
+ "fliph",
+ "flippable",
+ "flipv",
+ "floodfill",
+ "floodfilling",
+ "focusables",
+ "focusring",
+ "fontbox",
+ "Føroyskt",
"Fran",
"Français",
"Française",
+ "frowny",
"Frysk",
"Fsvg",
+ "fudgedness",
"Fulah",
"Fulfulde",
"Fwww",
- "Føroyskt",
- "GIFs",
"Gaeilge",
"Gaelg",
"Gagana",
+ "Gàidhlig",
"Gailck",
"Galego",
+ "gazemouse",
+ "ghostwhite",
+ "GIFs",
"Gikuyu",
"Glag",
+ "gons",
+ "gridlines",
"Grischun",
- "Gàidhlig",
- "HKEY",
+ "hackily",
+ "hacky",
+ "haha",
"Hanb",
"Hant",
+ "hcanvas",
+ "hctx",
+ "headmouse",
+ "hilight",
"Hiri",
+ "HKEY",
+ "hostnames",
"Hrvatski",
+ "hslrgb",
+ "hsrgb",
+ "humbnail",
+ "icns",
+ "iconify",
+ "idhlig",
"IFDs",
+ "iframe's",
+ "iframes",
"IIFE",
"Ikinyarwanda",
"Ikirundi",
"Imgur",
"Inkscape",
"Interlingue",
- "Italiano",
"Iñupiatun",
- "JSGF",
+ "isaiahodhner",
+ "isded",
+ "Íslenska",
+ "Italiano",
"Jasc",
"Jawa",
"Jazyk",
"Jezik",
"Język",
+ "jfif",
+ "jnordberg",
+ "JSGF",
+ "jspaint",
+ "jsperf",
"Kajin",
"Kalaallisut",
"Kalaallit",
"Kalba",
"Kanuri",
"Kernewek",
+ "keyshortcuts",
"Khoj",
"Kichwa",
"Kieli",
@@ -137,185 +209,17 @@
"Latvie",
"Latviešu",
"Lenga",
+ "lerp",
+ "Lëtzebuergesch",
"Letzeburgesch",
+ "libgconf",
+ "libtess",
"Lietuvių",
"Limburgan",
"Limburgish",
"Limburgs",
"Linb",
"Lingála",
- "Luba",
- "Luciferi",
- "Luxembourgish",
- "Lëtzebuergesch",
- "MSIE",
- "Macromedia",
- "Malti",
- "Melayu",
- "Mopaint",
- "Motu",
- "Naoero",
- "Nbat",
- "Ndebele",
- "Ndonga",
- "Nederlands",
- "Nkoo",
- "Norsk",
- "Nuosu",
- "Nuosuhxop",
- "Nyanja",
- "Occitan",
- "Odhner",
- "Optikey",
- "Oqaasii",
- "Oromo",
- "Oromoo",
- "Ossetian",
- "Otjiherero",
- "Owambo",
- "Oʻzbek",
- "PDFs",
- "PLTE",
- "PNGs",
- "Phlp",
- "Photoshop",
- "Polski",
- "Polszczyzna",
- "Português",
- "Pulaar",
- "Pular",
- "Pushto",
- "RGBAs",
- "RTLCSS",
- "Rege",
- "Română",
- "Rumantsch",
- "Runa",
- "Rundi",
- "STRINGTABLE",
- "Sami",
- "Sango",
- "Sardu",
- "Satana",
- "Satanas",
- "Scribus",
- "Sesotho",
- "Setswana",
- "Shft",
- "Shona",
- "Shqip",
- "Simi",
- "Sinhala",
- "Skencil",
- "Slovenski",
- "Slovenský",
- "Slovenčina",
- "Slovenščina",
- "Soomaali",
- "Soomaaliga",
- "Sotho",
- "Suomen",
- "Svenska",
- "Swati",
- "Tiếng",
- "Toçikī",
- "Tshivenḓa",
- "Tsonga",
- "Tvcy",
- "Türkçe",
- "UPNG",
- "UTIF",
- "Uyghur",
- "Uyghurche",
- "VSNs",
- "Vakaviti",
- "Valencian",
- "Valoda",
- "Venda",
- "Viacam",
- "Việt",
- "Vlaams",
- "Volapük",
- "Vosa",
- "Walon",
- "Wayback",
- "Wikang",
- "Wollof",
- "Xitsonga",
- "Yângâ",
- "Zhuang",
- "Zhōngwén",
- "airb",
- "ajeļ",
- "allowfullscreen",
- "anypalette",
- "apng",
- "autosave",
- "autoupdating",
- "bepis",
- "bgcolor",
- "classid",
- "clipart",
- "clsid",
- "cmaps",
- "colorbox",
- "contenteditable",
- "ctype",
- "d'Òc",
- "desaturated",
- "djvu",
- "draggable",
- "egbe",
- "ellipticals",
- "endonym",
- "eqeqeq",
- "equivalize",
- "ertical",
- "esque",
- "eyedrop",
- "farbling",
- "fieldsets",
- "firebaseapp",
- "fliph",
- "flippable",
- "flipv",
- "floodfill",
- "floodfilling",
- "focusables",
- "focusring",
- "fontbox",
- "frowny",
- "fudgedness",
- "gazemouse",
- "ghostwhite",
- "gons",
- "gridlines",
- "hackily",
- "hacky",
- "haha",
- "hcanvas",
- "hctx",
- "headmouse",
- "hilight",
- "hostnames",
- "hslrgb",
- "hsrgb",
- "humbnail",
- "icns",
- "iconify",
- "idhlig",
- "iframe's",
- "iframes",
- "isaiahodhner",
- "isded",
- "jfif",
- "jnordberg",
- "jspaint",
- "jsperf",
- "keyshortcuts",
- "lerp",
- "libgconf",
- "libtess",
"liveweb",
"llpaper",
"localdomain",
@@ -323,49 +227,90 @@
"lrgb",
"lsid",
"ltres",
+ "Luba",
+ "Luciferi",
+ "Luxembourgish",
+ "Macromedia",
+ "Malti",
"mediump",
"megiella",
+ "Melayu",
"mimg",
"mobipaint",
"monospace",
+ "Mopaint",
+ "Motu",
"mouseleave",
"msapplication",
+ "MSIE",
"mspaint",
"multitools",
"multitouch",
"multiuser",
"murl",
+ "Naoero",
+ "Nbat",
+ "Ndebele",
+ "Ndonga",
+ "Nederlands",
"nesw",
"nevermind",
+ "Nkoo",
"nomine",
+ "Norsk",
"nostri",
"numberofcolors",
"numpad",
+ "Nuosu",
+ "Nuosuhxop",
"nwse",
+ "Nyanja",
+ "Occitan",
"occluder",
"octree",
+ "Odhner",
+ "Oʻzbek",
"oleobject",
"onwriteend",
+ "Optikey",
+ "Oqaasii",
"orizontal",
+ "Oromo",
+ "Oromoo",
+ "Ossetian",
+ "Otjiherero",
"ovaloid",
"ovaloids",
"oviforms",
+ "Owambo",
"paintbucket",
"pako",
"palettized",
"paypal",
+ "PDFs",
"peggys",
+ "Phlp",
+ "Photoshop",
"pixeling",
+ "PLTE",
+ "PNGs",
"pointerenter",
"pointerleave",
"pointermove",
"pointerup",
+ "Polski",
+ "Polszczyzna",
+ "Português",
"pseudorandomly",
"psppalette",
+ "Pulaar",
+ "Pular",
+ "Pushto",
"qtres",
"rbaycan",
"redoable",
"reenable",
+ "Rege",
"reimplement",
"repurposable",
"rerender",
@@ -374,29 +319,61 @@
"retarget",
"retargeted",
"rgba",
+ "RGBAs",
"rightclick",
"rk",
+ "Română",
"rotologo",
"roundrect",
"roundrects",
"royskt",
"rrect",
+ "RTLCSS",
+ "Rumantsch",
+ "Runa",
+ "Rundi",
+ "Sami",
+ "Sango",
+ "Sardu",
+ "Satana",
+ "Satanas",
+ "Scribus",
"scrollable",
+ "Sesotho",
+ "Setswana",
"shader's",
+ "Shft",
+ "Shona",
+ "Shqip",
+ "Simi",
+ "Sinhala",
+ "Skencil",
"sketchpalette",
"skeuomorphic",
"slenska",
+ "Slovenčina",
+ "Slovenščina",
+ "Slovenski",
+ "Slovenský",
+ "Soomaali",
+ "Soomaaliga",
"sorthweast",
+ "Sotho",
"soundcloud",
"spacebar",
"spraycan",
"spraypaint",
"spraypainting",
+ "STRINGTABLE",
"styl",
"stylable",
"submenu",
"submenus",
+ "subrepo",
"subwindows",
+ "Suomen",
+ "Svenska",
+ "Swati",
"tabbable",
"tabindex",
"tesselator",
@@ -406,13 +383,19 @@
"textboxes",
"themepack",
"throwie",
+ "Tiếng",
"tileable",
"timespan",
"tina",
"titlebar",
+ "Toçikī",
"togglable",
"tracedata",
"tracky",
+ "Tshivenḓa",
+ "Tsonga",
+ "Türkçe",
+ "Tvcy",
"tzebuergesch",
"ufeff",
"undecagons",
@@ -423,31 +406,48 @@
"unfocusing",
"uniquify",
"unmaximize",
+ "unminimize",
"unpremultiplied",
"untrusted",
"upiatun",
+ "UPNG",
"ustom",
+ "UTIF",
+ "Uyghur",
+ "Uyghurche",
+ "Vakaviti",
+ "Valencian",
+ "Valoda",
"vaporwave",
+ "Venda",
"verts",
+ "Viacam",
+ "Việt",
"viewports",
+ "Vlaams",
+ "Volapük",
+ "Vosa",
+ "VSNs",
+ "Walon",
+ "Wayback",
"webglcontextlost",
"webglcontextrestored",
"webp",
+ "Wikang",
+ "WINTRAP",
"woah",
+ "Wollof",
+ "Xitsonga",
"xtras",
+ "Yângâ",
"youtube",
"zbek",
+ "Zhōngwén",
+ "Zhuang",
"zoomable",
"zoomer",
"zyk",
- "Æвзаг",
- "Íslenska",
- "Český",
- "Čeština",
"Ελληνικά",
- "Јазик",
- "Језик",
- "Ўзбек",
"Авар",
"Аҧсуа",
"Аҧсшәа",
@@ -457,9 +457,12 @@
"Бызшәа",
"Език",
"Ирон",
+ "Јазик",
+ "Језик",
"Коми",
"Кыргыз",
"Кыргызча",
+ "Қазақ",
"Македонски",
"Мова",
"Монгол",
@@ -471,15 +474,16 @@
"Татар",
"Теле",
"Тили",
- "Тоҷикӣ",
"Тілі",
+ "Тоҷикӣ",
"Түркмен",
+ "Ўзбек",
"Українська",
"Чӑваш",
"Чӗлхи",
"Ѩзыкъ",
- "Қазақ",
"Ӏарул",
+ "ქართული",
"Հայերեն",
"עברית",
"أۇزبېك",
@@ -487,23 +491,21 @@
"اردو",
"العربية",
"بهاس",
+ "پښتو",
+ "پنجابی",
"تاجیکی",
"سندھی",
"سنڌي",
"فارسی",
"كشميري",
- "ملايو",
- "پنجابی",
- "پښتو",
"کوردی",
- "ພາສາລາວ",
- "ქართული",
+ "ملايو",
"ትግርኛ",
"አማርኛ",
+ "ພາສາລາວ",
+ "ꦧꦱꦗꦮ",
"ᐃᓄᒃᑎᑐᑦ",
"ᐊᓂᔑᓈᐯᒧᐎᓐ",
- "ᓀᐦᐃᔭᐍᐏᐣ",
- "ꦧꦱꦗꦮ",
- "WINTRAP"
+ "ᓀᐦᐃᔭᐍᐏᐣ"
]
}
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c289bcf..aae8683 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -31,8 +31,9 @@ See [**Development Setup**](./README.md#Development-Setup) on the readme.
- `functions.js` has functions that shouldn't own any global state, altho they very much modify global state, and there may be a few stateful global variables defined in there.
- The project uses [jQuery](https://jquery.com/), and a convention of prefixing variables that hold jQuery objects with `$`
- There are also some weird pseudo-classes like `$ColorBox` which extend and return jQuery objects. I don't recommend this pattern for new code.
-- Menu code and some windowing code is in `lib/os-gui/` and should be kept in sync with the [os-gui](https://github.com/1j01/os-gui) project.
- - Some other windowing code is in $ToolWindow.js, for windows that don't have maximize/minimize buttons; eventually this should be provided by os-gui.
+- Menu code and windowing code is in `lib/os-gui/` and should be kept in sync with the [os-gui](https://github.com/1j01/os-gui) project.
+ - (Maybe I should version this using git-subrepo?)
+ - Some window behavior specific to jspaint is in `$ToolWindow.js` and `$Component.js`
- `image-manipulation.js` should contain just rendering related code, and ideally no dialogs except maybe some error messages.
- Some image manipulation code is also in `tools.js` and `functions.js`
- CSS is in `styles/`
diff --git a/TODO.md b/TODO.md
index ef15566..33fcac3 100644
--- a/TODO.md
+++ b/TODO.md
@@ -188,7 +188,7 @@ Functionality:
* JS
* Organize things into files better; "functions.js" is like ONE step above saying "code.js"
- * `$ToolWindow` has a `$Button` facility; `$FormToolWindow` overrides it with essentially a better one
+ * `$ToolWindow` has a `$Button` facility; `$DialogWindow` overrides it with essentially a better one
* Make code clearer / improve code quality
* https://codeclimate.com/github/1j01/jspaint
diff --git a/index.html b/index.html
index 959c2e5..cefb86f 100644
--- a/index.html
+++ b/index.html
@@ -402,7 +402,7 @@