mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 13:30:15 -07:00
Minor code cleanup
This commit is contained in:
parent
f59959c3e6
commit
c3c2c1c066
5 changed files with 61 additions and 67 deletions
|
|
@ -137,14 +137,15 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
CallbackBridge.windowHeight = displayMetrics.heightPixels / scaleFactor;
|
||||
System.out.println("WidthHeight: " + CallbackBridge.windowWidth + ":" + CallbackBridge.windowHeight);
|
||||
|
||||
MCOptionUtils.INSTANCE.set("overrideWidth", Integer.toString(CallbackBridge.windowWidth));
|
||||
MCOptionUtils.INSTANCE.set("overrideHeight", Integer.toString(CallbackBridge.windowHeight));
|
||||
MCOptionUtils.INSTANCE.save();
|
||||
MCOptionUtils.load();
|
||||
MCOptionUtils.set("overrideWidth", Integer.toString(CallbackBridge.windowWidth));
|
||||
MCOptionUtils.set("overrideHeight", Integer.toString(CallbackBridge.windowHeight));
|
||||
MCOptionUtils.save();
|
||||
|
||||
gestureDetector = new GestureDetector(this, new SingleTapConfirm());
|
||||
|
||||
// Menu
|
||||
drawerLayout = (DrawerLayout) findViewById(R.id.main_drawer_options);
|
||||
drawerLayout = findViewById(R.id.main_drawer_options);
|
||||
|
||||
navDrawer = findViewById(R.id.main_navigation_view);
|
||||
navDrawer.setNavigationItemSelectedListener(
|
||||
|
|
@ -173,10 +174,10 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
|
||||
// Mouse pointer part
|
||||
//this.mouseToggleButton = findButton(R.id.control_togglemouse);
|
||||
this.touchPad = (LinearLayout) findViewById(R.id.main_touchpad);
|
||||
this.touchPad = findViewById(R.id.main_touchpad);
|
||||
touchPad.setFocusable(false);
|
||||
|
||||
this.mousePointer = (ImageView) findViewById(R.id.main_mouse_pointer);
|
||||
this.mousePointer = findViewById(R.id.main_mouse_pointer);
|
||||
this.mousePointer.post(new Runnable(){
|
||||
|
||||
@Override
|
||||
|
|
@ -187,10 +188,10 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
}
|
||||
});
|
||||
|
||||
this.contentLog = (LinearLayout) findViewById(R.id.content_log_layout);
|
||||
this.contentScroll = (ScrollView) findViewById(R.id.content_log_scroll);
|
||||
this.contentLog = findViewById(R.id.content_log_layout);
|
||||
this.contentScroll = findViewById(R.id.content_log_scroll);
|
||||
this.textLog = (TextView) contentScroll.getChildAt(0);
|
||||
this.toggleLog = (ToggleButton) findViewById(R.id.content_log_toggle_log);
|
||||
this.toggleLog = findViewById(R.id.content_log_toggle_log);
|
||||
this.toggleLog.setChecked(false);
|
||||
// this.textLogBehindGL = (TextView) findViewById(R.id.main_log_behind_GL);
|
||||
// this.textLogBehindGL.setTypeface(Typeface.MONOSPACE);
|
||||
|
|
@ -206,9 +207,9 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
}
|
||||
});
|
||||
|
||||
this.debugText = (TextView) findViewById(R.id.content_text_debug);
|
||||
this.debugText = findViewById(R.id.content_text_debug);
|
||||
|
||||
this.minecraftGLView = (MinecraftGLView) findViewById(R.id.main_game_render_view);
|
||||
this.minecraftGLView = findViewById(R.id.main_game_render_view);
|
||||
|
||||
// toggleGui(null);
|
||||
this.drawerLayout.closeDrawers();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue