Move buttons around, minor changes to Makefile on iOS

This commit is contained in:
Adam Tunnic committed 2021-06-13 21:14:03 -04:00
1 parent 0820ac5fcb
commit 25d2f35369
3 files changed
+15 -30

No files matched your search

+2 -2
View File
@@ -116,7 +116,7 @@ package:
cp -R Natives/build/Release-iphoneos/PojavLauncher.app packages/pojavlauncher_iphoneos-arm/Applications; \
cp -R DEBIAN packages/pojavlauncher_iphoneos-arm/DEBIAN; \
ldid -Sentitlements.xml packages/pojavlauncher_iphoneos-arm/Applications/PojavLauncher.app || exit 1; \
fakeroot dpkg-deb -b packages/pojavlauncher_iphoneos-arm || exit 1; \
fakeroot dpkg-deb -b packages/pojavlauncher_iphoneos-arm &> /dev/null || exit 1; \
fi
@echo 'Finished build task - Packaging'
@@ -139,7 +139,7 @@ install:
elif [ '$(IOS)' = '1' ]; then \
sudo apt remove pojavlauncher -y; \
sudo apt remove pojavlauncher-dev -y; \
sudo mv packages/pojavlauncher_iphoneos-arm.deb /var/tmp/pojavlauncher_iphoneos-arm.deb; \
sudo cp packages/pojavlauncher_iphoneos-arm.deb /var/tmp/pojavlauncher_iphoneos-arm.deb; \
sudo dpkg -i /var/tmp/pojavlauncher_iphoneos-arm.deb; \
uicache -p /Applications/PojavLauncher.app; \
fi
+2 -19
View File
@@ -1,6 +1,5 @@
#import "LauncherViewController.h"
#import "LauncherPreferencesViewController.h"
#import "LauncherFAQViewController.h"
#include "utils.h"
@@ -60,19 +59,9 @@ UITextField* versionTextField;
versionTextField.text = [NSString stringWithUTF8String:configver];
fclose(configver_file);
[scrollView addSubview:versionTextField];
UIButton *preferences_button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[preferences_button setTitle:@"Settings" forState:UIControlStateNormal];
preferences_button.frame = CGRectMake(10.0, height - 108.0, 100.0, 50.0);
[preferences_button addTarget:self action:@selector(enterPreferences) forControlEvents:UIControlEventTouchUpInside];
[scrollView addSubview:preferences_button];
UIButton *quickfaq = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[quickfaq setTitle:@"FAQ" forState:UIControlStateNormal];
quickfaq.frame = CGRectMake(width - 110.0, height - 108.0, 100.0, 50.0);
[quickfaq addTarget:self action:@selector(showFAQ) forControlEvents:UIControlEventTouchUpInside];
[scrollView addSubview:quickfaq];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Settings" style:UIBarButtonItemStyleDone target:self action:@selector(enterPreferences)];
install_progress_bar = [[UIProgressView alloc] initWithFrame:CGRectMake(4.0, height - 58.0, width - 8.0, 6.0)];
[scrollView addSubview:install_progress_bar];
@@ -118,10 +107,4 @@ UITextField* versionTextField;
[self.navigationController pushViewController:vc animated:YES];
}
- (void)showFAQ
{
LauncherFAQViewController *vc = [[LauncherFAQViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
@end
+11 -9
View File
@@ -7,6 +7,7 @@
#import "LauncherViewController.h"
#import "LoginViewController.h"
#import "AboutLauncherViewController.h"
#import "LauncherFAQViewController.h"
#include "ios_uikit_bridge.h"
#include "utils.h"
@@ -75,6 +76,10 @@ void loginAccountInput(UINavigationController *controller, int type, const char*
}
CGFloat widthSplit = width / 4.0;
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"About" style:UIBarButtonItemStyleDone target:self action:@selector(aboutLauncher)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"FAQ" style:UIBarButtonItemStyleDone target:self action:@selector(showFAQ)];
UIButton *button_login_mojang = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button_login_mojang setTitle:@"Mojang login" forState:UIControlStateNormal];
@@ -111,15 +116,6 @@ void loginAccountInput(UINavigationController *controller, int type, const char*
[button_login_account setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[button_login_account addTarget:self action:@selector(loginAccount) forControlEvents:UIControlEventTouchUpInside];
[scrollView addSubview:button_login_account];
UIButton *button_about_launcher = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button_about_launcher setTitle:@"About the Launcher" forState:UIControlStateNormal];
button_about_launcher.frame = CGRectMake((width / 2) - 100.0, height - 75.0, 200.0, 50.0);
// button_about_launcher.backgroundColor = [UIColor colorWithRed:54/255.0 green:176/255.0 blue:48/255.0 alpha:1.0];
// button_about_launcher.layer.cornerRadius = 5;
// [button_about_launcher setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[button_about_launcher addTarget:self action:@selector(aboutLauncher) forControlEvents:UIControlEventTouchUpInside];
[scrollView addSubview:button_about_launcher];
}
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
@@ -293,6 +289,12 @@ void loginAccountInput(UINavigationController *controller, int type, const char*
[self.navigationController pushViewController:vc animated:YES];
}
- (void)showFAQ
{
LauncherFAQViewController *vc = [[LauncherFAQViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}
#pragma mark - ASWebAuthenticationPresentationContextProviding
- (ASPresentationAnchor)presentationAnchorForWebAuthenticationSession:(ASWebAuthenticationSession *)session API_AVAILABLE(ios(13.0)){
return UIApplication.sharedApplication.windows.firstObject;