mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-12 01:21:09 -07:00
Menu button
This commit is contained in:
parent
a197b906a2
commit
c4880416e6
5 changed files with 43 additions and 2 deletions
|
|
@ -44,7 +44,7 @@ import net.kdt.pojavlaunch.value.launcherprofiles.MinecraftProfile;
|
|||
import org.lwjgl.glfw.*;
|
||||
import android.net.*;
|
||||
|
||||
public class MainActivity extends BaseActivity {
|
||||
public class MainActivity extends BaseActivity implements ControlButtonMenuListener{
|
||||
public static volatile ClipboardManager GLOBAL_CLIPBOARD;
|
||||
public static final String INTENT_MINECRAFT_VERSION = "intent_version";
|
||||
|
||||
|
|
@ -116,6 +116,7 @@ public class MainActivity extends BaseActivity {
|
|||
protected void initLayout(int resId) {
|
||||
setContentView(resId);
|
||||
bindValues();
|
||||
mControlLayout.setMenuListener(this);
|
||||
|
||||
mDrawerPullButton.setOnClickListener(v -> drawerLayout.openDrawer(navDrawer));
|
||||
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
|
||||
|
|
@ -210,6 +211,7 @@ public class MainActivity extends BaseActivity {
|
|||
} catch (Throwable th) {
|
||||
Tools.showError(this, th);
|
||||
}
|
||||
mDrawerPullButton.setVisibility(mControlLayout.hasMenuButton() ? View.GONE : View.VISIBLE);
|
||||
mControlLayout.toggleControlVisible();
|
||||
}
|
||||
|
||||
|
|
@ -405,6 +407,7 @@ public class MainActivity extends BaseActivity {
|
|||
minecraftProfile.controlFile == null
|
||||
? LauncherPreferences.PREF_DEFAULTCTRL_PATH
|
||||
: Tools.CTRLMAP_PATH + "/" + minecraftProfile.controlFile);
|
||||
mDrawerPullButton.setVisibility(mControlLayout.hasMenuButton() ? View.GONE : View.VISIBLE);
|
||||
} catch (IOException e) {
|
||||
Tools.showError(this,e);
|
||||
}
|
||||
|
|
@ -515,4 +518,9 @@ public class MainActivity extends BaseActivity {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClickedMenu() {
|
||||
drawerLayout.openDrawer(navDrawer);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue