Page 1 of 1

Missing function: view window border control

Posted: 06.04.2009, 13:35
by selden
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.

Re: Missing function: view window border control

Posted: 06.04.2009, 16:57
by Vincent
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.

Re: Missing function: view window border control

Posted: 06.04.2009, 17:18
by selden
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.

Re: Missing function: view window border control

Posted: 10.04.2009, 09:00
by Vincent
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