mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-17 12:00:10 -07:00
More working at custom controls
This commit is contained in:
parent
ebb1cd9c7b
commit
08f5897cc1
11 changed files with 138 additions and 17 deletions
|
|
@ -36,6 +36,7 @@ import org.lwjgl.util.glu.tessellation.*;
|
|||
|
||||
import android.app.AlertDialog;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import net.kdt.pojavlaunch.value.customcontrols.*;
|
||||
|
||||
public class MainActivity extends AppCompatActivity implements OnTouchListener, OnClickListener
|
||||
{
|
||||
|
|
@ -275,6 +276,27 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||
|
||||
this.glSurfaceView = (MinecraftGLView) findViewById(R.id.main_game_render_view);
|
||||
|
||||
ControlButton[] specialButtons = ControlButton.getSpecialButtons();
|
||||
specialButtons[0].specialButtonListener = new View.OnClickListener(){
|
||||
|
||||
@Override
|
||||
public void onClick(View p1)
|
||||
{
|
||||
showKeyboard();
|
||||
}
|
||||
};
|
||||
specialButtons[1].specialButtonListener = new View.OnClickListener(){
|
||||
|
||||
@Override
|
||||
public void onClick(View p1)
|
||||
{
|
||||
switch(overlayView.getVisibility()){
|
||||
case View.VISIBLE: overlayView.setVisibility(View.GONE);
|
||||
break;
|
||||
case View.GONE: overlayView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// toggleGui(null);
|
||||
onClick(toggleControlButton);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue