2016-01-31 22:19:19 +00:00
|
|
|
/*
|
|
|
|
* Pixel Dungeon
|
|
|
|
* Copyright (C) 2012-2015 Oleg Dolya
|
|
|
|
*
|
|
|
|
* Shattered Pixel Dungeon
|
|
|
|
* Copyright (C) 2014-2015 Evan Debenham
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*/
|
|
|
|
package com.shatteredpixel.shatteredpixeldungeon.scenes;
|
|
|
|
|
|
|
|
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
|
|
|
|
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
2016-02-01 22:27:47 +00:00
|
|
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
2016-01-31 22:19:19 +00:00
|
|
|
import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
|
2016-02-01 09:10:19 +00:00
|
|
|
import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton;
|
2016-01-31 22:19:19 +00:00
|
|
|
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
|
|
|
|
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
|
|
|
|
import com.watabou.noosa.Camera;
|
|
|
|
import com.watabou.noosa.NinePatch;
|
2016-02-01 09:10:19 +00:00
|
|
|
import com.watabou.noosa.RenderedText;
|
2016-01-31 22:19:19 +00:00
|
|
|
import com.watabou.noosa.RenderedTextMultiline;
|
|
|
|
import com.watabou.noosa.ui.Component;
|
|
|
|
|
|
|
|
//TODO: update this class with relevant info as new versions come out.
|
|
|
|
public class ChangesScene extends PixelScene {
|
|
|
|
|
|
|
|
private static final String TXT_Update =
|
|
|
|
"v0.3.3b:\n" +
|
|
|
|
"- Fixed start-crash on android 2.2\n" +
|
|
|
|
"- Fixed various crash bugs\n" +
|
|
|
|
"\n" +
|
|
|
|
"v0.3.3a:\n" +
|
|
|
|
"- Added a small holiday treat ;)\n" +
|
|
|
|
"- Thieves now disappear when they get away\n" +
|
|
|
|
"- Fixed chests not opening with enemies nearby\n" +
|
|
|
|
"- Fixed numerous bugs and crashes\n" +
|
|
|
|
"\n" +
|
|
|
|
"v0.3.3:\n" +
|
|
|
|
"Support for Google Play Games:\n" +
|
|
|
|
"- Badges can now sync across devices\n" +
|
|
|
|
"- Five Google Play Achievements added\n" +
|
|
|
|
"- Rankings sync will come in future\n" +
|
|
|
|
"\n" +
|
|
|
|
"Press the controller button in the main menu to learn more\n" +
|
|
|
|
"\n" +
|
|
|
|
"Shattered remains a 100% offline game if Google Play Games is not enabled\n" +
|
|
|
|
"\n" +
|
|
|
|
"\n" +
|
|
|
|
"Gameplay Changes:\n" +
|
|
|
|
"- Tengu's maze is now different each time\n" +
|
|
|
|
"- Items no longer auto-pickup when enemies are near\n" +
|
|
|
|
"\n" +
|
|
|
|
"Fixes:\n" +
|
|
|
|
"- Fixed several bugs with prison enemies\n" +
|
|
|
|
"- Fixed some landscape window size issues\n" +
|
|
|
|
"- Fixed other minor bugs\n" +
|
|
|
|
"\n" +
|
|
|
|
"Misc:\n" +
|
|
|
|
"- Added support for reverse landscape\n" +
|
|
|
|
"\n" +
|
|
|
|
"There's a lot of behind-the-scenes technical changes in this update, so let me know if you run into any issues!";
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void create() {
|
|
|
|
super.create();
|
|
|
|
|
2016-02-01 09:10:19 +00:00
|
|
|
int w = Camera.main.width;
|
|
|
|
int h = Camera.main.height;
|
2016-01-31 22:19:19 +00:00
|
|
|
|
2016-02-01 22:27:47 +00:00
|
|
|
RenderedText title = PixelScene.renderText( Messages.get(this, "title"), 9 );
|
2016-02-01 09:10:19 +00:00
|
|
|
title.hardlight(Window.TITLE_COLOR);
|
|
|
|
title.x = (w - title.width()) / 2 ;
|
|
|
|
title.y = 4;
|
|
|
|
add(title);
|
2016-01-31 22:19:19 +00:00
|
|
|
|
2016-02-01 09:10:19 +00:00
|
|
|
ExitButton btnExit = new ExitButton();
|
|
|
|
btnExit.setPos( Camera.main.width - btnExit.width(), 0 );
|
|
|
|
add( btnExit );
|
2016-01-31 22:19:19 +00:00
|
|
|
|
2016-02-01 09:10:19 +00:00
|
|
|
RenderedTextMultiline text = renderMultiline(TXT_Update, 6 );
|
2016-01-31 22:19:19 +00:00
|
|
|
|
|
|
|
|
2016-02-01 09:10:19 +00:00
|
|
|
int pw = w - 6;
|
|
|
|
int ph = h - 20;
|
2016-01-31 22:19:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
NinePatch panel = Chrome.get(Chrome.Type.WINDOW);
|
|
|
|
panel.size( pw, ph );
|
|
|
|
panel.x = (w - pw) / 2;
|
2016-02-01 09:10:19 +00:00
|
|
|
panel.y = title.y + title.height() + 2;
|
2016-01-31 22:19:19 +00:00
|
|
|
add( panel );
|
|
|
|
|
|
|
|
ScrollPane list = new ScrollPane( new Component() );
|
|
|
|
add( list );
|
|
|
|
|
|
|
|
Component content = list.content();
|
|
|
|
content.clear();
|
|
|
|
|
|
|
|
text.maxWidth((int) panel.innerWidth());
|
|
|
|
|
|
|
|
content.add(text);
|
|
|
|
|
|
|
|
content.setSize( panel.innerWidth(), text.height() );
|
|
|
|
|
|
|
|
list.setRect(
|
|
|
|
panel.x + panel.marginLeft(),
|
|
|
|
panel.y + panel.marginTop(),
|
|
|
|
panel.innerWidth(),
|
|
|
|
panel.innerHeight());
|
|
|
|
list.scrollTo(0, 0);
|
|
|
|
|
|
|
|
Archs archs = new Archs();
|
|
|
|
archs.setSize( Camera.main.width, Camera.main.height );
|
|
|
|
addToBack( archs );
|
|
|
|
|
|
|
|
fadeIn();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onBackPressed() {
|
2016-02-01 09:10:19 +00:00
|
|
|
ShatteredPixelDungeon.switchNoFade(TitleScene.class);
|
2016-01-31 22:19:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|