Attempted fix for issue #239. Entering the F7 screen will change the sun light color to that of the info system, entering any other screen will reset the local sun light color.

This commit is contained in:
AnotherCommander 2017-07-09 16:45:11 +02:00
parent 42fc5deeb3
commit 1c532a4805

View File

@ -9878,6 +9878,18 @@ static NSString *last_outfitting_key=nil;
break;
}
if (toScreen == GUI_SCREEN_SYSTEM_DATA)
{
// system data screen: ensure correct sun light color is used on miniature planet
[[UNIVERSE sun] setSunColor:[OOColor colorWithDescription:[[UNIVERSE systemManager] getProperty:@"sun_color" forSystem:info_system_id inGalaxy:[self galaxyNumber]]]];
}
else
{
// any other screen: reset local sun light color
[[UNIVERSE sun] setSunColor:[OOColor colorWithDescription:[[UNIVERSE systemManager] getProperty:@"sun_color" forSystem:system_id inGalaxy:[self galaxyNumber]]]];
}
if (![[UNIVERSE gameController] isGamePaused])
{
JSContext *context = OOJSAcquireContext();