Hello,
First of all, sorry if i'm in the bad section of the forum but i didn't know where to post this topic.I present myself. My name is Julien Meyer and I'm a French student of Nancy studying computer science for 2 years now.
I work for an association which uses Celestia and my goal is to add a new functionality to Celestia. This association works on a planetarium. Its goal is to show to people the vastness space and at which point it can be attractive.
The work consists in modifying the general menu of Celestia in order to inert an additional menu called "Shortened" which contains 30 fixed link. Each link would be reach with a shortcut (to be determined... i.e : something like ? + 1 for the first link). Each link will point towards a file script in the repertory script of Celestia.
The functionnality will be added in a litlle patch so everybody could use it.
I discover Celestia today but I didn't find what I'm talking about. Maybe this functionnality already exist ?
Thank you and I'm sorry for my bad English
Jlzz
[Shortcuts] Idea of Developpement
- Chuft-Captain
- Posts: 1779
- Joined: 18.12.2005
- With us: 18 years 11 months
Re: [Shortcuts] Idea of Developpement
Welcome,
Are you aware of the Lua Edu Tools? These tools developed by forum member Vincent may well do everything you want to do and more.
See here: http://www.shatters.net/forum/viewtopic.php?f=11&t=13162
For such a simple task as you want to do, you may want to write your own simple celX script, in which case it may still be worthwhile downloading the Lua Edu Tools, if only to give you some examples of well written scripts.
I suggest you also refer to: http://en.wikibooks.org/wiki/Celestia/Celx_Scripting
Are you aware of the Lua Edu Tools? These tools developed by forum member Vincent may well do everything you want to do and more.
See here: http://www.shatters.net/forum/viewtopic.php?f=11&t=13162
For such a simple task as you want to do, you may want to write your own simple celX script, in which case it may still be worthwhile downloading the Lua Edu Tools, if only to give you some examples of well written scripts.
I suggest you also refer to: http://en.wikibooks.org/wiki/Celestia/Celx_Scripting
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)
CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS
-- Gerard K. O'Neill (1969)
CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS
- John Van Vliet
- Posts: 2944
- Joined: 28.08.2002
- With us: 22 years 2 months
Re: [Shortcuts] Idea of Developpement
--- edit ---
Last edited by John Van Vliet on 19.10.2013, 04:38, edited 1 time in total.
- Chuft-Captain
- Posts: 1779
- Joined: 18.12.2005
- With us: 18 years 11 months
Re: [Shortcuts] Idea of Developpement
Good point John,
If Jlzz simply wants to go to certain fixed viewpoints, then you're right, no coding required, simply create bookmarks, whereas if he wants to do some dynamic stuff, or wants buttons or keyboard shortcuts, etc, then he may need to run scripts.
Jlzz, rather than describe HOW you plan do this, why don't you re-phrase your question in "functional" language.
- Describe the behaviour that you want to achieve, rather than the technique you plan to use, and I think then, we will be better able to advise you on the best way to go about it.
Otherwise you may end up "barking up the wrong tree".
One thing I forgot to mention about the LuaTools is that it comes with a built-in "Planetarium" mode which, at the push of a button, automatically takes you to the surface of a selected body, and lines up the horizon.
If Jlzz simply wants to go to certain fixed viewpoints, then you're right, no coding required, simply create bookmarks, whereas if he wants to do some dynamic stuff, or wants buttons or keyboard shortcuts, etc, then he may need to run scripts.
Jlzz, rather than describe HOW you plan do this, why don't you re-phrase your question in "functional" language.
- Describe the behaviour that you want to achieve, rather than the technique you plan to use, and I think then, we will be better able to advise you on the best way to go about it.
Otherwise you may end up "barking up the wrong tree".
One thing I forgot to mention about the LuaTools is that it comes with a built-in "Planetarium" mode which, at the push of a button, automatically takes you to the surface of a selected body, and lines up the horizon.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)
CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS
-- Gerard K. O'Neill (1969)
CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS
Re: [Shortcuts] Idea of Developpement
Hello,
First of all, sorry for the response time ! I was really busy with all my projects for the school.
Second point, Vincent help me to do what I want and it was simply a script .celx
It provides shortcuts in Celestia for executing scripts.
I join to this post what I've made and hope this would be helpfull for everybody :
Sorry for my English !
Jules.
First of all, sorry for the response time ! I was really busy with all my projects for the school.
Second point, Vincent help me to do what I want and it was simply a script .celx
It provides shortcuts in Celestia for executing scripts.
I join to this post what I've made and hope this would be helpfull for everybody :
Code: Select all
-- Title: Make shortcuts for Celestia's scripts
function setScript1()
celestia:runscript("../name_of_reperitories/nom_du_script.celx")
wait(0)
end
function setScript2()
celestia:runscript("name_of_the_script.celx")
wait(0)
end
keyhandlers =
{
["C-1"] = setScript1
["C-2"] = setScript2
}
function handlekey(k)
handler = keyhandlers[k.char]
if (handler ~= nil) then
handler()
return true
else
return false
end
end
celestia:registereventhandler("key", handlekey)
Sorry for my English !
Jules.