package com.badlogic.gdx.ingenuity.test.screen;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.ingenuity.GdxData;
import com.badlogic.gdx.ingenuity.test.GdxR;
import com.badlogic.gdx.ingenuity.utils.GdxUtilities;
import com.badlogic.gdx.ingenuity.utils.scene2d.FilterImage;
import com.badlogic.gdx.ingenuity.utils.scene2d.FilterImage.FilterType;
import com.badlogic.gdx.ingenuity.utils.scene2d.RemoteImage;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup;

/**
 * @作者 Mitkey
 * @时间 2017年3月2日 下午5:14:54
 * @类说明:
 * @版本 xx
 */
public class LoginScreen extends BaseTestScreen {

	RemoteImage image;

	@Override
	public void show() {
		super.show();
		Texture texture = assetManager().getTexture(GdxR.def_badlogic_jpg);

		image = new RemoteImage(texture, "http://img.lanrentuku.com/img/allimg/1605/14647058959840.jpg");
		image.setPosition(250, 256);
		stage().addActor(image);

		stage().addActor(GdxUtilities.center(newNativeLabel("我是登录界面", 30, Color.YELLOW)));

		// 滤镜 image 测试
		VerticalGroup verticalGroup = new VerticalGroup();
		for (FilterType type : FilterType.values()) {
			FilterImage filterImage = new FilterImage(texture);
			filterImage.setType(type);
			filterImage.setRadius(5);
			filterImage.setSigma(5);
			filterImage.setSepiaTone(.5f, .5f, .1f);
			filterImage.invalidate();
			filterImage.validate();
			verticalGroup.addActor(filterImage);
		}
		verticalGroup.pack();
		ScrollPane scrollPane = new ScrollPane(verticalGroup);
		scrollPane.setSize(image.getWidth() + 50, GdxData.HEIGHT);
		scrollPane.setX(GdxData.WIDTH - scrollPane.getWidth());
		stage().addActor(scrollPane);
	}

	@Override
	public void dispose() {
		super.dispose();
		if (image != null) {
			image.dispose();
			image = null;
		}
	}

}

@@ -42,16 +42,45 @@
 creen;%0A%0A
+import com.badlogic.gdx.Gdx;%0A
 import c
@@ -111,16 +111,16 @@
 .Color;%0A
-
 import c
@@ -485,24 +485,130 @@
 emoteImage;%0A
+import com.badlogic.gdx.scenes.scene2d.ui.List;%0Aimport com.badlogic.gdx.scenes.scene2d.ui.List.ListStyle;%0A
 import com.b
@@ -707,16 +707,58 @@
 Group;%0A%0A
+import net.mwplay.nativefont.NativeFont;%0A%0A
 /**%0A * @
@@ -1858,16 +1858,16 @@
 dth());%0A
-
 %09%09stage(
@@ -1889,16 +1889,1082 @@
 llPane);
+%0A%0A%09%09List%3CString%3E list = new List%3CString%3E(new ListStyle(newNativeFont(25), Color.RED, Color.BLACK, dabDown)) %7B%0A%09%09%09@Override%0A%09%09%09public void setItems(String... newItems) %7B%0A%09%09%09%09super.setItems(newItems);%0A%09%09%09%09NativeFont font = (NativeFont) getStyle().font;%0A%09%09%09%09StringBuffer characters = new StringBuffer();%0A%09%09%09%09for (String string : newItems) %7B%0A%09%09%09%09%09characters.append(string);%0A%09%09%09%09%7D%0A%09%09%09%09font.appendText(characters.toString());%0A%09%09%09%7D%0A%09%09%7D;%0A%09%09list.setItems(%22Gdx.files.getLocalStoragePath --%3E%22 + Gdx.files.getLocalStoragePath(), //%0A%09%09%09%09%22Gdx.files.getExternalStoragePath --%3E%22 + Gdx.files.getExternalStoragePath(), //%0A%09%09%09%09%22Gdx.files.local --%3E%22 + Gdx.files.local(%22local%22).toString(), //%0A%09%09%09%09%22Gdx.files.absolute --%3E%22 + Gdx.files.absolute(%22absolute%22).toString(), //%0A%09%09%09%09%22Gdx.files.classpath --%3E%22 + Gdx.files.classpath(%22classpath%22).toString(), //%0A%09%09%09%09%22Gdx.files.external --%3E%22 + Gdx.files.external(%22external%22).toString(), //%0A%09%09%09%09%22Gdx.files.internal --%3E%22 + Gdx.files.internal(%22internal%22).toString());%0A%09%09list.layout();%0A%09%09list.pack();%0A%09%09list.setPosition(20, 20);%0A%09%09stage().addActor(list);
 %0A%09%7D%0A%0A%09@O

update test/core/src/com/badlogic/gdx/ingenuity/test/screen/LoginScreen.java