Modified Mac OS X front-end to use new reference marks; added planetographic

grid option to popup menu.
ver1_6_1
Chris Laurel 2008-03-21 00:29:17 +00:00
parent 7e3f6b31c8
commit f3a16a18a6
2 changed files with 60 additions and 5 deletions

View File

@ -185,6 +185,7 @@ static NSMutableDictionary* tagMap;
TAGDEF(1001,@"showFrameAxes")
TAGDEF(1002,@"showSunDirection")
TAGDEF(1003,@"showVelocityVector")
TAGDEF(1004,@"showPlanetographicGrid")
nil];
[tagDict addEntriesFromDictionary: volatileTagDict];
#endif
@ -504,12 +505,57 @@ FEATUREMETHODS(Other)
#if REFMARKS
// Refmark Settings
#define REFMARKMETHODS(flag) -(BOOL) show##flag { return (appCore->getSimulation()->getSelection().body()->getVisibleReferenceMarks()&Body::flag) != 0; } -(void) setShow##flag: (BOOL) value { appCore->getSimulation()->getSelection().body()->setVisibleReferenceMarks([self setValue: value forBit: Body::flag inSet: appCore->getSimulation()->getSelection().body()->getVisibleReferenceMarks()]); }
-(BOOL) showBodyAxes
{
return appCore->referenceMarkEnabled("body axes");
}
-(void) setShowBodyAxes: (BOOL) value
{
appCore->toggleReferenceMark("body axes");
}
-(BOOL) showFrameAxes
{
return appCore->referenceMarkEnabled("frame axes");
}
-(void) setShowFrameAxes: (BOOL) value
{
appCore->toggleReferenceMark("frame axes");
}
-(BOOL) showSunDirection
{
return appCore->referenceMarkEnabled("sun direction");
}
-(void) setShowSunDirection: (BOOL) value
{
appCore->toggleReferenceMark("sun direction");
}
-(BOOL) showVelocityVector
{
return appCore->referenceMarkEnabled("velocity vector");
}
-(void) setShowVelocityVector: (BOOL) value
{
appCore->toggleReferenceMark("velocity vector");
}
-(BOOL) showPlanetographicGrid
{
return appCore->referenceMarkEnabled("planetographic grid");
}
-(void) setShowPlanetographicGrid: (BOOL) value
{
appCore->toggleReferenceMark("planetographic grid");
}
REFMARKMETHODS(BodyAxes)
REFMARKMETHODS(FrameAxes)
REFMARKMETHODS(SunDirection)
REFMARKMETHODS(VelocityVector)
#endif
// Lighting Settings

View File

@ -33,6 +33,8 @@
if (index >= 0) [self removeItemAtIndex: index];
index = [self indexOfItemWithTitle: NSLocalizedStringFromTable(@"Show Velocity Vector",@"po",@"")];
if (index >= 0) [self removeItemAtIndex: index];
index = [self indexOfItemWithTitle: NSLocalizedStringFromTable(@"Show Planetographic Grid",@"po",@"")];
if (index >= 0) [self removeItemAtIndex: index];
}
#endif
@ -69,6 +71,13 @@
if ([aSelection body])
{
target = [aSelection body];
mi = [[[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Planetographic Grid",@"po",@"") action: nil keyEquivalent: @""] autorelease];
if (mi)
{
[mi setTag: 1004];
[self insertItem: mi atIndex: aIndex];
[settings scanForKeys: mi];
}
mi = [[[NSMenuItem alloc] initWithTitle: NSLocalizedStringFromTable(@"Show Velocity Vector",@"po",@"") action: nil keyEquivalent: @""] autorelease];
if (mi)
{