mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 15:59:49 +02:00
remove OS X specific menu, have voxel server point to correct DS
This commit is contained in:
parent
7b1529ac96
commit
95eb241fdd
4 changed files with 1 additions and 87 deletions
|
@ -1,8 +0,0 @@
|
||||||
#ifndef __interface__InterfaceMacOSX
|
|
||||||
#define __interface__InterfaceMacOSX
|
|
||||||
|
|
||||||
class Oscilloscope;
|
|
||||||
|
|
||||||
void initMacOSXMenu(Oscilloscope *audioScope);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,68 +0,0 @@
|
||||||
#include "Oscilloscope.h"
|
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
#import "InterfaceMacOSX.h"
|
|
||||||
|
|
||||||
@class InterfaceMainMenuTarget;
|
|
||||||
|
|
||||||
static InterfaceMainMenuTarget *sharedInterfaceMainMenuTarget = nil;
|
|
||||||
static Oscilloscope *sharedAudioScope;
|
|
||||||
|
|
||||||
|
|
||||||
@interface InterfaceMainMenuTarget : NSObject
|
|
||||||
|
|
||||||
@property (strong, nonatomic) NSMenuItem *scopeAudioMenuItem;
|
|
||||||
@property (strong, nonatomic) NSMenuItem *scopeNoneMenuItem;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
|
|
||||||
@implementation InterfaceMainMenuTarget
|
|
||||||
|
|
||||||
- (void)scopeAudioAction {
|
|
||||||
sharedAudioScope->setState(true);
|
|
||||||
[self.scopeAudioMenuItem setState:NSOnState];
|
|
||||||
[self.scopeNoneMenuItem setState:NSOffState];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)scopeNoneAction {
|
|
||||||
sharedAudioScope->setState(false);
|
|
||||||
[self.scopeAudioMenuItem setState:NSOffState];
|
|
||||||
[self.scopeNoneMenuItem setState:NSOnState];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
|
|
||||||
void initMacOSXMenu(Oscilloscope *audioScope) {
|
|
||||||
@autoreleasepool {
|
|
||||||
if (NSApp) {
|
|
||||||
if (!sharedInterfaceMainMenuTarget) {
|
|
||||||
sharedInterfaceMainMenuTarget = [[InterfaceMainMenuTarget alloc] init];
|
|
||||||
}
|
|
||||||
sharedAudioScope = audioScope;
|
|
||||||
|
|
||||||
NSMenu *mainMenu = [NSApp mainMenu];
|
|
||||||
|
|
||||||
NSMenuItem *scopeMenuItem = [mainMenu insertItemWithTitle:@"Scope"
|
|
||||||
action:nil
|
|
||||||
keyEquivalent:@""
|
|
||||||
atIndex:3];
|
|
||||||
|
|
||||||
NSMenu *scopeMenu = [[[NSMenu alloc] init] initWithTitle:@"Scope"];
|
|
||||||
[scopeMenuItem setSubmenu:scopeMenu];
|
|
||||||
sharedInterfaceMainMenuTarget.scopeAudioMenuItem = [scopeMenu addItemWithTitle:@"Audio"
|
|
||||||
action:@selector(scopeAudioAction)
|
|
||||||
keyEquivalent:@""];
|
|
||||||
[sharedInterfaceMainMenuTarget.scopeAudioMenuItem setTarget:sharedInterfaceMainMenuTarget];
|
|
||||||
[sharedInterfaceMainMenuTarget.scopeAudioMenuItem setState:NSOnState];
|
|
||||||
|
|
||||||
sharedInterfaceMainMenuTarget.scopeNoneMenuItem = [scopeMenu addItemWithTitle:@"None"
|
|
||||||
action:@selector(scopeNoneAction)
|
|
||||||
keyEquivalent:@""];
|
|
||||||
[sharedInterfaceMainMenuTarget.scopeNoneMenuItem setTarget:sharedInterfaceMainMenuTarget];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -44,11 +44,6 @@
|
||||||
#include "Oscilloscope.h"
|
#include "Oscilloscope.h"
|
||||||
#include "UDPSocket.h"
|
#include "UDPSocket.h"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
|
|
||||||
#include "InterfaceMacOSX.h"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -952,11 +947,6 @@ int main(int argc, char** argv)
|
||||||
printf( "Init() complete.\n" );
|
printf( "Init() complete.\n" );
|
||||||
|
|
||||||
glutTimerFunc(1000, Timer, 0);
|
glutTimerFunc(1000, Timer, 0);
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
initMacOSXMenu(&audioScope);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
glutMainLoop();
|
glutMainLoop();
|
||||||
|
|
||||||
::terminate();
|
::terminate();
|
||||||
|
|
|
@ -34,7 +34,7 @@ const float DEATH_STAR_RADIUS = 4.0;
|
||||||
const float MAX_CUBE = 0.05;
|
const float MAX_CUBE = 0.05;
|
||||||
|
|
||||||
char DOMAIN_HOSTNAME[] = "highfidelity.below92.com";
|
char DOMAIN_HOSTNAME[] = "highfidelity.below92.com";
|
||||||
char DOMAIN_IP[100] = "192.168.1.47"; // IP Address will be re-set by lookup on startup
|
char DOMAIN_IP[100] = ""; // IP Address will be re-set by lookup on startup
|
||||||
const int DOMAINSERVER_PORT = 40102;
|
const int DOMAINSERVER_PORT = 40102;
|
||||||
|
|
||||||
AgentList agentList(VOXEL_LISTEN_PORT);
|
AgentList agentList(VOXEL_LISTEN_PORT);
|
||||||
|
|
Loading…
Reference in a new issue