private static RectF rect(Image icon, int x, int y, int w, int h ) { return icon.texture.uvRect( x, y, x + w, y + h); } }
public void add( Object id, int left, int top, int right, int bottom){ frames.put( id, texture.uvRect(left, top, right, bottom)); }
public void add( Object id, int left, int top, int right, int bottom){ frames.put( id, texture.uvRect(left, top, right, bottom)); }
public Image( Object tx, int left, int top, int width, int height ) { this( tx ); frame( texture.uvRect( left, top, left + width, top + height ) ); }
public Image( Object tx, int left, int top, int width, int height ) { this( tx ); frame( texture.uvRect( left, top, left + width, top + height ) ); }
public void frame( int left, int top, int width, int height ) { frame( texture.uvRect( left, top, left + width, top + height ) ); }
public Image( Object tx, int left, int top, int width, int height ) { this( tx ); frame( texture.uvRect( left, top, left + width, top + height ) ); }
public void frame( int left, int top, int width, int height ) { frame( texture.uvRect( left, top, left + width, top + height ) ); }
public void frame( int left, int top, int width, int height ) { frame( texture.uvRect( left, top, left + width, top + height ) ); }
public static Image get( Type type ) { Image icon = new Image( Assets.BANNERS ); switch (type) { case PIXEL_DUNGEON: icon.frame( icon.texture.uvRect( 0, 0, 132, 90 ) ); break; case BOSS_SLAIN: icon.frame( icon.texture.uvRect( 0, 90, 128, 125 ) ); break; case GAME_OVER: icon.frame( icon.texture.uvRect( 0, 125, 128, 160 ) ); break; case SELECT_YOUR_HERO: icon.frame( icon.texture.uvRect( 0, 160, 128, 181 ) ); break; case PIXEL_DUNGEON_SIGNS: icon.frame( icon.texture.uvRect( 133, 0, 255, 90 ) ); break; } return icon; } }
public static Image get( Type type ) { Image icon = new Image( Assets.BANNERS ); switch (type) { case PIXEL_DUNGEON: icon.frame( icon.texture.uvRect( 0, 0, 132, 90 ) ); break; case BOSS_SLAIN: icon.frame( icon.texture.uvRect( 0, 90, 128, 125 ) ); break; case GAME_OVER: icon.frame( icon.texture.uvRect( 0, 125, 128, 160 ) ); break; case SELECT_YOUR_HERO: icon.frame( icon.texture.uvRect( 0, 160, 128, 181 ) ); break; case PIXEL_DUNGEON_SIGNS: icon.frame( icon.texture.uvRect( 133, 0, 255, 90 ) ); break; } return icon; } }
public NinePatch( Object tx, int x, int y, int w, int h, int left, int top, int right, int bottom ) { super( 0, 0, 0, 0 ); texture = TextureCache.get( tx ); w = w == 0 ? texture.width : w; h = h == 0 ? texture.height : h; nWidth = width = w; nHeight = height = h; vertices = new float[16]; quads = Quad.createSet( 9 ); marginLeft = left; marginRight = right; marginTop = top; marginBottom= bottom; outterF = texture.uvRect( x, y, x + w, y + h ); innerF = texture.uvRect( x + left, y + top, x + w - right, y + h - bottom ); updateVertices(); }
public NinePatch( Object tx, int x, int y, int w, int h, int left, int top, int right, int bottom ) { super( 0, 0, 0, 0 ); texture = TextureCache.get( tx ); w = w == 0 ? texture.width : w; h = h == 0 ? texture.height : h; nWidth = width = w; nHeight = height = h; vertices = new float[16]; quads = Quad.createSet( 9 ); marginLeft = left; marginRight = right; marginTop = top; marginBottom= bottom; outterF = texture.uvRect( x, y, x + w, y + h ); innerF = texture.uvRect( x + left, y + top, x + w - right, y + h - bottom ); updateVertices(); }
public NinePatch( Object tx, int x, int y, int w, int h, int left, int top, int right, int bottom ) { super( 0, 0, 0, 0 ); texture = TextureCache.get( tx ); w = w == 0 ? texture.width : w; h = h == 0 ? texture.height : h; nWidth = width = w; nHeight = height = h; vertices = new float[16]; verticesBuffer = Quad.createSet( 9 ); marginLeft = left; marginRight = right; marginTop = top; marginBottom= bottom; outterF = texture.uvRect( x, y, x + w, y + h ); innerF = texture.uvRect( x + left, y + top, x + w - right, y + h - bottom ); updateVertices(); }
public DashboardItem( String text, int index ) { super(); image.frame( image.texture.uvRect( index * IMAGE_SIZE, 0, (index + 1) * IMAGE_SIZE, IMAGE_SIZE ) ); this.label.text( text ); setSize( SIZE, SIZE ); }
public DashboardItem( String text, int index ) { super(); image.frame( image.texture.uvRect( index * IMAGE_SIZE, 0, (index + 1) * IMAGE_SIZE, IMAGE_SIZE ) ); this.label.text( text ); setSize( SIZE, SIZE ); }
public DashboardItem( String text, int index ) { super(); image.frame( image.texture.uvRect( index * IMAGE_SIZE, 0, (index + 1) * IMAGE_SIZE, IMAGE_SIZE ) ); this.label.text( text ); this.label.measure(); setSize( SIZE, SIZE ); }
public static Image avatar( HeroClass cl, int armorTier ) { RectF patch = tiers().get( armorTier ); Image avatar = new Image( cl.spritesheet() ); RectF frame = avatar.texture.uvRect( 1, 0, FRAME_WIDTH, FRAME_HEIGHT ); frame.shift( patch.left, patch.top ); avatar.frame( frame ); return avatar; } }
public static Image avatar( HeroClass cl, int armorTier ) { RectF patch = tiers().get( armorTier ); Image avatar = new Image( cl.spritesheet() ); RectF frame = avatar.texture.uvRect( 1, 0, FRAME_WIDTH, FRAME_HEIGHT ); frame.shift( patch.left, patch.top ); avatar.frame( frame ); return avatar; } }
public static Image avatar( HeroClass cl, int armorTier ) { RectF patch = tiers().get( armorTier ); Image avatar = new Image( cl.spritesheet() ); RectF frame = avatar.texture.uvRect( 1, 0, FRAME_WIDTH, FRAME_HEIGHT ); frame.offset( patch.left, patch.top ); avatar.frame( frame ); return avatar; } }