Missing function: view window border control

All about writing scripts for Celestia in Lua and the .cel system
Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 3 months
Location: NY, USA

Missing function: view window border control

Post #1by selden » 06.04.2009, 13:35

I don't seem to be able to find a Cel or CelX function to control the visibility of the borders around the window panes when Celestia is used in split view mode. I expected there to be an argument for the CelX functions hide and show, but I don't see one. Am I overlooking it?

Note that the Windows version of Celestia has a menu item View/Show Frames
which is a very poor choice of name. Borders would be much better than Frames.
windowborders might be a reasonable choice for a hide/show argument.
Selden

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

Re: Missing function: view window border control

Post #2by Vincent » 06.04.2009, 16:57

Selden,

selden wrote:I don't seem to be able to find a Cel or CelX function to control the visibility of the borders around the window panes when Celestia is used in split view mode. I expected there to be an argument for the CelX functions hide and show, but I don't see one. Am I overlooking it?
No, this is possible neither in Cel nor in Celx scripting, yet.


selden wrote:Note that the Windows version of Celestia has a menu item View/Show Frames
which is a very poor choice of name. Borders would be much better than Frames.
Changing from 'Frames' to 'Borders' will have to wait for 1.6.1, since we're still in a string freeze development phase.


selden wrote:windowborders might be a reasonable choice for a hide/show argument.
Adding windowborders to the list of renderflags would be quite tricky from the coding point of view.
The setFrameVisible method is part of the CelestiaCore class, whereas all the renderflags are part of
the Renderer class. I would rather suggest one of the following options:

1- Add a new setbordervisible method to the celestia object:

Code: Select all

celestia:setbordervisible(false)

2- Add a boolean argument to the observer:splitview method:

Code: Select all

observer:splitview("h", 0.5, false)

Both options are trivial enough to be done before the first 1.6 release candidate is out.
@+
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
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 3 months
Location: NY, USA

Re: Missing function: view window border control

Post #3by selden » 06.04.2009, 17:18

Vincent wrote:
selden wrote:windowborders might be a reasonable choice for a hide/show argument.
Adding windowborders to the list of renderflags would be quite tricky from the coding point of view.
The setFrameVisible method is part of the CelestiaCore class, whereas all the renderflags are part of
the Renderer class. I would rather suggest one of the following options:

1- Add a new setbordervisible method to the celestia object:

Code: Select all

celestia:setbordervisible(false)

Calling it just "border" is similar to calling it "frame" because of the confusion it would cause:
Border in Celestia refers to the official outline of a constellation.
Although it's long, I think it would be better as

Code: Select all

celestia:setwindowbordervisible(false)

2- Add a boolean argument to the observer:splitview method:

Code: Select all

observer:splitview("h", 0.5, false)

Both options are trivial enough to be done before the first 1.6 release candidate is out.
My impression is that the window border control is for all of the window panes at once, not just for the one that is being created. As a result, I'd prefer your first suggestion.
Selden

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

Re: Missing function: view window border control

Post #4by Vincent » 10.04.2009, 09:00

I've commited a change in SVN that adds the windowbordersvisible and setwindowbordersvisible methods
to the celestia object in celx scripting.

As an example, here's a celx script that toggles the window border visibility:

Code: Select all

celestia:setwindowbordersvisible(not celestia:windowbordersvisible())

if celestia:windowbordersvisible() then
    celestia:print("Window Borders Visible")
else
    celestia:print("Window Borders not Visible")
end
@+
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


Return to “Scripting”