v0.3.4: added rendered text to a few more places
This commit is contained in:
committed by
Evan Debenham
parent
e01e408f77
commit
de99b6110f
@@ -20,14 +20,15 @@
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.TomeOfMastery;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HighlightedText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
||||
import com.watabou.noosa.RenderedTextMultiline;
|
||||
|
||||
public class WndChooseWay extends Window {
|
||||
|
||||
@@ -45,7 +46,7 @@ public class WndChooseWay extends Window {
|
||||
titlebar.setRect( 0, 0, WIDTH, 0 );
|
||||
add( titlebar );
|
||||
|
||||
HighlightedText hl = new HighlightedText( 6 );
|
||||
RenderedTextMultiline hl = PixelScene.renderMultiline( 6 );
|
||||
hl.text( way1.desc() + "\n\n" + way2.desc() + "\n\n" + Messages.get(this, "message"), WIDTH );
|
||||
hl.setPos( titlebar.left(), titlebar.bottom() + GAP );
|
||||
add( hl );
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.watabou.noosa.BitmapTextMultiline;
|
||||
import com.watabou.noosa.BitmapText;
|
||||
import com.watabou.noosa.Group;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HighlightedText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.Utils;
|
||||
import com.watabou.noosa.RenderedText;
|
||||
import com.watabou.noosa.RenderedTextMultiline;
|
||||
|
||||
public class WndClass extends WndTabbed {
|
||||
|
||||
@@ -116,19 +116,18 @@ public class WndClass extends WndTabbed {
|
||||
pos += GAP;
|
||||
}
|
||||
|
||||
RenderedText dot = PixelScene.renderText( DOT, 6 );
|
||||
BitmapText dot = PixelScene.createText( DOT, 6 );
|
||||
dot.x = MARGIN;
|
||||
dot.y = pos;
|
||||
if (dotWidth == 0) {
|
||||
dot.measure();
|
||||
dotWidth = dot.width();
|
||||
}
|
||||
add( dot );
|
||||
|
||||
BitmapTextMultiline item = PixelScene.createMultiline( items[i], 6 );
|
||||
item.x = dot.x + dotWidth;
|
||||
item.y = pos;
|
||||
item.maxWidth = (int)(WIDTH - MARGIN * 2 - dotWidth);
|
||||
item.measure();
|
||||
RenderedTextMultiline item = PixelScene.renderMultiline( items[i], 6 );
|
||||
item.maxWidth((int)(WIDTH - MARGIN * 2 - dotWidth));
|
||||
item.setPos(dot.x + dotWidth, pos);
|
||||
add( item );
|
||||
|
||||
pos += item.height();
|
||||
@@ -169,7 +168,7 @@ public class WndClass extends WndTabbed {
|
||||
break;
|
||||
}
|
||||
|
||||
HighlightedText text = new HighlightedText( 6 );
|
||||
RenderedTextMultiline text = PixelScene.renderMultiline( 6 );
|
||||
text.text( message, WIDTH - MARGIN * 2 );
|
||||
text.setPos( MARGIN, MARGIN );
|
||||
add( text );
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HighlightedText;
|
||||
import com.watabou.noosa.BitmapTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
import com.watabou.noosa.RenderedTextMultiline;
|
||||
|
||||
public class WndOptions extends Window {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class WndOptions extends Window {
|
||||
tfTitle.measure();
|
||||
add( tfTitle );
|
||||
|
||||
HighlightedText tfMesage = new HighlightedText( 6 );
|
||||
RenderedTextMultiline tfMesage = PixelScene.renderMultiline( 6 );
|
||||
tfMesage.text(message, width - MARGIN * 2);
|
||||
tfMesage.setPos( MARGIN, tfTitle.y + tfTitle.height() + MARGIN );
|
||||
add( tfMesage );
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HighlightedText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.RenderedTextMultiline;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
||||
|
||||
@@ -47,7 +48,7 @@ public class WndTitledMessage extends Window {
|
||||
titlebar.setRect( 0, 0, width, 0 );
|
||||
add(titlebar);
|
||||
|
||||
HighlightedText text = new HighlightedText( 6 );
|
||||
RenderedTextMultiline text = PixelScene.renderMultiline( 6 );
|
||||
text.text( message, width );
|
||||
text.setPos( titlebar.left(), titlebar.bottom() + GAP );
|
||||
add( text );
|
||||
|
||||
Reference in New Issue
Block a user