New ScriptImage/InfoImage/InfoText functions - DOWNLOAD !!

The place to discuss creating, porting and modifying Celestia's source code.
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #81by tech2000 » 28.05.2006, 18:19

Vincent wrote:
Malenfant wrote:I can see why you'd think it's confusing, but forcing people to keep turning on the UV mode to read stuff about a system isn't an ideal solution. I'm thinking that if you are exploring a multi-body planetary system for which there is a lot of ultraverbose infotext available then every time you moved from one body to another you'd have to keep reactivating the UV mode. Doesn't seem very practical to me.
OK, as for that first point, here's a version of the .exe file that allows 'Ultra Verbose' mode to stay turned on when a new selection is made, without having to press the [V] key again :
http://vincent.gian.club.fr/celestia/ce ... atch30.exe
Users who are interested in this feature can just compare the 2 versions and let us know their opinion about it.

For ElChristou and other non-Win users, here are the changes to make in the code...
- in src/celestia/celestiacore.cpp : remove or comment out these lines (from line 3360):
// infoImage / infoText - start - Vincent
if (sel != infoSelection)
{
if (hudDetail > 2)
setHudDetail(2);
infoSelection = sel;
}
// infoImage / infoText - end Vincent
- in src/celestia/celestiacore.h : remove or comment out these lines (from line 456):
// infoImage / infoText - start - Vincent
Selection infoSelection;
// infoImage / infoText - end - Vincent

As for the second point, I still think being able to turn on the 'Ultra Verbose' mode via the [V] key is a good thing. Then, based on (another :wink: ) ElChristou's idea, a sub-menu could be implemented in the Infoscript function to make the user able to choose between several options and scripts :
--> More about Earth :
------------------------> switch to Ultra Verbose mode (only)
------------------------> + run script #1 : info_earth_script.celx
------------------------> + run script #2 : earth_tour.cel
------------------------> ...

That would make everybody happy. But that would also need a more complex code... :wink:


This last build was really cool. I like it alot. Keep up the good eork.

Bye, Anders

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #82by Malenfant » 28.05.2006, 22:30

Vincent wrote:OK, as for that first point, here's a version of the .exe file that allows 'Ultra Verbose' mode to stay turned on when a new selection is made, without having to press the [V] key again :
http://vincent.gian.club.fr/celestia/ce ... atch30.exe
Users who are interested in this feature can just compare the 2 versions and let us know their opinion about it.


Oh, that is so much better IMO. thanks! :)
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

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

Post #83by Vincent » 29.05.2006, 07:09

ElChristou wrote:Malenfant's idea in another valid solution to this problem.
tech2000 wrote:This last build was really cool. I like it alot. Keep up the good eork.
Malenfant wrote:Oh, that is so much better IMO. thanks! :)

OK, so let's go with this version...
@+
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

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

Post #84by Vincent » 29.05.2006, 08:33

OK, since Malenfant asked for it (:wink:), I have updated all the files of the patch3 test-release.

Moreover, I realised that the modified definition of the Milky Way I added via the 'info_galaxies.dsc' file in the 'extras' folder didn't delete the original definition ('deepsky_patch.dsc' file in the 'data' folder). So, there were 2 definitions of the MW running at the same time, causing a sensible drop in the fps rate. I corrected that by removing the initial definition of the MW in a new 'deepsky_patch3.dsc' file.

So, please update all the files with their new xxx_patch3 version.

Here are the links :
* Windows (4.31 Mo) : http://vincent.gian.club.fr/celestia/ce ... patch3.zip
* Modified Source files for compilation (4.84 Mo) : http://vincent.gian.club.fr/celestia/ce ... patch3.zip
@+
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

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #85by ANDREA » 29.05.2006, 21:18

Vincent wrote:Andrea, ElChristou is right. Thanks to Christophe, the CVS version is now completely localized even for Windows users. In conclusion, you won't need to hide the Information text anymore, either in the official nor in the patched version, since I will build my next release on the CVS version (after Chris has made his own pre-release, of course)... You'll just have to wait for the italian .po file to be completed, or to complete it by yourself... :wink:

Vincent, I followed El Christou's and your suggestions, I modified most of the it.po file, saved it as UTF-8, so you can find it here
http://www.palatinumclub.it/it.po
Sorry but some phrases regarding programming and so on, have not been translated, because I was unable to do it correctly. :oops:
But all the "normal use text" is translated.
Hope you and /or Christophe can add it in your next patch or release, appreciated.
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

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

Post #86by Vincent » 29.05.2006, 21:33

ANDREA wrote:Vincent, I followed El Christou's and your suggestions, I modified most of the it.po file, saved it as UTF-8, so you can find it here
http://www.palatinumclub.it/it.po
Sorry but some phrases regarding programming and so on, have not been translated, because I was unable to do it correctly. :oops:
But all the "normal use text" is translated.
Hope you and /or Christophe can add it in your next patch or release, appreciated.

Andrea,
Since the file has to be converted into .mo format, you should also send it to Christophe : celestia-i18n@teyssier.org
Then, I will build the final patch3 version from the CVS version. If the italian .mo file is included soon, you'll have both version (next official (pre)release and Celestia_patch3) in Italian... :)
@+
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

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #87by ANDREA » 29.05.2006, 21:49

Vincent wrote:
ANDREA wrote:Hope you and /or Christophe can add it in your next patch or release, appreciated.
Andrea,
Since the file has to be converted into .mo format, you should also send it to Christophe : celestia-i18n@teyssier.org
Then, I will build the final patch3 version from the CVS version. If the italian .mo file is included soon, you'll have both version (next official (pre)release and Celestia_patch3) in Italian... :)

Thanks a lot Vincent, following your suggestion I've just sent the file to Christophe. :wink:
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

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

Post #88by Vincent » 05.06.2006, 10:47

Hi,

I have added the new 'fitscreen' argument to the 'overlay' command that displays any image during a script (ScriptImage function).
The 'fitscreen' argument works like a switch :
- fitscreen 0 -> The image is displayed in its real size, and you can place it on screen using the 'xoffset' and 'yoffset' arguments.
- fitscreen 1 -> The image is resized to fit the Celestia-window.
The 'fitscreen' argument is optional. If not mentionned, its default value is 0.

- Here's an example for .cel scripts :

Code: Select all

# 'fitscreen' not defined -> the default value is 0 -> The image is displayed in its real size :
overlay { duration 3 xoffset 0.5 yoffset -0.5 alpha 0.6 filename "image.jpg" }
wait { duration 3 }

# 'fitscreen' set to 1 -> the image fits the screen :
overlay { duration 3 alpha 0.6 filename "image.jpg" fitscreen 1 }
wait { duration 3 }


- Here's the same example for .celx scripts :

Code: Select all

-- 'fitscreen' not defined -> the default value is 0 -> The image is displayed in its real size :
celestia:overlay ( 3, 0.5, -0.5, 0.6, "image.jpg" )
wait (3)

-- 'fitscreen' set to 1 -> the image fits the screen :
celestia:overlay ( 3, 0, 0, 0.6, "image.jpg", 1 )
wait (3)

This improvement will be included in the next Celestia_patch3 release.

*****************************************************************************
Then, since the original thread was deleted while fighting against spam :wink:, here's a summary of the different arguments of the 'overlay' command :
*****************************************************************************
The new overlay cel/celx script command can have 1 to 6 arguments :

1 - The 'duration' is defined in seconds. If not mentionned, the default value is 3.

2 & 3 - 'xoffset' and 'yoffset' define the position of the image's center relatively to the center of Celestia-window. If not mentionned, their default value is 0.0. They can take values from -1 to 1 relatively to the center of Celestia-window :
--> if xoffset = 0.0 and yoffset = 0.0 -> the image is centered on Celestia-window
--> if xoffset = -1 -> the image is centered on the left border of Celestia-window => You can only see half of it...

4 - The 'alpha' argument defines the transparency (from 0 to 1) of the image on screen. If not mentionned, the default value is 1.
--> if alpha = 0.0 -> the image is totally transparent
--> if alpha = 1.0 -> the image is totally opaque

5 - The 'filename' of the image is the only parameter that always has to be mentionned in the cel script command. It is defined using a relative path from the 'Images' folder. So, images files must be placed in the 'images' folder, or in a sub-folder.

6 - The 'fitscreen' argument (optional) specifies whether the image is displayed in 'fitscreen' mode or not. If not mentionned, the default value is 0.
--> if fitscreen = 0 -> the image is displayed in its real size.
--> if fitscreen = 1 -> the image is resized to fit the Celestia-window.

- Finally, here's a screenshot :
Image
@+
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

roy-t
Posts: 3
Joined: 12.11.2010
With us: 14 years

Re: New ScriptImage/InfoImage/InfoText functions - DOWNLOAD

Post #89by roy-t » 16.11.2010, 11:26

Hey guys,

sorry to resurrect this old thread, but this functionality is exactly what I need. Anyway to get this behavior in 1.6? I would try manually 'updating' the patch to 1.6, but unfortunately the links to the patch and the patch source code are no longer working.

I've also tried toying with the Edu Tools 1.6 CxBox functionality to display a picture, but I couldnt get that to work :(.

Or is there any other way now to display images in 1.6 in screen space? (unfortunately billboarding is not an option for my purposes).

Kind regards,


Roy T.


Return to “Development”