Script Menu

Discussion forum for Celestia developers; topics may only be started by members of the developers group, but anyone can post replies.
Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Script Menu

Post #1by chris » 27.05.2007, 18:14

As an experiment, I implemented a very simple scripts menu in the Windows version of Celestia. At startup, Celestia will scan the scripts directory and add every celx file in there to the scripts menu:

Image

It's very convenient, but probably not worth including in its current form. The one big thing that needs to be addressed is that just listing the script filenames isn't very helpful. There needs to be some way of including meta-information in a script: title, author, and a brief description. Just the title would suffice for now. One approach would be to define some standard tags for this data that could appear in script comments. It could be very simple:

Code: Select all

-- Title: Mark Local Group Galaxies
-- Author: Fridger Schrempp


So, I have a few things I'd like feedback on . . .

- Is this a good idea?

- Is there some standard way of including meta-information in scripts?

- What about i18n?

I'm not sure if this is a feature that will make 1.5.0 final. If there's some consensus that a simple scripts menu is adequate, then it probably will. But higher priority tasks that will prevent me from spending enough time to implement anything very complicated. I'm also unwilling to do a lot of Windows UI work now when a unified UI is in Celestia's future.

--Chris

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 8 months

Re: Script Menu

Post #2by ElChristou » 27.05.2007, 18:24

chris wrote:...It's very convenient, but probably not worth including in its current form. The one big thing that needs to be addressed is that just listing the script filenames isn't very helpful. There needs to be some way of including meta-information in a script: title, author, and a brief description...


Yes, this would be much more interesting than a simple menu!
Now of course not before the cross UI...
Image

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 9 months
Location: Montreal

Post #3by Cham » 27.05.2007, 18:24

Chris,

I think that this simple script menu is already a good thing, even without other features. Personally, I don't need much other features for that menu. I give all my CEL files a name which says it all.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 1 month
Location: NY, USA

Post #4by selden » 27.05.2007, 18:35

I would suggest that if one would like to be able to display metadata that's included in a CEL or CELX script that the initial implementation should be extremely simple. For example, the menu might simply display the first two or three lines of the script so long as they are comments.
Selden

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 9 months
Location: Montreal

Post #5by Cham » 27.05.2007, 18:39

I suggest a simple script menu (without any comments), and a script browser, with comments showing for each script.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Guckytos
Posts: 439
Joined: 01.06.2004
With us: 20 years 5 months
Location: Germany

Post #6by Guckytos » 28.05.2007, 18:40

Maybe I'm a bit slow at thinking at the moment, but what is/would be the big difference between a script menu and a script browser?

Anyway, there should then be a standard in the celx-scripts, so that the meta-informations: title, author, and a brief description are included.
At least, the title, that is shown in the script menu should be taken from the meta-informations.

Cham, you know what you are doing and what your or the scripts of others do and then rename them accordingly.
But at the moment I am thinking of Celestia newbies or also of educational activities. There you have people that have no real idea of what they are doing in the beginning, but with scripts you can show them a lot.
So, if the scripts are standardized with meta-informations, showing a title, saying who wrote it and what it is supposed to do, people have it easier.

So I would say, make a real Script Browser, that shows the people, what the script will do.
The Script menu can be included in the development versions, for those who know what they are doing, but NOT in 1.5.0 final.
Let's wait until there is a unified UI and a sophisticated Script Browser.

Regards,

Guckytos

Avatar
LordFerret M
Posts: 737
Joined: 24.08.2006
Age: 68
With us: 18 years 2 months
Location: NJ USA

Post #7by LordFerret » 29.05.2007, 04:10

How about leaving the scripts file list just as you've shown... and when you cursor over each individual script file in the list, a quick scan is done for meta-tags and a little pop-up (similar to a tool-tips balloon) shows.

As for meta-tags, how about - Title, Author, Duration, and Description? The Description line could truncate to keep the balloon small. Selecting the script would open a dialog box which could show all the meta-tag data (Description in full length, not truncated), with Launch/Cancel confirmation.

2-cents.

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 10 months

Post #8by Chuft-Captain » 29.05.2007, 15:45

Something very simple like this will be useful in the short-term.

Eventually, I'd like to also see the extras folder being parsed for any addons having a scripts folder, and the resulting menu items being organised into folders (named for the the addon(s) in which a scripts folder has been found).

This would mean scripts relating to a particular addon could be packaged with the addon, and wouldn't have to be all dumped into the top-level scripts folder. Of course the menu would take longer to build.

Anyway, perhaps just something to think about. Would certainly make the organisation and management of scripts a lot tidier IMO.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #9by chris » 29.05.2007, 18:16

The scripts menu is checked into CVS for the Windows version. I opted for something very similar to my first screenshot, but added support for a Title: tag as the first line of the script. Any feedback from Windows users who build from CVS would be appreciated.

--Chris

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 9 months
Location: Nancy, France

Post #10by Vincent » 29.05.2007, 20:01

I agree with LordFerret: if possible, the title-tag should appear in a pop-up window
instead of replacing the name of the script, as it is currently the case.

- Current display:
Image

- Suggested display:
Image

Though I'm not sure this would be feasable on all platforms, nor with Qt4...
Last edited by Vincent on 29.05.2007, 20:09, edited 1 time in total.
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 9 months
Location: Montreal

Post #11by Cham » 29.05.2007, 20:07

I MUCH prefer to see the file names in the menu, instead of the "internal" description. Vincent suuggestion is a good compromise, but I wonder how it could be achieved in OS X.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 8 months

Post #12by ElChristou » 29.05.2007, 20:14

Vincent wrote:I agree with LordFerret: if possible, the title-tag should appear in a pop-up window
instead of replacing the name of the script, as it is currently the case.

- Current display:
Image

- Suggested display:
Image

Though I'm not sure this would be feasable on all platforms, nor with Qt4...


8O 8O but... what is the interest? one just have to be able to know what do the script at first sight... if it's by the title or by a description it's the same or not? at least a description would be much more elegant than some long file names full of - or _... no?
Image

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 9 months
Location: Montreal

Post #13by Cham » 29.05.2007, 20:18

For any complete and satisfying description, we need a script browser.

The browser could also have the ability to scan the entire installation of Celestia to show ALL scripts (addons could have their own "scripts" directory), while the script menu is just showing the files in the main "scripts" folder at the root level.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 8 months

Post #14by ElChristou » 29.05.2007, 20:20

Cham wrote:For any complete and satisfying description, we need a script browser...


I agree, but this will be after the cross UI...
Image

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 9 months
Location: Montreal

Post #15by Cham » 29.05.2007, 20:24

ElChristou wrote:I agree, but this will be after the cross UI...


I don't believe in that "cross UI" idea. It won't work correctly on many systems. It will be slow and laggy, especially for all files handlers (lists, browsers, etc). Each OS have their own specific features and we need to exploit them for each version of Celestia.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 9 months
Location: Montreal

Post #16by Cham » 29.05.2007, 20:27

For Celestia 1.5.0, I suggest we only add a simple scripts menu (names of files only), without any descriptions. This will already be a huge step forward over the actual version (without any scripts menu/browser). The browser could be added at a much later stage. I can live easily with just a simple script menu.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years

Post #17by dirkpitt » 29.05.2007, 20:41

I also think filenames only is adequate. If the description appears in the menu, someone will think that it needs to be localized which leads to a dozen different versions of each script.

Tools tips for menus? Actually OS X allows it since 10.3, but no apps are using that feature and all for a good reason, which is a simple interface always works better.

Christophe
Developer
Posts: 944
Joined: 18.07.2002
With us: 22 years 3 months
Location: Lyon (France)

Post #18by Christophe » 29.05.2007, 22:18

Cham wrote:I don't believe in that "cross UI" idea. It won't work correctly on many systems. It will be slow and laggy, especially for all files handlers (lists, browsers, etc). Each OS have their own specific features and we need to exploit them for each version of Celestia.


Have you ever tried a Qt4 app under windows or OSX? The idea is that it should look and behave like a native app, and there really are no reason why it should be slow or laggy.

Plus keep in mind that using a cross platform toolkit like Qt or wxWidget will also bring many benefits to the core. Things like being able to use keys beyond the ASCII table for shortcuts, using directly TTF fonts, multithreading, easy network access, etc... It'd be a real shame not to take advantage of all this.

Note also that at the moment Chris is the only dev maintaining the windows GUI. I'm sure he'd be relieved to not have to do it anymore to devote more time to the core stuff.
Christophe

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 9 months
Location: Montreal

Post #19by Cham » 29.05.2007, 22:25

I think that I never saw a Qt4 app on OS X for some good reasons : they don't work well or don't give any real benefit. Of course, I may be wrong. Or maybe I did saw some, but didn't noticed the difference !? :oops:

Is Stellarium a Qt app ? If yes, well, I don't like its interface anyway. I hope Celestia wont take that road. Or I'll leave it forever. :evil:
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years

Post #20by dirkpitt » 30.05.2007, 16:23

I added a Scripts menu to the OS X version. Currently it is only in my unofficial builds.

I decided to make the behaviour of the menu basically the same as the Windows version for now (i.e., Title is displayed if available, and subfolders are not scanned). What do you guys think?


Return to “Ideas & News”