Do not show "Change device config" button at all, if startup button timeout is 0
This commit is contained in:
@@ -97,26 +97,29 @@ public class MainActivity extends Activity
|
||||
_layout2 = new LinearLayout(this);
|
||||
_layout2.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
|
||||
_btn = new Button(this);
|
||||
_btn.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
_btn.setText(getResources().getString(R.string.device_change_cfg));
|
||||
class onClickListener implements View.OnClickListener
|
||||
if( Globals.StartupMenuButtonTimeout > 0 )
|
||||
{
|
||||
public MainActivity p;
|
||||
onClickListener( MainActivity _p ) { p = _p; }
|
||||
public void onClick(View v)
|
||||
{
|
||||
setUpStatusLabel();
|
||||
System.out.println("libSDL: User clicked change phone config button");
|
||||
Settings.showConfig(p, false);
|
||||
}
|
||||
};
|
||||
_btn.setOnClickListener(new onClickListener(this));
|
||||
_btn = new Button(this);
|
||||
_btn.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||
_btn.setText(getResources().getString(R.string.device_change_cfg));
|
||||
class onClickListener implements View.OnClickListener
|
||||
{
|
||||
public MainActivity p;
|
||||
onClickListener( MainActivity _p ) { p = _p; }
|
||||
public void onClick(View v)
|
||||
{
|
||||
setUpStatusLabel();
|
||||
System.out.println("libSDL: User clicked change phone config button");
|
||||
Settings.showConfig(p, false);
|
||||
}
|
||||
};
|
||||
_btn.setOnClickListener(new onClickListener(this));
|
||||
|
||||
_layout2.addView(_btn);
|
||||
_layout2.addView(_btn);
|
||||
}
|
||||
|
||||
_layout.addView(_layout2);
|
||||
|
||||
|
||||
ImageView img = new ImageView(this);
|
||||
|
||||
img.setScaleType(ImageView.ScaleType.FIT_CENTER /* FIT_XY */ );
|
||||
|
||||
@@ -602,8 +602,8 @@ int main(int argc, char* argv[])
|
||||
r.x = SCREEN_W/2 + screenjoy[0] * SCREEN_H / 65536;
|
||||
r.y = SCREEN_H/2 + screenjoy[1] * SCREEN_H / 65536;
|
||||
//__android_log_print(ANDROID_LOG_INFO, "Ballfield", "Screen joystick: %d %d screen %d %d", screenjoy[0], screenjoy[1], r.x, r.y);
|
||||
r.w = 6;
|
||||
r.h = 6;
|
||||
r.w = 10;
|
||||
r.h = 10;
|
||||
r.x -= r.w/2;
|
||||
r.y -= r.h/2;
|
||||
SDL_FillRect(screen, &r, 0x000000);
|
||||
|
||||
Reference in New Issue
Block a user