mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-12 01:21:09 -07:00
VUI fixes & improvements pt. 1
Re-enabled multi-process and fixed controls notch offset in multi-process Used ThreadPoolExecutor for task execution with 0 starting threads Used translation strings instead of hardcoded strings Added terminate button for lazy service Added arrow for tasks list
This commit is contained in:
parent
d3a8c0bf17
commit
93396eff44
11 changed files with 72 additions and 46 deletions
|
|
@ -101,25 +101,7 @@ public class MainActivity extends BaseActivity {
|
|||
// Recompute the gui scale when options are changed
|
||||
MCOptionUtils.MCOptionListener optionListener = MCOptionUtils::getMcScale;
|
||||
MCOptionUtils.addMCOptionListener(optionListener);
|
||||
|
||||
try {
|
||||
// Load keys
|
||||
mControlLayout.loadLayout(
|
||||
minecraftProfile.controlFile == null
|
||||
? LauncherPreferences.PREF_DEFAULTCTRL_PATH
|
||||
: Tools.CTRLMAP_PATH + minecraftProfile.controlFile);
|
||||
} catch(IOException e) {
|
||||
try {
|
||||
Log.w("MainActivity", "Unable to load the control file, loading the default now");
|
||||
mControlLayout.loadLayout(Tools.CTRLDEF_FILE);
|
||||
} catch (IOException ioException) {
|
||||
Tools.showError(this, ioException);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
Tools.showError(this, th);
|
||||
}
|
||||
mControlLayout.setModifiable(false);
|
||||
mControlLayout.toggleControlVisible();
|
||||
}
|
||||
|
||||
protected void initLayout(int resId) {
|
||||
|
|
@ -202,6 +184,32 @@ public class MainActivity extends BaseActivity {
|
|||
}
|
||||
}
|
||||
|
||||
private void loadControls() {
|
||||
try {
|
||||
// Load keys
|
||||
mControlLayout.loadLayout(
|
||||
minecraftProfile.controlFile == null
|
||||
? LauncherPreferences.PREF_DEFAULTCTRL_PATH
|
||||
: Tools.CTRLMAP_PATH + minecraftProfile.controlFile);
|
||||
} catch(IOException e) {
|
||||
try {
|
||||
Log.w("MainActivity", "Unable to load the control file, loading the default now");
|
||||
mControlLayout.loadLayout(Tools.CTRLDEF_FILE);
|
||||
} catch (IOException ioException) {
|
||||
Tools.showError(this, ioException);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
Tools.showError(this, th);
|
||||
}
|
||||
mControlLayout.toggleControlVisible();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToWindow() {
|
||||
LauncherPreferences.computeNotchSize(this);
|
||||
loadControls();
|
||||
}
|
||||
|
||||
/** Boilerplate binding */
|
||||
private void bindValues(){
|
||||
mControlLayout = findViewById(R.id.main_control_layout);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue