mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
making updates
This commit is contained in:
parent
15cc7a0e6c
commit
8819a37712
9 changed files with 44 additions and 36 deletions
|
@ -60,7 +60,7 @@
|
|||
<connections>
|
||||
<outlet property="background" destination="kuY-e2-Hqb" id="CBc-bD-ux7"/>
|
||||
<outlet property="boldStatus" destination="EMF-E4-qLL" id="udm-8B-7lt"/>
|
||||
<outlet property="progressView" destination="aEr-fi-fkV" id="YzB-3s-Ass"/>
|
||||
<outlet property="progressView" destination="aEr-fi-fkV" id="OUy-Qp-tiP"/>
|
||||
<outlet property="smallLogo" destination="uh2-4K-n56" id="pYg-hP-nr5"/>
|
||||
<outlet property="smallStatus" destination="BSg-lp-njL" id="ziz-ek-Lq4"/>
|
||||
<outlet property="voxelImage" destination="Nrc-t3-PSh" id="J81-ex-qbE"/>
|
||||
|
|
|
@ -25,6 +25,6 @@ extern NSString* hifiBackgroundFilename;
|
|||
@end
|
||||
|
||||
@interface Hyperlink : NSTextField {
|
||||
|
||||
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -24,19 +24,19 @@ NSString* hifiBackgroundFilename = @"hifi_window";
|
|||
[NSApp sendAction:(NSSelectorFromString(@"paste:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
if ([[event charactersIgnoringModifiers] isEqualToString:@"c"]) {
|
||||
[NSApp sendAction:(NSSelectorFromString(@"copy:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
if ([[event charactersIgnoringModifiers] isEqualToString:@"a"]) {
|
||||
[NSApp sendAction:(NSSelectorFromString(@"selectAll:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return [super performKeyEquivalent:event];
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ NSString* hifiBackgroundFilename = @"hifi_window";
|
|||
NSTextView *fieldEditor = (NSTextView*)[self.window fieldEditor:YES
|
||||
forObject:self];
|
||||
fieldEditor.insertionPointColor = insertionPointColor;
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(BOOL)becomeFirstResponder
|
||||
|
@ -75,7 +75,7 @@ NSString* hifiBackgroundFilename = @"hifi_window";
|
|||
NSTextView *fieldEditor = (NSTextView*)[self.window fieldEditor:YES
|
||||
forObject:self];
|
||||
fieldEditor.insertionPointColor = insertionPointColor;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -97,19 +97,19 @@ NSString* hifiBackgroundFilename = @"hifi_window";
|
|||
[NSApp sendAction:(NSSelectorFromString(@"paste:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
if ([[event charactersIgnoringModifiers] isEqualToString:@"c"]) {
|
||||
[NSApp sendAction:(NSSelectorFromString(@"copy:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
if ([[event charactersIgnoringModifiers] isEqualToString:@"a"]) {
|
||||
[NSApp sendAction:(NSSelectorFromString(@"selectAll:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return [super performKeyEquivalent:event];
|
||||
}
|
||||
@end
|
||||
|
@ -126,7 +126,7 @@ NSString* hifiBackgroundFilename = @"hifi_window";
|
|||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
|
||||
self.wantsLayer = YES;
|
||||
self.layer.backgroundColor = [NSColor blackColor].CGColor;
|
||||
self.layer.borderColor = [NSColor whiteColor].CGColor;
|
||||
|
@ -134,16 +134,16 @@ NSString* hifiBackgroundFilename = @"hifi_window";
|
|||
self.layer.masksToBounds = YES;
|
||||
|
||||
_titleLayer = [[CATextLayer alloc] init];
|
||||
|
||||
|
||||
CGSize buttonSize = self.frame.size;
|
||||
CGSize titleSize = [self.title sizeWithAttributes:@{NSFontAttributeName: self.font}];
|
||||
CGFloat x = (buttonSize.width - titleSize.width) / 2.0; // Title's origin x
|
||||
CGFloat y = (buttonSize.height - titleSize.height) / 2.0; // Title's origin y
|
||||
|
||||
|
||||
self.titleLayer.frame = NSMakeRect(round(x), round(y), ceil(titleSize.width), ceil(titleSize.height));
|
||||
self.titleLayer.string = self.title;
|
||||
self.titleLayer.foregroundColor = [NSColor whiteColor].CGColor;
|
||||
|
||||
|
||||
// TODO(huffman) Fix this to be dynamic based on screen?
|
||||
self.titleLayer.contentsScale = 2.0;
|
||||
|
||||
|
@ -151,7 +151,7 @@ NSString* hifiBackgroundFilename = @"hifi_window";
|
|||
self.titleLayer.fontSize = self.font.pointSize;
|
||||
//self.titleLayer.allowsEdgeAntialiasing = YES;
|
||||
//self.titleLayer.allowsFontSubpixelQuantization = YES;
|
||||
|
||||
|
||||
[self.layer addSublayer:self.titleLayer];
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
-(IBAction)resartLauncher:(id)sender
|
||||
{
|
||||
[[Launcher sharedLauncher] showLoginScreen];
|
||||
[[Launcher sharedLauncher] restart];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@implementation LatestBuildRequest
|
||||
|
||||
- (NSInteger) getCurrentVersion {
|
||||
/*NSInteger currentVersion;
|
||||
NSInteger currentVersion;
|
||||
@try {
|
||||
NSString* interfaceAppPath = [[Launcher.sharedLauncher getAppPath] stringByAppendingString:@"interface.app"];
|
||||
NSError * error = nil;
|
||||
|
@ -19,8 +19,8 @@
|
|||
} @catch (NSException *exception) {
|
||||
NSLog(@"an exception was thrown: %@", exception);
|
||||
currentVersion = [Settings.sharedSettings latestBuildVersion];
|
||||
}*/
|
||||
return [Settings.sharedSettings latestBuildVersion];//currentVersion;
|
||||
}
|
||||
return currentVersion;
|
||||
}
|
||||
|
||||
- (void) requestLatestBuildInfo {
|
||||
|
@ -32,13 +32,18 @@
|
|||
// We're using an ephermeral session here to ensure the tags api response is never cached.
|
||||
NSURLSession * session = [NSURLSession sessionWithConfiguration:NSURLSessionConfiguration.ephemeralSessionConfiguration];
|
||||
NSURLSessionDataTask* dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
|
||||
|
||||
NSLog(@"Latest Build Request error: %@", error);
|
||||
NSLog(@"Latest Build Request Data: %@", data);
|
||||
NSHTTPURLResponse *ne = (NSHTTPURLResponse *)response;
|
||||
NSLog(@"Latest Build Request Response: %ld", [ne statusCode]);
|
||||
Launcher* sharedLauncher = [Launcher sharedLauncher];
|
||||
|
||||
if ([ne statusCode] == 500) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[sharedLauncher displayErrorPage];
|
||||
});
|
||||
return;
|
||||
}
|
||||
NSMutableData* webData = [NSMutableData data];
|
||||
[webData appendData:data];
|
||||
NSString* jsonString = [[NSString alloc] initWithBytes: [webData mutableBytes] length:[data length] encoding:NSUTF8StringEncoding];
|
||||
|
|
|
@ -72,6 +72,7 @@ struct LatestBuildInfo {
|
|||
- (BOOL) loginShouldSetErrorState;
|
||||
- (void) displayErrorPage;
|
||||
- (void) showLoginScreen;
|
||||
- (void) restart;
|
||||
- (NSString*) getLauncherPath;
|
||||
- (ProcessState) currentProccessState;
|
||||
- (void) setCurrentProcessState:(ProcessState) aProcessState;
|
||||
|
|
|
@ -89,8 +89,6 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
|||
|
||||
- (void) updateProgressIndicator
|
||||
{
|
||||
NSProgressIndicator* progressIndicator = [self getProgressView];
|
||||
double oldValue = progressIndicator.doubleValue;
|
||||
double contentPercentage = [self.downloadDomainContent getProgressPercentage];
|
||||
double interfacePercentage = [self.downloadInterface getProgressPercentage];
|
||||
double currentTotalPercentage = self.progressTarget;
|
||||
|
@ -136,16 +134,22 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
|||
|
||||
-(void) setProgressView:(NSProgressIndicator*) aProgressIndicator
|
||||
{
|
||||
NSLog(@"Setting progressIndicator %@", aProgressIndicator);
|
||||
self.progressIndicator = aProgressIndicator;
|
||||
}
|
||||
|
||||
-(NSProgressIndicator*) getProgressView
|
||||
{
|
||||
//NSLog(@"Getting progressIndicator %@", self.progressIndicator);
|
||||
return self.progressIndicator;
|
||||
}
|
||||
|
||||
- (void) restart
|
||||
{
|
||||
SplashScreen* splashScreen = [[SplashScreen alloc] initWithNibName:@"SplashScreen" bundle:nil];
|
||||
[[[[NSApplication sharedApplication] windows] objectAtIndex:0] setContentViewController: splashScreen];
|
||||
|
||||
[self checkLoginStatus];
|
||||
}
|
||||
|
||||
- (void) displayErrorPage
|
||||
{
|
||||
ErrorViewController* errorPage = [[ErrorViewController alloc] initWithNibName:@"ErrorScreen" bundle:nil];
|
||||
|
@ -154,7 +158,7 @@ static BOOL const DELETE_ZIP_FILES = TRUE;
|
|||
|
||||
- (void) checkLoginStatus
|
||||
{
|
||||
[NSTimer scheduledTimerWithTimeInterval:2.0
|
||||
[NSTimer scheduledTimerWithTimeInterval:1.0
|
||||
target:self
|
||||
selector:@selector(onSplashScreenTimerFinished:)
|
||||
userInfo:nil
|
||||
|
|
|
@ -38,25 +38,25 @@
|
|||
|
||||
[self.backgroundImage setImage:[NSImage imageNamed:hifiBackgroundFilename]];
|
||||
[self.smallLogo setImage:[NSImage imageNamed:hifiSmallLogoFilename]];
|
||||
|
||||
|
||||
NSMutableAttributedString* usernameString = [[NSMutableAttributedString alloc] initWithString:@"Username"];
|
||||
|
||||
|
||||
[usernameString addAttribute:NSForegroundColorAttributeName value:[NSColor grayColor] range:NSMakeRange(0,8)];
|
||||
[usernameString addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:18] range:NSMakeRange(0,8)];
|
||||
|
||||
|
||||
NSMutableAttributedString* orgName = [[NSMutableAttributedString alloc] initWithString:@"Organization Name"];
|
||||
[orgName addAttribute:NSForegroundColorAttributeName value:[NSColor grayColor] range:NSMakeRange(0,17)];
|
||||
[orgName addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:18] range:NSMakeRange(0,17)];
|
||||
|
||||
|
||||
NSMutableAttributedString* passwordString = [[NSMutableAttributedString alloc] initWithString:@"Password"];
|
||||
|
||||
|
||||
[passwordString addAttribute:NSForegroundColorAttributeName value:[NSColor grayColor] range:NSMakeRange(0,8)];
|
||||
[passwordString addAttribute:NSFontAttributeName value:[NSFont systemFontOfSize:18] range:NSMakeRange(0,8)];
|
||||
|
||||
|
||||
[self.username setPlaceholderAttributedString:usernameString];
|
||||
[self.orginization setPlaceholderAttributedString:orgName];
|
||||
[self.password setPlaceholderAttributedString:passwordString];
|
||||
|
||||
|
||||
[self.password setTarget:self];
|
||||
[self.password setAction:@selector(goToLogin:)];
|
||||
}
|
||||
|
|
|
@ -40,12 +40,10 @@
|
|||
[self.background setImage: [NSImage imageNamed:hifiBackgroundFilename]];
|
||||
[self.smallLogo setImage: [NSImage imageNamed:hifiSmallLogoFilename]];
|
||||
[self.voxelImage setImage: [NSImage imageNamed:hifiVoxelFilename]];
|
||||
//[sharedLauncher setProgressIndicator: self.progressView];
|
||||
//sharedLauncher.progressIndicator = self.progressView;
|
||||
if (self.progressView != nil) {
|
||||
NSLog(@"Progress view: %@", self.progressView);
|
||||
[sharedLauncher setProgressView: self.progressView];
|
||||
}
|
||||
|
||||
self.imageRotation = 0;
|
||||
[NSTimer scheduledTimerWithTimeInterval:0.016
|
||||
target:self
|
||||
|
|
Loading…
Reference in a new issue