diff --git a/README.md b/README.md index b906885..41b4d1d 100644 --- a/README.md +++ b/README.md @@ -7,28 +7,25 @@ Enjoy ## TODOs General - Splash screen - Hide widget on mouseover - Add locks + Splash screen(Complete) Merge layers Export multiple layers file % Render balance auto=true ~ auto color balance 0.8 ~ equal RGB balance - mirror ,100 ~ mirror Brush Texture paint + Natural brush(Expand stroke size from stroke lenght) + Color per pointer Save - $ 1280x800 ~ Export with size - Auto saveAs - History - Undo shortcut + source.save 1280x800 ~ Export with size > Terminal - Auto Complete - Progress update - Scroll logs - Expand logs + Auto Complete(tab) ? Interrog Inline Help * Eye - Swatches, handle all colors \ No newline at end of file + Swatches, handle all colors + - Widget + Clickeable links + - Render + Progress update \ No newline at end of file diff --git a/links/main.css b/links/main.css index 3e30709..84381b3 100644 --- a/links/main.css +++ b/links/main.css @@ -20,15 +20,15 @@ body { margin:0px; padding:0px; overflow:hidden; font-family:"input_mono_medium" #terminal logs log.input { color:white; } #terminal logs log.image img { height:85px;width:auto;border-radius: 3px } #terminal menu { display: inline-block;position: absolute;bottom: 0px;right: 0px;padding: 0px 5px;font-size: 10px;line-height: 20px;color:white } +#terminal.locked input { color:red; } #terminal.hide { height:25px; } #terminal.mini { height:120px; } #terminal.full { height:100vh; } #widget { position: absolute; top:0px; left:0px; line-height: 20px; font-size:10px; z-index:9000; color:white; width:100%; height:100%; } -#widget span { display:inline-block; line-height:15px; padding:0px 5px; vertical-align: top; } +#widget span { display:inline-block; line-height:15px; padding:0px 5px; vertical-align: top; min-width:100px;} #widget span name { display: block; border-bottom: 1px solid #333; line-height:25px; margin-bottom:5px;} -#widget .cursor { } #widget li { display:block; } #widget li.active { color:#72dec2; } #widget li.inactive { color:#fff; } diff --git a/presets/default.rin b/presets/default.rin index a248610..6f6a9d6 100644 --- a/presets/default.rin +++ b/presets/default.rin @@ -1,5 +1,11 @@ -frame.select main ; +frame.select background ; frame.resize 400x400 ; brush:color #ff0000 ; brush.add_pointer 1,1 ; -brush.add_pointer 2,2 ; \ No newline at end of file +brush.add_pointer 2,2 ; +layer.fill #A1A1A1 ; +render.stencil #72dec2 ; +type:size 50 ; +type.write 50,150 "RONIN" ; +type:size 15 ; +type.write 55,180 "VER 0.1 " ; \ No newline at end of file diff --git a/scripts/filters/stencil.js b/scripts/filters/stencil.js index a222510..25d11f2 100644 --- a/scripts/filters/stencil.js +++ b/scripts/filters/stencil.js @@ -8,7 +8,7 @@ function Filter_Stencil() var angle = cmd.angle() ? cmd.angle().degrees : 20; var color = cmd.color() ? cmd.color().hex : "#ffffff"; - ronin.render.layer.clear(); + ronin.frame.active_layer.clear(); this.draw(ronin.frame.context(),angle,color); } diff --git a/scripts/modules/cursor.js b/scripts/modules/cursor.js index 8d8d5c3..e696da0 100644 --- a/scripts/modules/cursor.js +++ b/scripts/modules/cursor.js @@ -130,21 +130,18 @@ function Cursor(rune) this.update = function(event) { - // if(ronin.terminal.module_name){ - // this.set_mode(ronin.module); - // } - // else if(event.altKey == true && event.shiftKey == true){ - // this.set_mode(ronin.frame.active_layer); - // } - // else if(event.altKey == true){ - // this.set_mode(ronin.default); - // } - // else{ - // this.set_mode(ronin.brush); - // } + if(event.altKey == true && event.shiftKey == true){ + this.set_mode(ronin.frame.active_layer); + } + else if(event.altKey == true){ + this.set_mode(ronin.default); + } + else{ + this.set_mode(ronin.brush); + } } - this.set_mode = function(mode) + this.set_mode = function(mode = ronin.brush) { if(this.mode == mode){ return; } this.mode = mode; diff --git a/scripts/modules/source.js b/scripts/modules/source.js index 9ebae21..31a54aa 100644 --- a/scripts/modules/source.js +++ b/scripts/modules/source.js @@ -2,6 +2,8 @@ function Source(rune) { Module.call(this,rune); + this.settings = {"format":"jpg","quality":"1"}; + this.add_method(new Method("save",["name","rect","format"])); this.add_method(new Method("load",["path","position","rect"]),"Add point"); @@ -50,21 +52,24 @@ function Source(rune) ronin.terminal.query("terminal.display mini"); + if(this.settings["format"] == "jpg"){ + ronin.terminal.log(new Log(this,"","image")); + } + else{ + ronin.terminal.log(new Log(this,"","image")); + } + /* if(params.setting("format") && params.setting("format").value == "svg"){ ronin.terminal.log(new Log(this,ronin.path.create_svg(),"image")); } - else if(params.setting("format") && params.setting("format").value == "jpg"){ - ronin.terminal.log(new Log(this,"","image")); - } else if(params.setting("format") && params.setting("format").value == "rin"){ var w = window.open('about:blank','source'); var html = ""; for (i = 0; i < ronin.terminal.history.length; i++) { html += ronin.terminal.history[i]+";
"; } w.document.write("Source
"+html+"
"); } - else{ - ronin.terminal.log(new Log(this,"","image")); - } + else + */ this.layer.remove(this); } diff --git a/scripts/modules/terminal.js b/scripts/modules/terminal.js index dafae77..d601f59 100644 --- a/scripts/modules/terminal.js +++ b/scripts/modules/terminal.js @@ -187,7 +187,7 @@ function Terminal(rune) } } else{ - ronin.cursor.set_mode(ronin.brush); + ronin.cursor.set_mode(); } this.hint(content);