@Override protected void onClick( Touch touch ) { DeviceCompat.openURI( "https://" + LNK_SHPX ); } };
@Override protected boolean onLongClick() { //making it easier to start runs quickly while debugging if (DeviceCompat.isDebug()) { TitleScene.this.add( new WndStartGame(1) ); return true; } return super.onLongClick(); } };
public static void updateSystemUI() { boolean fullscreen = Build.VERSION.SDK_INT < Build.VERSION_CODES.N || !instance.isInMultiWindowMode(); if (fullscreen){ instance.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); } else { instance.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN); } if (DeviceCompat.supportsFullScreen()){ if (fullscreen && SPDSettings.fullscreen()) { instance.getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION ); } else { instance.getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE ); } } }
public static void i( String text, Object... args ) { if (args.length > 0) { text = Messages.format( text, args ); } DeviceCompat.log( TAG, text ); update.dispatch( text ); }
public static void setup( Languages lang ){ strings = new HashMap<>(); Messages.lang = lang; Locale locale = new Locale(lang.code()); for (String file : prop_files) { ResourceBundle bundle = ResourceBundle.getBundle( file, locale); Enumeration<String> keys = bundle.getKeys(); while (keys.hasMoreElements()) { String key = keys.nextElement(); String value = bundle.getString(key); if (DeviceCompat.usesISO_8859_1()) { try { value = new String(value.getBytes("ISO-8859-1"), "UTF-8"); } catch (Exception e) { ShatteredPixelDungeon.reportException(e); } } strings.put(key, value); } } }
DeviceCompat.legacyDevice(), false ));
@Override protected boolean onLongClick() { //making it easier to start runs quickly while debugging if (DeviceCompat.isDebug()) { TitleScene.this.add( new WndStartGame(1) ); return true; } return super.onLongClick(); } };
btnResolution.enable( DeviceCompat.supportsFullScreen() ); btnResolution.setRect(0, scale.bottom() + GAP_TINY, WIDTH, BTN_HEIGHT); add(btnResolution);
public static void i( String text, Object... args ) { if (args.length > 0) { text = Messages.format( text, args ); } DeviceCompat.log(TAG, text); update.dispatch( text ); }
public static void setup( Languages lang ){ strings = new HashMap<>(); Messages.lang = lang; Locale locale = new Locale(lang.code()); for (String file : prop_files) { ResourceBundle bundle = ResourceBundle.getBundle( file, locale); Enumeration<String> keys = bundle.getKeys(); while (keys.hasMoreElements()) { String key = keys.nextElement(); String value = bundle.getString(key); if (DeviceCompat.usesISO_8859_1()) { try { value = new String(value.getBytes("ISO-8859-1"), "UTF-8"); } catch (Exception e) { ShatteredPixelDungeon.reportException(e); } } strings.put(key, value); } } }
public boolean isUnlocked(){ //always unlock on debug builds if (DeviceCompat.isDebug()) return true; switch (this){ case WARRIOR: default: return true; case MAGE: return Badges.isUnlocked(Badges.Badge.UNLOCK_MAGE); case ROGUE: return Badges.isUnlocked(Badges.Badge.UNLOCK_ROGUE); case HUNTRESS: return Badges.isUnlocked(Badges.Badge.UNLOCK_HUNTRESS); } }
@Override protected void onClick( Touch touch ) { DeviceCompat.openURI( "https://" + LNK_WATA ); } };
chkImmersive.setRect( 0, slots.bottom() + GAP_SML, WIDTH, BTN_HEIGHT ); chkImmersive.checked(SPDSettings.fullscreen()); chkImmersive.enable(DeviceCompat.supportsFullScreen()); add(chkImmersive);
public boolean isUnlocked(){ //always unlock on debug builds if (DeviceCompat.isDebug()) return true; switch (this){ case WARRIOR: default: return true; case MAGE: return Badges.isUnlocked(Badges.Badge.UNLOCK_MAGE); case ROGUE: return Badges.isUnlocked(Badges.Badge.UNLOCK_ROGUE); case HUNTRESS: return Badges.isUnlocked(Badges.Badge.UNLOCK_HUNTRESS); } }
@Override protected void onClick( NoosaInputProcessor.Touch touch ) { DeviceCompat.openURI("http://" + LNK_WATA); } };
if (DeviceCompat.isDebug()){ fadeTime /= 2;
@Override protected void onClick( NoosaInputProcessor.Touch touch ) { DeviceCompat.openURI("https://" + LNK_SHPX); } };
if (DeviceCompat.isDebug()){ fadeTime /= 2;