Move update history… again.
This commit is contained in:
6 files changed
+136
-71
No files matched your search
@@ -41,6 +41,7 @@ native:
|
||||
SurfaceViewController.m \
|
||||
AboutLauncherViewController.m \
|
||||
LauncherFAQViewController.m \
|
||||
UpdateHistoryViewController.m \
|
||||
egl_bridge_ios.m \
|
||||
ios_uikit_bridge.m \
|
||||
customcontrols/ControlButton.m \
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
int height = (int) roundf(screenBounds.size.height) - self.navigationController.navigationBar.frame.size.height;
|
||||
int rawHeight = (int) roundf(screenBounds.size.height);
|
||||
|
||||
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(width / 2, 0, width / 2, rawHeight)];
|
||||
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, self.navigationController.navigationBar.frame.size.height + 5, width, height)];
|
||||
[self.view addSubview:scrollView];
|
||||
scrollView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
|
||||
|
||||
@@ -43,88 +43,31 @@
|
||||
encoding:NSUTF8StringEncoding];
|
||||
NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
|
||||
|
||||
UILabel *logoVerView = [[UILabel alloc] initWithFrame:CGRectMake(20, height, (width / 2), 20)];
|
||||
UILabel *logoVerView = [[UILabel alloc] initWithFrame:CGRectMake(20, scrollView.frame.size.height - 5, width, 20)];
|
||||
logoVerView.text = [NSString stringWithFormat:@"version 1.3 (development) on %@ with iOS %@", deviceModel, currSysVer];
|
||||
logoVerView.lineBreakMode = NSLineBreakByWordWrapping;
|
||||
logoVerView.numberOfLines = 1;
|
||||
[logoVerView sizeToFit];
|
||||
[self.view addSubview:logoVerView];
|
||||
[scrollView addSubview:logoVerView];
|
||||
[logoVerView setFont:[UIFont boldSystemFontOfSize:10]];
|
||||
|
||||
UILabel *logoNoteView = [[UILabel alloc] initWithFrame:CGRectMake(20.0, self.navigationController.navigationBar.frame.size.height + 5, (width / 2) - 20, 20)];
|
||||
logoNoteView.text = @"Created by PojavLauncherTeam in 2021.\n\nWe do not exist on TikTok. No one from the dev team makes TikTok videos.\n\n";
|
||||
UILabel *logoNoteView = [[UILabel alloc] initWithFrame:CGRectMake(20.0, 10.0, width - 40, 700)];
|
||||
logoNoteView.text = @"Created by PojavLauncherTeam in 2021. We do not exist on TikTok. No one from the dev team makes TikTok videos.\n\nDuyKhanhTran - lead iOS port developer\nDoregon - UI/UX design\n\nSpecial thanks to Hayden Seay, for porting OpenJDK 16, making this possible, and hosting on Procursus.";
|
||||
logoNoteView.lineBreakMode = NSLineBreakByWordWrapping;
|
||||
logoNoteView.numberOfLines = 0;
|
||||
[logoNoteView sizeToFit];
|
||||
[self.view addSubview:logoNoteView];
|
||||
[scrollView addSubview:logoNoteView];
|
||||
|
||||
UITextView *discordLink = [[UITextView alloc] initWithFrame:CGRectMake(15, logoNoteView.frame.size.height + 9, (width / 2) - 20, height - (logoNoteView.frame.size.height + 9))];
|
||||
discordLink.text = @"Discord: https://discord.gg/pojavlauncher\nGitHub: https://bit.ly/2TIXhAA\nSubreddit: https://bit.ly/3wFsu6n";
|
||||
discordLink.editable = NO;
|
||||
discordLink.dataDetectorTypes = UIDataDetectorTypeAll;
|
||||
[self.view addSubview:discordLink];
|
||||
[discordLink setFont:[UIFont systemFontOfSize:17]];
|
||||
UITextView *links = [[UITextView alloc] initWithFrame:CGRectMake(15, logoNoteView.frame.size.height + 9, width - 40, height - (logoNoteView.frame.size.height + 9))];
|
||||
links.text = @"Discord: https://discord.gg/pojavlauncher\nGitHub: https://bit.ly/2TIXhAA\nSubreddit: https://reddit.com/r/PojavLauncher\nWiki: https://pojavlauncherteam.github.io";
|
||||
links.editable = NO;
|
||||
links.dataDetectorTypes = UIDataDetectorTypeAll;
|
||||
[scrollView addSubview:links];
|
||||
[links setFont:[UIFont systemFontOfSize:17]];
|
||||
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Send your logs" style:UIBarButtonItemStyleDone target:self action:@selector(latestLogShare)];
|
||||
|
||||
UILabel *latestVerView = [[UILabel alloc] initWithFrame:CGRectMake(4.0, 4.0, width, 30.0)];
|
||||
latestVerView.text = @"1.3";
|
||||
latestVerView.lineBreakMode = NSLineBreakByWordWrapping;
|
||||
latestVerView.numberOfLines = 0;
|
||||
[scrollView addSubview:latestVerView];
|
||||
[latestVerView setFont:[UIFont boldSystemFontOfSize:20]];
|
||||
|
||||
UILabel *latestVerCont = [[UILabel alloc] initWithFrame:CGRectMake(4.0, latestVerView.frame.origin.y + latestVerView.frame.size.height, scrollView.frame.size.width - 4, 30.00)];
|
||||
latestVerCont.text = @"You are running a development build of this version, so it does not have a valid changelog just yet.";
|
||||
latestVerCont.numberOfLines = 0;
|
||||
[latestVerCont sizeToFit];
|
||||
[scrollView addSubview:latestVerCont];
|
||||
|
||||
UILabel *backOneVerView = [[UILabel alloc] initWithFrame:CGRectMake(4.0, latestVerCont.frame.origin.y + latestVerCont.frame.size.height + 20.0, scrollView.frame.size.width - 4, 30.0)];
|
||||
backOneVerView.text = @"1.2";
|
||||
backOneVerView.lineBreakMode = NSLineBreakByWordWrapping;
|
||||
backOneVerView.numberOfLines = 0;
|
||||
[scrollView addSubview:backOneVerView];
|
||||
[backOneVerView setFont:[UIFont boldSystemFontOfSize:20]];
|
||||
|
||||
UILabel *backOneVerChanges = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerView.frame.origin.y + backOneVerView.frame.size.height, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerChanges.text = @"Changes";
|
||||
backOneVerChanges.numberOfLines = 0;
|
||||
[scrollView addSubview:backOneVerChanges];
|
||||
[backOneVerChanges setFont:[UIFont boldSystemFontOfSize:17]];
|
||||
|
||||
|
||||
UILabel *backOneVerChangesCont = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerChanges.frame.origin.y + backOneVerChanges.frame.size.height, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerChangesCont.text = @"- Use new method for Microsoft login\n- Moved latestlog.txt and overrideargs.txt to /var/mobile/Documents/.pojavlauncher\n- WIP custom controls and external mouse support";
|
||||
backOneVerChangesCont.numberOfLines = 0;
|
||||
[backOneVerChangesCont sizeToFit];
|
||||
[scrollView addSubview:backOneVerChangesCont];
|
||||
|
||||
UILabel *backOneVerFixes = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerChangesCont.frame.origin.y + backOneVerChangesCont.frame.size.height + 5.0, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerFixes.text = @"Fixes";
|
||||
backOneVerFixes.numberOfLines = 0;
|
||||
[scrollView addSubview:backOneVerFixes];
|
||||
[backOneVerFixes setFont:[UIFont boldSystemFontOfSize:17]];
|
||||
|
||||
UILabel *backOneVerFixesCont = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerFixes.frame.origin.y + backOneVerFixes.frame.size.height, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerFixesCont.text = @"- Fix file permission issues during install of package\n- Hide home bar like Bedrock Edition\n- Properly hide iPad status bar";
|
||||
backOneVerFixesCont.numberOfLines = 0;
|
||||
[backOneVerFixesCont sizeToFit];
|
||||
[scrollView addSubview:backOneVerFixesCont];
|
||||
|
||||
UILabel *backOneVerIssues = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerFixesCont.frame.origin.y + backOneVerFixesCont.frame.size.height + 5.0, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerIssues.text = @"Issues";
|
||||
backOneVerIssues.numberOfLines = 0;
|
||||
[scrollView addSubview:backOneVerIssues];
|
||||
[backOneVerIssues setFont:[UIFont boldSystemFontOfSize:17]];
|
||||
|
||||
UILabel *backOneVerIssuesCont = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerIssues.frame.origin.y + backOneVerIssues.frame.size.height, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerIssuesCont.text = @"- Crash if login to Microsoft fails\n- Several Forge versions won’t work due to removed deprecated classes (see #67 and #68)\n- Text input will not work on 1.12.2 and below";
|
||||
backOneVerIssuesCont.numberOfLines = 0;
|
||||
[backOneVerIssuesCont sizeToFit];
|
||||
[scrollView addSubview:backOneVerIssuesCont];
|
||||
|
||||
scrollView.contentSize = CGSizeMake(scrollView.frame.size.width, scrollView.frame.size.height + 800);
|
||||
scrollView.contentSize = CGSizeMake(scrollView.frame.size.width, scrollView.frame.size.height + 20);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ set_target_properties(PojavLauncher PROPERTIES
|
||||
MACOSX_FRAMEWORK_IDENTIFIER org.cmake.ExecutableTarget
|
||||
MACOSX_BUNDLE_INFO_PLIST "../Info.plist")
|
||||
|
||||
add_library(pojavexec SHARED log.m AppDelegate.m SceneDelegate.m UILauncher.m LauncherViewController.m LauncherPreferencesViewController.m LauncherFAQViewController.m LoginViewController.m SurfaceViewController.m AboutLauncherViewController.m egl_bridge_ios.m ios_uikit_bridge.m customcontrols/ControlButton.m egl_bridge.c input_bridge_v3.c utils.c)
|
||||
add_library(pojavexec SHARED log.m AppDelegate.m SceneDelegate.m UILauncher.m LauncherViewController.m LauncherPreferencesViewController.m LauncherFAQViewController.m LoginViewController.m SurfaceViewController.m UpdateHistoryViewController.m AboutLauncherViewController.m egl_bridge_ios.m ios_uikit_bridge.m customcontrols/ControlButton.m egl_bridge.c input_bridge_v3.c utils.c)
|
||||
target_link_libraries(pojavexec
|
||||
"-Fresources/Frameworks"
|
||||
"-framework UIKit"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#import "LauncherPreferencesViewController.h"
|
||||
#import "UpdateHistoryViewController.h"
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
@@ -39,6 +40,8 @@ UITextField* versionTextField;
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
}
|
||||
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Update History" style:UIBarButtonItemStyleDone target:self action:@selector(updateHistory)];
|
||||
|
||||
// not yet finished, empty view controller for now
|
||||
/*
|
||||
UILabel *btnsizeTextView = [[UILabel alloc] initWithFrame:CGRectMake(4.0, 4.0, 0.0, 30.0)];
|
||||
@@ -60,6 +63,11 @@ UITextField* versionTextField;
|
||||
scrollView.contentSize = CGSizeMake(scrollView.frame.size.width, scrollView.frame.size.height + 200);
|
||||
}
|
||||
|
||||
- (void)updateHistory {
|
||||
UpdateHistoryViewController *vc = [[UpdateHistoryViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures {
|
||||
return UIRectEdgeBottom;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface UpdateHistoryViewController : UIViewController
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
#import "UpdateHistoryViewController.h"
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
@interface UpdateHistoryViewController () {
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation UpdateHistoryViewController
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
[self setTitle:@"Update History"];
|
||||
|
||||
CGRect screenBounds = [[UIScreen mainScreen] bounds];
|
||||
CGFloat screenScale = [[UIScreen mainScreen] scale];
|
||||
|
||||
int width = (int) roundf(screenBounds.size.width);
|
||||
int height = (int) roundf(screenBounds.size.height) - self.navigationController.navigationBar.frame.size.height;
|
||||
int rawHeight = (int) roundf(screenBounds.size.height);
|
||||
|
||||
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, width, rawHeight)];
|
||||
[self.view addSubview:scrollView];
|
||||
scrollView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
|
||||
|
||||
// Update color mode once
|
||||
if(@available(iOS 13.0, *)) {
|
||||
[self traitCollectionDidChange:nil];
|
||||
} else {
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
}
|
||||
|
||||
UILabel *latestVerView = [[UILabel alloc] initWithFrame:CGRectMake(4.0, 4.0, width, 30.0)];
|
||||
latestVerView.text = @"1.3";
|
||||
latestVerView.lineBreakMode = NSLineBreakByWordWrapping;
|
||||
latestVerView.numberOfLines = 0;
|
||||
[scrollView addSubview:latestVerView];
|
||||
[latestVerView setFont:[UIFont boldSystemFontOfSize:20]];
|
||||
|
||||
UILabel *latestVerCont = [[UILabel alloc] initWithFrame:CGRectMake(4.0, latestVerView.frame.origin.y + latestVerView.frame.size.height, scrollView.frame.size.width - 4, 30.00)];
|
||||
latestVerCont.text = @"You are running a development build of this version, so it does not have a valid changelog just yet.";
|
||||
latestVerCont.numberOfLines = 0;
|
||||
[latestVerCont sizeToFit];
|
||||
[scrollView addSubview:latestVerCont];
|
||||
|
||||
UILabel *backOneVerView = [[UILabel alloc] initWithFrame:CGRectMake(4.0, latestVerCont.frame.origin.y + latestVerCont.frame.size.height + 20.0, scrollView.frame.size.width - 4, 30.0)];
|
||||
backOneVerView.text = @"1.2";
|
||||
backOneVerView.lineBreakMode = NSLineBreakByWordWrapping;
|
||||
backOneVerView.numberOfLines = 0;
|
||||
[scrollView addSubview:backOneVerView];
|
||||
[backOneVerView setFont:[UIFont boldSystemFontOfSize:20]];
|
||||
|
||||
UILabel *backOneVerChanges = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerView.frame.origin.y + backOneVerView.frame.size.height, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerChanges.text = @"Changes";
|
||||
backOneVerChanges.numberOfLines = 0;
|
||||
[scrollView addSubview:backOneVerChanges];
|
||||
[backOneVerChanges setFont:[UIFont boldSystemFontOfSize:17]];
|
||||
|
||||
|
||||
UILabel *backOneVerChangesCont = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerChanges.frame.origin.y + backOneVerChanges.frame.size.height, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerChangesCont.text = @"- Use new method for Microsoft login\n- Moved latestlog.txt and overrideargs.txt to /var/mobile/Documents/.pojavlauncher\n- WIP custom controls and external mouse support";
|
||||
backOneVerChangesCont.numberOfLines = 0;
|
||||
[backOneVerChangesCont sizeToFit];
|
||||
[scrollView addSubview:backOneVerChangesCont];
|
||||
|
||||
UILabel *backOneVerFixes = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerChangesCont.frame.origin.y + backOneVerChangesCont.frame.size.height + 5.0, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerFixes.text = @"Fixes";
|
||||
backOneVerFixes.numberOfLines = 0;
|
||||
[scrollView addSubview:backOneVerFixes];
|
||||
[backOneVerFixes setFont:[UIFont boldSystemFontOfSize:17]];
|
||||
|
||||
UILabel *backOneVerFixesCont = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerFixes.frame.origin.y + backOneVerFixes.frame.size.height, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerFixesCont.text = @"- Fix file permission issues during install of package\n- Hide home bar like Bedrock Edition\n- Properly hide iPad status bar";
|
||||
backOneVerFixesCont.numberOfLines = 0;
|
||||
[backOneVerFixesCont sizeToFit];
|
||||
[scrollView addSubview:backOneVerFixesCont];
|
||||
|
||||
UILabel *backOneVerIssues = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerFixesCont.frame.origin.y + backOneVerFixesCont.frame.size.height + 5.0, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerIssues.text = @"Issues";
|
||||
backOneVerIssues.numberOfLines = 0;
|
||||
[scrollView addSubview:backOneVerIssues];
|
||||
[backOneVerIssues setFont:[UIFont boldSystemFontOfSize:17]];
|
||||
|
||||
UILabel *backOneVerIssuesCont = [[UILabel alloc] initWithFrame:CGRectMake(4.0, backOneVerIssues.frame.origin.y + backOneVerIssues.frame.size.height, scrollView.frame.size.width - 4, 30.00)];
|
||||
backOneVerIssuesCont.text = @"- Crash if login to Microsoft fails\n- Several Forge versions won’t work due to removed deprecated classes (see #67 and #68)\n- Text input will not work on 1.12.2 and below";
|
||||
backOneVerIssuesCont.numberOfLines = 0;
|
||||
[backOneVerIssuesCont sizeToFit];
|
||||
[scrollView addSubview:backOneVerIssuesCont];
|
||||
|
||||
scrollView.contentSize = CGSizeMake(scrollView.frame.size.width, scrollView.frame.size.height + 800);
|
||||
|
||||
}
|
||||
|
||||
-(void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
|
||||
if(@available(iOS 13.0, *)) {
|
||||
if (UITraitCollection.currentTraitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||
self.view.backgroundColor = [UIColor blackColor];
|
||||
} else {
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user