Tabnine Logo
PixelScene
Code IndexAdd Tabnine to your IDE (free)

How to use
PixelScene
in
com.shatteredpixel.shatteredpixeldungeon.scenes

Best Java code snippets using com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene (Showing top 20 results out of 315)

origin: 00-Evan/shattered-pixel-dungeon-gdx

protected void fadeIn( int color, boolean light ) {
  add( new Fader( color, light ) );
}

origin: 00-Evan/shattered-pixel-dungeon

  private float statSlot( Group parent, String label, String value, float pos ) {
    
    RenderedText txt = PixelScene.renderText( label, 7 );
    txt.y = pos;
    parent.add( txt );
    
    txt = PixelScene.renderText( value, 7 );
    txt.x = WIDTH * 0.65f;
    txt.y = pos;
    PixelScene.align(txt);
    parent.add( txt );
    
    return pos + GAP + txt.baseLine();
  }
}
origin: 00-Evan/shattered-pixel-dungeon

public static void chooseFont( float size ) {
  chooseFont( size, defaultZoom );
}
origin: 00-Evan/shattered-pixel-dungeon

@Override
public void create() {
  super.create();
  float top = 16;
  RenderedText title = PixelScene.renderText( Messages.get(this, "title"), 9 );
  title.hardlight(Window.TITLE_COLOR);
  title.x = (w - title.width()) / 2f;
origin: 00-Evan/shattered-pixel-dungeon

public static RenderedTextMultiline renderMultiline( int size ){
  return renderMultiline("", size);
}
origin: 00-Evan/shattered-pixel-dungeon

  @Override
  protected void updateMatrix() {
    float sx = align( this, scroll.x + shakeX );
    float sy = align( this, scroll.y + shakeY );
    
    matrix[0] = +zoom * invW2;
    matrix[5] = -zoom * invH2;
    
    matrix[12] = -1 + x * invW2 - sx * matrix[0];
    matrix[13] = +1 - y * invH2 - sy * matrix[5];
    
  }
}
origin: 00-Evan/shattered-pixel-dungeon

public RedButton( String label, int size ){
  super();
  text = PixelScene.renderText( size );
  text.text( label );
  add( text );
}

origin: 00-Evan/shattered-pixel-dungeon-gdx

  @Override
  public void create() {
    super.create();

    add( new WndStory( Messages.get(this, "text") ) {
      @Override
      public void hide() {
        super.hide();
        Game.switchScene( InterlevelScene.class );
      }
    } );

    fadeIn();
  }
}
origin: 00-Evan/shattered-pixel-dungeon

@Override
public void destroy() {
  Badges.saveGlobal();
  Badges.loadingListener = null;
  super.destroy();
}
origin: 00-Evan/shattered-pixel-dungeon

RenderedText dot = PixelScene.renderText( "-", 6 );
dot.x = MARGIN;
dot.y = pos;
BitmapTextMultiline item = PixelScene.createMultiline( items[i], 6 );
item.x = dot.x + dotWidth;
item.y = pos;
origin: 00-Evan/shattered-pixel-dungeon-gdx

@Override
public void create() {
  super.create();
  RenderedTextMultiline text = PixelScene.renderMultiline(6);
  String message;
  if (previousVersion == 0) {
origin: 00-Evan/shattered-pixel-dungeon

public void reset( float x, float y, String text, int color ) {
  
  revive();
  if (cameraZoom != Camera.main.zoom) {
    cameraZoom = Camera.main.zoom;
    PixelScene.chooseFont( 9, cameraZoom );
    size( 9 * (int)cameraZoom);
    scale.set( 1 /cameraZoom );
  }
  text( text );
  hardlight( color );
  this.x = PixelScene.align( Camera.main, x - width() / 2);
  this.y = PixelScene.align( Camera.main, y - height());
  
  timeLeft = LIFESPAN;
}

origin: 00-Evan/shattered-pixel-dungeon

public static BitmapText createText( float size ) {
  return createText( null, size );
}

origin: 00-Evan/shattered-pixel-dungeon

public static BitmapTextMultiline createMultiline( float size ) {
  return createMultiline( null, size );
}

origin: 00-Evan/shattered-pixel-dungeon

protected void fadeIn() {
  if (noFade) {
    noFade = false;
  } else {
    fadeIn( 0xFF000000, false );
  }
}

origin: 00-Evan/shattered-pixel-dungeon-gdx

@Override
public void create() {
  super.create();
  float top = 16;
  RenderedText title = PixelScene.renderText( Messages.get(this, "title"), 9 );
  title.hardlight(Window.TITLE_COLOR);
  title.x = (w - title.width()) / 2f;
origin: 00-Evan/shattered-pixel-dungeon-gdx

public static RenderedTextMultiline renderMultiline(int size ){
  return renderMultiline("", size);
}
origin: 00-Evan/shattered-pixel-dungeon

@Override
protected void layout() {
  icon.x = x;
  icon.y = y + (height - icon.height) / 2;
  PixelScene.align(icon);
  
  label.x = icon.x + icon.width + 2;
  label.y = y + (height - label.baseLine()) / 2;
  PixelScene.align(label);
}

origin: 00-Evan/shattered-pixel-dungeon

@Override
protected void createChildren() {
  super.createChildren();
  
  btLabel = PixelScene.renderText( 9 );
  add( btLabel );
}

origin: 00-Evan/shattered-pixel-dungeon

  @Override
  public void create() {
    super.create();
    
    add( new WndStory( Messages.get(this, "text") ) {
      @Override
      public void hide() {
        super.hide();
        Game.switchScene( InterlevelScene.class );
      }
    } );
    
    fadeIn();
  }
}
com.shatteredpixel.shatteredpixeldungeon.scenesPixelScene

Most used methods

  • add
  • align
  • chooseFont
  • create
  • createMultiline
  • createText
  • destroy
  • fadeIn
  • renderMultiline
  • renderText
  • showBadge
  • update
  • showBadge,
  • update

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now