jiayouxjh / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

Lua: navigate subdirectories in script directory #378

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Originally proposed by DawnBringer:

I don't think you can have an approach that says "I hope people don't write any 
more scripts for Grafx2 beacuse the drawer is getting crammed etc." Directories 
or something similar will be needed I think. The root lua-dir could be 
"reserved" for a few really good "official" scripts (the user can of course 
place any scripts he wants there). The rest will go into drawers. Then you 
might wanna think about the possibilty of hidden dirs as well (for certain 
sub-script dirs, non-script dirs etc)... could that be done with some simple 
naming-standard? Like dirs starting with underscore "_secretDir" won't be shown 
in the BrushFactory fileselector.

Original issue reported on code.google.com by yrizoud on 2 Sep 2010 at 8:09

GoogleCodeExporter commented 9 years ago
First step would be to separate (tabs? foldable list?) brush/pal/pic scripts. I 
don't think going for a full-featured browse list is the good way.
Another solution would be to recognize .lua as a regular file format in the 
save/load box for more scripts, and the factory would serve only for favourite 
ones (with assigned keyb shortcuts). But that's not so nice UI design...

Original comment by pulkoma...@gmail.com on 2 Sep 2010 at 8:16

GoogleCodeExporter commented 9 years ago
Is it possible to just add dirctory-navigation inside "scripts" without 
changing the Brush-factory window too much? 

It's also tricky to categorize scripts as they can do a combination of pretty 
much anything... I implemented my namning/categorization standard (by what the 
script affects) as an attempt to give some guidance/warning. But some scripts 
are tricky to categorize, ex: I have script that finds AA-colors of the fg/bg 
colors, but it renders the result as a brush. But one wouldn't look for such a 
functionallity under "Brush". Some scripts may be serious tools, others just 
crazy fun. Just something to think about...

This is what I've used so far: (in the naming-standard: function_author_name.lua
Functions:
bru - script changes the brush
pal - script changes the palette
pic - script changes the picture (maybe img is better?)
scn - "scene", script changes more than one thing (anything might change)
inf - "info", script changes nothing, it just displays some info.

Still, just using something like this to divide the scripts in the 
Brush-factory probably  isn't enough...what do you do when/if there is 200 
scripts of each.

With dirs; featured scripts could sit in the root, categorized scripts goes 
into "BRUSH","PICTURE","TOOL" etc. and productive authors could have most of 
their scripts in dedicated drawers. But then someone has to decide where things 
go and why... well, more to think about I guess...

I just know that directory-navigation would make life easier for me and my 
scripts ;)

Original comment by annas...@hotmail.com on 3 Sep 2010 at 4:23

GoogleCodeExporter commented 9 years ago
One thing that should help when you have lots of scripts: Like in file 
selector, type the first letters of a script to jump to the first matching file.
But it would work much better if the files don't have any prefixes...

Original comment by yrizoud on 3 Sep 2010 at 4:58

GoogleCodeExporter commented 9 years ago
We now have a directory browser, so we can close this one ?

Original comment by pulkoma...@gmail.com on 20 Jan 2011 at 8:49

GoogleCodeExporter commented 9 years ago
Well, you can see the subdirs but you still can't enter them, right?

Original comment by annas...@hotmail.com on 20 Jan 2011 at 10:13

GoogleCodeExporter commented 9 years ago
You can enter them, by clicking the OK button or pressing Enter. But you can't 
double-click (or even 'click twice' like the file selector), which is very 
counter-intuitive.
My listbox control was designed for selection, not activation, so it's really 
not easy to add.

Original comment by yrizoud on 20 Jan 2011 at 11:17