@@ -29,7 +29,7 @@ public class SLData implements Serializable{
public String gameDate;
public String heroName;
public static void generate(final int id,int i, final Stage stage, final HoverView sv) {
final Image im=Res.get(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"savebl.png").position(i>1?44+(i-2)*483:44+i*483, i>1?270:114);
final Image im=Res.get(Setting.IMAGE_MENU_SYSTEM+"savebl.png").position(i>1?44+(i-2)*483:44+i*483, i>1?270:114);
im.setUserObject(new exMask());
stage.addActor(im);
SLData slData = null;
@@ -54,10 +54,10 @@ public void run() {
((TextButton) e).click();
}
});
String fileName = Setting.GAME_PERSISTENCE+(id+"_sld.dat");
String fileName = Setting.PERSISTENCE+(id+"_sld.dat");
if(!Gdx.files.local(fileName).exists()){
slData = new SLData();
String path=Setting.GAME_RES_IMAGE_MENU_SYSTEM+"ea.png";
String path=Setting.IMAGE_MENU_SYSTEM+"ea.png";
slData.thumbnail=Res.get(path);
stage.addActor(new Label("空位置",26).userObj(new Object()).setWidth(1000).setPos(i>1?324+(i-2)*483:324+i*483, i>1?347:191));
}else{
@@ -74,7 +74,7 @@ public void run() {
slData.thumbnail.setUserObject(new Object());
slData.thumbnail.setSize(207,112);
stage.addActor(slData.thumbnail.position(i>1?54+(i-2)*483:54+i*483, i>1?277:121));
stage.addActor(Res.get(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"/saveno.png").position(i>1?54+(i-2)*483:54+i*483, i>1?277:121));
stage.addActor(Res.get(Setting.IMAGE_MENU_SYSTEM+"/saveno.png").position(i>1?54+(i-2)*483:54+i*483, i>1?277:121));
stage.addActor(new Label(id+"",14).userObj(new Object()).setWidth(1000).setPad(-5).setPos(0, i>1?295:139).setAlignX(i>1?83+(i-2)*483:83+i*483));
}

@@ -20,11 +20,11 @@ public abstract class Item implements Serializable {
protected int icon=0;

public String getIcon(){
return Setting.GAME_RES_IMAGE_ICONS+"i"+icon+".png";
return Setting.IMAGE_ICONS+"i"+icon+".png";
}

public static String getNormalIcon(){
return Setting.GAME_RES_IMAGE_ICONS+"i0.png";
return Setting.IMAGE_ICONS+"i0.png";
}

public boolean use(){
@@ -1,14 +1,14 @@
package com.rpsg.rpg.object.base.items;

import com.rpsg.rpg.core.RPG;
import com.rpsg.rpg.system.ui.Image;
import com.rpsg.rpg.utils.display.AlertUtil;
import com.rpsg.rpg.utils.game.ItemUtil;

public abstract class UseAbleItem extends Item{
private static final long serialVersionUID = 1L;

public boolean throwSelf(String msg,Image type){
AlertUtil.add(msg,type);
RPG.putMessage(msg,type);
return !(ItemUtil.throwItem(getClass().getSuperclass().getSimpleName().toLowerCase(), this));
}
}
@@ -12,7 +12,7 @@

public class Balloon extends Actor implements Serializable{
private static final long serialVersionUID = 1L;
static final String BALLOON=Setting.GAME_RES_MESSAGE+"balloon.png";
static final String BALLOON=Setting.MESSAGE+"balloon.png";
static final int ICON_SIZE=32,ANIMATION_SIZE=7,ANIMATION_SPEED=10;

Image[] balloons=new Image[ANIMATION_SIZE];
@@ -26,7 +26,7 @@ public abstract class Hero extends RPGObject {
public static final int TRUE=1;
public static final int FALSE=0;

public static final String RES_PATH=Setting.GAME_RES_WALK+"heros/";
public static final String RES_PATH=Setting.WALK+"heros/";

public String name;
public String jname;
@@ -15,7 +15,7 @@ public abstract class NPC extends RPGObject{

private static final long serialVersionUID = -3609365853239176493L;

public static final String RES_PATH=Setting.GAME_RES_WALK+"npcs/";
public static final String RES_PATH=Setting.WALK+"npcs/";

public abstract void toCollide(ScriptCollide sc);
public transient Map<CollideType, Class<? extends Script>> scripts=new HashMap<CollideType, Class<? extends Script>>();
@@ -7,6 +7,7 @@
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.rpsg.gdxQuery.$;
import com.rpsg.gdxQuery.GdxQuery;
import com.rpsg.rpg.core.RPG;
import com.rpsg.rpg.core.Setting;
import com.rpsg.rpg.io.Music;
import com.rpsg.rpg.object.base.FGType;
@@ -19,7 +20,6 @@
import com.rpsg.rpg.system.controller.MoveController;
import com.rpsg.rpg.utils.display.ColorUtil;
import com.rpsg.rpg.utils.display.FG;
import com.rpsg.rpg.utils.display.Msg;
import com.rpsg.rpg.utils.display.PostUtil;
import com.rpsg.rpg.utils.display.SelectUtil;
import com.rpsg.rpg.utils.display.WeatherUtil;
@@ -128,7 +128,7 @@ public void run(){
* @return
*/
public BaseScriptExecutor say(String str,String title,int size){
return Msg.say(this, str, title, size);
return RPG.ctrl.msg.say(this, str, title, size);
}

/**
@@ -138,7 +138,7 @@ public BaseScriptExecutor say(String str,String title,int size){
* @return
*/
public BaseScriptExecutor say(String str,String title){
return Msg.say(this, str, title, 22);
return RPG.ctrl.msg.say(this, str, title, 22);
}

/**
@@ -183,7 +183,7 @@ public BaseScriptExecutor showMenu(boolean flag){
* @return
*/
public BaseScriptExecutor say(String str){
return Msg.say(this, str, "", 22);
return RPG.ctrl.msg.say(this, str, "", 22);
}

/**
@@ -192,7 +192,7 @@ public BaseScriptExecutor say(String str){
* @return
*/
public BaseScriptExecutor setKeyLocker(boolean b){
return Msg.setKeyLocker(this, b);
return RPG.ctrl.msg.setKeyLocker(this, b);
}

/**
@@ -302,7 +302,7 @@ public BaseScriptExecutor changeSelf(Class<? extends Script> script){
* @return
*/
public BaseScriptExecutor showMSG(String msgType){
return Msg.show(this, msgType);
return RPG.ctrl.msg.show(this, msgType);
}

/**
@@ -325,15 +325,15 @@ public BaseScriptExecutor setSEVolume(float time,float volume){
* @return
*/
public BaseScriptExecutor showMSG(){
return Msg.show(this, 正常);
return RPG.ctrl.msg.show(this, 正常);
}

/**
* 隐藏对话框
* @return
*/
public BaseScriptExecutor hideMSG(){
return Msg.hide(this);
return RPG.ctrl.msg.hide(this);
}

/**
@@ -342,15 +342,15 @@ public BaseScriptExecutor hideMSG(){
* @return
*/
public BaseScriptExecutor hideFG(int position){
return FG.hide(this, position);
return RPG.ctrl.fg.hide(this, position);
}

/**
* 隐藏全部当前屏幕上的立绘
* @return
*/
public BaseScriptExecutor hideFG(){
return FG.hideAll(this);
return RPG.ctrl.fg.hideAll(this);
}

/**
@@ -360,7 +360,7 @@ public BaseScriptExecutor hideFG(){
* @return
*/
public BaseScriptExecutor showFGLeft(String people,String look){
return FG.show(this, Setting.GAME_RES_IMAGE_FG+people+look+".png", FG.LEFT);
return RPG.ctrl.fg.show(this, Setting.IMAGE_FG+people+look+".png", RPG.ctrl.fg.LEFT);
}

/**
@@ -370,7 +370,7 @@ public BaseScriptExecutor showFGLeft(String people,String look){
* @return
*/
public BaseScriptExecutor showFGRight(String people,String look){
return FG.show(this, Setting.GAME_RES_IMAGE_FG+people+look+".png", FG.RIGHT);
return RPG.ctrl.fg.show(this, Setting.IMAGE_FG+people+look+".png", RPG.ctrl.fg.RIGHT);
}

/**
@@ -485,7 +485,7 @@ public BaseScriptExecutor randomWalkBySelf(int speed,int length){
* @return
*/
public BaseScriptExecutor setWeather(int type){
return WeatherUtil.setWeather(this, type);
return RPG.ctrl.weather.setWeather(this, type);
}

/**
@@ -1,17 +1,14 @@
package com.rpsg.rpg.system.base;

import com.rpsg.rpg.core.RPG;
import com.rpsg.rpg.utils.display.FG;
import com.rpsg.rpg.utils.display.Msg;
import com.rpsg.rpg.view.GameView;
import com.rpsg.rpg.view.GameViews;

public class Initialization {
public static void init(GameView gv){
ThreadPool.init();
RPG.maps.loader.load(gv);
Msg.init();
FG.init();
RPG.ctrl.fg.init();
// RadarUtil.init(100,new TextureRegion(new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_LOGO+"bg.png"))),200);
// RadarUtil.show(new int[]{55,30,30,30,30},50,100,100);
}
@@ -34,7 +34,7 @@ public static void logic(){

private static void generateTempTexture() {
if(NO_TEXTURE==null )
NO_TEXTURE=new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_GLOBAL+"noTexture.png"));
NO_TEXTURE=new Texture(Gdx.files.internal(Setting.IMAGE_GLOBAL+"noTexture.png"));
}

public static Drawable getDrawable(String resPath) {
@@ -22,7 +22,7 @@ public Distant(Object disName){
TiledMapTileLayer layer=(TiledMapTileLayer)RPG.maps.loader.layer.get(0);
float width=(layer.getWidth()*layer.getTileWidth());
float height=(layer.getHeight()*layer.getTileHeight());
distant=Res.get(Setting.GAME_RES_IMAGE_BACKGROUND+disName);
distant=Res.get(Setting.IMAGE_BACKGROUND+disName);
distant.setWidth(w=(width+GameUtil.screen_width));
distant.setHeight(h=height+GameUtil.screen_height);
distant.setScale(bgScale);
@@ -2,18 +2,16 @@

import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.rpsg.rpg.core.RPG;
import com.rpsg.rpg.utils.display.FG;
import com.rpsg.rpg.utils.display.Msg;

public class DrawController {

public void draw(){
SpriteBatch batch= (SpriteBatch) FG.stage.getBatch();
FG.stage.draw();
SpriteBatch batch= (SpriteBatch) RPG.ctrl.fg.stage.getBatch();
RPG.ctrl.fg.stage.draw();
batch.begin();
RPG.ctrl.cg.draw(batch);
FG.draw(batch);
Msg.draw(batch);
RPG.ctrl.fg.draw(batch);
RPG.ctrl.msg.draw(batch);
batch.end();
}
}
@@ -208,23 +208,23 @@ public void draw (Batch batch, float parentAlpha) {
int offset=0;
if(item instanceof Equipment){
if(!((Equipment)item).throwable){
Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"throwable.png").draw(batch, x+width-61+offset, y+itemY - itemHeight+4+padTop, 61, 17);
Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"throwable.png").draw(batch, x+width-61+offset, y+itemY - itemHeight+4+padTop, 61, 17);
offset=-70;
}
if(((Equipment)item).onlyFor!=null){
Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"only.png").draw(batch, x+width-61+offset, y+itemY - itemHeight+4+padTop, 61, 17);
Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"only.png").draw(batch, x+width-61+offset, y+itemY - itemHeight+4+padTop, 61, 17);
offset=-70;
}
Equipment e=(Equipment)item;
if(e.equipType!=null && offsetX2!=0){
if(e.equipType.equals(Equipment.EQUIP_CLOTHES))
batch.draw(Res.getTexture(Setting.GAME_RES_IMAGE_ICONS+"armor.png"),x+28, y+itemY - itemHeight+5+padTop);
batch.draw(Res.getTexture(Setting.IMAGE_ICONS+"armor.png"),x+28, y+itemY - itemHeight+5+padTop);
if(e.equipType.equals(Equipment.EQUIP_SHOES))
batch.draw(Res.getTexture(Setting.GAME_RES_IMAGE_ICONS+"shoes.png"),x+28, y+itemY - itemHeight+5+padTop);
batch.draw(Res.getTexture(Setting.IMAGE_ICONS+"shoes.png"),x+28, y+itemY - itemHeight+5+padTop);
if(e.equipType.equals(Equipment.EQUIP_WEAPON))
batch.draw(Res.getTexture(Setting.GAME_RES_IMAGE_ICONS+"sword.png"),x+28, y+itemY - itemHeight+5+padTop);
batch.draw(Res.getTexture(Setting.IMAGE_ICONS+"sword.png"),x+28, y+itemY - itemHeight+5+padTop);
if(e.equipType.equals(Equipment.EQUIP_ORNAMENT1) || e.equipType.equals(Equipment.EQUIP_ORNAMENT2))
batch.draw(Res.getTexture(Setting.GAME_RES_IMAGE_ICONS+"accessory.png"),x+28, y+itemY - itemHeight+5+padTop);
batch.draw(Res.getTexture(Setting.IMAGE_ICONS+"accessory.png"),x+28, y+itemY - itemHeight+5+padTop);
}
}
if(item instanceof ListItem){
@@ -24,7 +24,7 @@ public MenuHeroBox(Hero hero) {
actors.add(new Label(hero.prop.get("level")+"",18).color(0, 0, 0, 1).align(25).setXOffset(true).setPos(4, 15).setPad(-5));
actors.add($.add(Res.get(Setting.UI_BASE_IMG)).setSize(0,4).setY(-4).setColor(hero.prop.get("dead").equals(Hero.TRUE)?Color.valueOf("424242"):HPColor).addAction(Actions.sizeTo((float)hero.prop.get("hp")/(float)hero.prop.get("maxhp")*70, 4,0.8f,Interpolation.pow4)).getItem());
actors.add($.add(Res.get(Setting.UI_BASE_IMG)).setSize(0,4).setY(-8).setColor(hero.prop.get("dead").equals(Hero.TRUE)?Color.valueOf("505050"):MPColor).addAction(Actions.sizeTo((float)hero.prop.get("mp")/(float)hero.prop.get("maxmp")*70, 4,0.8f,Interpolation.pow4)).getItem());
actors.add(select=(Image) $.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"hero_select.png").disableTouch()).setPosition(-3, -10).addAction(Actions.repeat(RepeatAction.FOREVER, Actions.sequence(Actions.color(Color.WHITE, 0.5f), Actions.color(new Color(1, 1, 1, 0.5f), 0.5f)))).getItem());
actors.add(select=(Image) $.add(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"hero_select.png").disableTouch()).setPosition(-3, -10).addAction(Actions.repeat(RepeatAction.FOREVER, Actions.sequence(Actions.color(Color.WHITE, 0.5f), Actions.color(new Color(1, 1, 1, 0.5f), 0.5f)))).getItem());
}

public MenuHeroBox setSelect(boolean b){
@@ -3,14 +3,12 @@
import java.util.ArrayList;
import java.util.List;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.NinePatch;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.rpsg.rpg.core.Setting;
import com.rpsg.rpg.object.base.Alert;
import com.rpsg.rpg.system.ui.Image;
import com.rpsg.rpg.utils.game.GameUtil;
import com.rpsg.rpg.utils.game.Logger;

public class AlertUtil {
@@ -19,27 +17,25 @@ public class AlertUtil {

public static NinePatch box;

public static List<Alert> list=new ArrayList<Alert>();
public List<Alert> list=new ArrayList<Alert>();

static int oyc;

public static void init(){
Yellow=new Image(Setting.GAME_RES_IMAGE_GLOBAL+"t.png");
Green=new Image(Setting.GAME_RES_IMAGE_GLOBAL+"o.png");
Red=new Image(Setting.GAME_RES_IMAGE_GLOBAL+"x.png");
box=processNinePatchFile(Setting.GAME_RES_IMAGE_GLOBAL+"box.9.png");
public AlertUtil() {
Yellow=new Image(Setting.IMAGE_GLOBAL+"t.png");
Green=new Image(Setting.IMAGE_GLOBAL+"o.png");
Red=new Image(Setting.IMAGE_GLOBAL+"x.png");
box=GameUtil.processNinePatchFile(Setting.IMAGE_GLOBAL+"box.9.png");
Logger.info("提示模块载入完成。");
}

public static void add(String alert,Image type){
public void add(String alert,Image type){
list.add(new Alert(new Image(type), alert));
}

public static void add(String alert,Image type,int fontsize){
public void add(String alert,Image type,int fontsize){
list.add(new Alert(new Image(type), alert, fontsize));
}

public static void draw(SpriteBatch sb){
public void draw(SpriteBatch sb){
List<Alert> removeList=new ArrayList<>();
for (Alert a:list)
if(a.dispose)
@@ -51,11 +47,4 @@ public static void draw(SpriteBatch sb){
sb.setColor(1,1,1,1);
}

public static NinePatch processNinePatchFile(String fname) {
final Texture t = new Texture(Gdx.files.internal(fname));
final int width = t.getWidth() - 2;
final int height = t.getHeight() - 2;
return new NinePatch(new TextureRegion(t, 1, 1, width, height), 12, 12, 12, 12);
}

}

This file was deleted.

This file was deleted.

@@ -16,23 +16,23 @@


public class FG {
static Image currentImageL;
static Image currentImageR;
Image currentImageL;
Image currentImageR;

public static final int LEFT=0;
public static final int RIGHT=1;

static boolean leftFade=true;
static boolean rightFade=true;
public static Stage stage;

public static void init(){
boolean leftFade=true;
boolean rightFade=true;
public Stage stage;
public void init() {
stage=new Stage(new ScalingViewport(Scaling.stretch, GameUtil.screen_width, GameUtil.screen_height, new OrthographicCamera()),GameViews.gameview.stage.getBatch());
currentImageL=currentImageR=null;
Logger.info("立绘控制器初始化完成。");
}

public static BaseScriptExecutor show(final Script script,final String imgPath,final int position){
public BaseScriptExecutor show(final Script script,final String imgPath,final int position){
return script.$((BaseScriptExecutor) new BaseScriptExecutor() {
@Override
public void init() {
@@ -59,7 +59,7 @@ public void init() {
});
}

public static BaseScriptExecutor hide(final Script script,final String imgPath,final int position){
public BaseScriptExecutor hide(final Script script,final String imgPath,final int position){
return script.$((BaseScriptExecutor) new BaseScriptExecutor() {
@Override
public void init() {
@@ -71,7 +71,7 @@ public void init() {
});
}

public static BaseScriptExecutor hideAll(final Script script){
public BaseScriptExecutor hideAll(final Script script){
return script.$((BaseScriptExecutor) new BaseScriptExecutor() {
@Override
public void init() {
@@ -81,7 +81,7 @@ public void init() {
});
}

public static BaseScriptExecutor hide(final Script script,final int position){
public BaseScriptExecutor hide(final Script script,final int position){
return script.$((BaseScriptExecutor) new BaseScriptExecutor() {
@Override
public void init() {
@@ -93,7 +93,7 @@ public void init() {
});
}

public static void draw(SpriteBatch sb){
public void draw(SpriteBatch sb){
sb.end();
sb.begin();
if(currentImageL!=null){
@@ -17,7 +17,7 @@
public class FontUtil {
public static final FreeTypeFontGenerator generator;
static{
generator=new FreeTypeFontGenerator(Gdx.files.internal(Setting.GAME_RES_PATH+"font/xyj.ttf"));
generator=new FreeTypeFontGenerator(Gdx.files.internal(Setting.BASE_PATH+"font/xyj.ttf"));
}

private static BitmapFont getBitFont(int fontsize,char str){
@@ -4,6 +4,7 @@
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.rpsg.rpg.core.RPG;
import com.rpsg.rpg.core.Setting;
import com.rpsg.rpg.io.Input;
import com.rpsg.rpg.object.base.IOMode;
@@ -18,18 +19,16 @@


public class Msg {
public static Image msgbox;
public Image msgbox;

public static void dispose(){
public void dispose(){
if(msgbox!=null){
msgbox.dispose();
msgbox=null;
}
}

public static void init(){
dispose();
msgbox=new Image(Setting.GAME_RES_MESSAGE+MsgType.正常);
public Msg() {
msgbox=new Image(Setting.MESSAGE+MsgType.正常);
float ss=msgbox.getWidth();
msgbox.setWidth(GameUtil.screen_width-40);
ss=ss/msgbox.getWidth();
@@ -45,17 +44,17 @@ public static void init(){
Logger.info("文本模块初始化完成。");
}

static String currentText="";
static int currentTextPoint=0;
static int TEXT_DISPLAY_SPEED=30;
private static int DISPLAY_OFFSET=0;
static boolean show=false;
static boolean firstZPress=false;
static Color titleColor=Color.WHITE;
public static BaseScriptExecutor say(final Script script,final String str,final String title,final int size){
String currentText="";
int currentTextPoint=0;
int TEXT_DISPLAY_SPEED=30;
private int DISPLAY_OFFSET=0;
boolean show=false;
boolean firstZPress=false;
Color titleColor=Color.WHITE;
public BaseScriptExecutor say(final Script script,final String str,final String title,final int size){
firstZPress=false;
return script.$(new ScriptExecutor(script) {
SpriteBatch batch= (SpriteBatch) FG.stage.getBatch();
SpriteBatch batch= (SpriteBatch) RPG.ctrl.fg.stage.getBatch();
public void step() {
if(Input.isPress(Keys.CONTROL_LEFT)){
if(currentTextPoint<=currentText.length()-5)
@@ -88,7 +87,7 @@ public void init() {
});
}

public static BaseScriptExecutor setKeyLocker(Script script,final boolean flag){
public BaseScriptExecutor setKeyLocker(Script script,final boolean flag){
return script.$(new BaseScriptExecutor() {
@Override
public void init() {
@@ -97,24 +96,24 @@ public void init() {
});
}

private static int getOrPosX(String txt,int size){
private int getOrPosX(String txt,int size){
int o=(200/2-FontUtil.getTextWidth(txt, size, Setting.STRING_PADDING_LR)/2);
return 20+o;
}

public static BaseScriptExecutor show(Script script,final String msgType){
public BaseScriptExecutor show(Script script,final String msgType){
return script.$(new BaseScriptExecutor() {
@Override
public void init() {
show = true;
final Image i = Res.getNP(Setting.GAME_RES_MESSAGE + msgType);
final Image i = Res.getNP(Setting.MESSAGE + msgType);
msgbox.setDrawable(i.getDrawable());
titleColor=getColor(msgType);
}
});
}

public static BaseScriptExecutor hide(Script script){
public BaseScriptExecutor hide(Script script){
return script.$(new BaseScriptExecutor() {
@Override
public void init() {
@@ -123,8 +122,8 @@ public void init() {
});
}

public static void draw(SpriteBatch sb){
SpriteBatch batch= (SpriteBatch) FG.stage.getBatch();
public void draw(SpriteBatch sb){
SpriteBatch batch= (SpriteBatch) RPG.ctrl.fg.stage.getBatch();
if(show)
if(msgbox.getColor().a<1)
msgbox.setColor(1,1,1,msgbox.getColor().a+=0.1f);
@@ -137,7 +136,7 @@ public static void draw(SpriteBatch sb){
}
}

public static Color getColor(String mt){
public Color getColor(String mt){
switch(mt){
case MsgType.紫:case MsgType.妖梦:case MsgType.梅莉:
return Color.BLACK;
@@ -1,21 +1,22 @@
package com.rpsg.rpg.utils.display;

import com.rpsg.rpg.core.RPG;
import com.rpsg.rpg.core.Setting;
import com.rpsg.rpg.system.ui.Image;

public class NumberUtil {
public static Image[] throwimg=new Image[10];
static{
for(int i=0;i<throwimg.length;i++){
throwimg[i]=new Image(Setting.GAME_RES_IMAGE_NUMBER+i+".png");
throwimg[i]=new Image(Setting.IMAGE_NUMBER+i+".png");
}
}

public static Image get(int num){
try{
return throwimg[num];
}catch(Exception e){
AlertUtil.add(e.getMessage(), AlertUtil.Red);
RPG.putMessage(e.getMessage(), AlertUtil.Red);
return null;
}
}
@@ -44,15 +44,15 @@ public static void init(){
first=false;
stage=new Stage(new ScalingViewport(Scaling.stretch, 1024, 576, new OrthographicCamera()),GameViews.gameview.stage.getBatch());

others=$.add($.add(new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"menu.png"),Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"menu_active.png")).pos(GameUtil.screen_width-65, 15).onClick(new Runnable() {public void run() {
others=$.add($.add(new ImageButton(Res.getDrawable(Setting.IMAGE_GLOBAL+"menu.png"),Res.getDrawable(Setting.IMAGE_GLOBAL+"menu_active.png")).pos(GameUtil.screen_width-65, 15).onClick(new Runnable() {public void run() {
GameViews.gameview.onkeyDown(Keys.ESCAPE);
}})).appendTo(stage).setUserObject("menu"));
TouchpadStyle tstyle=new TouchpadStyle();
tstyle.background=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"pad_bg.png");
tstyle.background=Res.getDrawable(Setting.IMAGE_GLOBAL+"pad_bg.png");
System.out.println(tstyle.background.getMinWidth());
tstyle.knob=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"pad_knob.png");
tstyle.knob=Res.getDrawable(Setting.IMAGE_GLOBAL+"pad_knob.png");
others.add($.add(pad=new Touchpad(0, tstyle)).setPosition(35, 25).setVisible(!GameUtil.isDesktop));
others.add($.add(new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"button_a.png"), Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"button_a_p.png"))).setPosition(830, 65).setVisible(!GameUtil.isDesktop).addListener(new InputListener(){
others.add($.add(new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_NEW_GLOBAL+"button_a.png"), Res.getDrawable(Setting.IMAGE_MENU_NEW_GLOBAL+"button_a_p.png"))).setPosition(830, 65).setVisible(!GameUtil.isDesktop).addListener(new InputListener(){
public void touchUp (InputEvent event, float x, float y, int pointer, int b) {
VZPress=false;
}
@@ -26,10 +26,10 @@ public class SelectUtil implements InputProcessor {
Stage stage;
ImageButtonStyle style;
public SelectUtil(){
but=new Image(Setting.GAME_RES_IMAGE_GLOBAL+"option.png");
hover=new Image(Setting.GAME_RES_IMAGE_GLOBAL+"optionhover.png");
click=new Image(Setting.GAME_RES_IMAGE_GLOBAL+"optionclick.png");
mask=new Image(Setting.GAME_RES_IMAGE_GLOBAL+"selmask.png");
but=new Image(Setting.IMAGE_GLOBAL+"option.png");
hover=new Image(Setting.IMAGE_GLOBAL+"optionhover.png");
click=new Image(Setting.IMAGE_GLOBAL+"optionclick.png");
mask=new Image(Setting.IMAGE_GLOBAL+"selmask.png");
style=new ImageButtonStyle();
style.over=hover.getDrawable();
style.down=click.getDrawable();
@@ -13,13 +13,13 @@
public class WeatherUtil {
public static int WEATHER_NO=0;
public static int WEATHER_RAIN=1;
public static int type;
public int type;

public static float baseSaturation,bloomIntesity,bloomSaturation,threshold;
public float baseSaturation,bloomIntesity,bloomSaturation,threshold;

private static ParticleEffect eff;
private ParticleEffect eff;

public static String getName(){
public String getName(){
if(type==WEATHER_NO)
return "晴";
if(type==WEATHER_RAIN)
@@ -28,21 +28,21 @@ public static String getName(){
return "数据异常";
}

public static void init(int type){
WeatherUtil.type=type;
public void init(int type){
this.type=type;
RPG.global.weather=type;
if(eff!=null)
eff.dispose();
if(type==WEATHER_RAIN){
eff=new ParticleEffect();
eff.load(Gdx.files.internal(Setting.GAME_RES_PARTICLE+"rainp.p"),Gdx.files.internal(Setting.GAME_RES_PARTICLE));
eff.load(Gdx.files.internal(Setting.PARTICLE+"rainp.p"),Gdx.files.internal(Setting.PARTICLE));
}
setPost();
}

private static int lastHeroPositionX;
static float gameMenuListener=1;
public static void draw(SpriteBatch batch){
private int lastHeroPositionX;
float gameMenuListener=1;
public void draw(SpriteBatch batch){
if(GameViews.gameview.stackView==null && gameMenuListener<1)
gameMenuListener+=.05;
if(GameViews.gameview.stackView != null && gameMenuListener>0)
@@ -75,7 +75,7 @@ public static void draw(SpriteBatch batch){
setPost();
}

private static void setPost() {
private void setPost() {
String post=(String) RPG.maps.getProp().get("POST");
if(post!=null && post.length()!=0){
baseSaturation=1f;
@@ -104,11 +104,11 @@ private static void setPost() {
bloom.setEnabled(true);
}

public static BaseScriptExecutor setWeather(final Script script,final int t){
public BaseScriptExecutor setWeather(final Script script,final int t){
return script.$((BaseScriptExecutor) new BaseScriptExecutor() {
@Override
public void init() {
WeatherUtil.init(t);
WeatherUtil.this.init(t);
}
});
}
@@ -7,7 +7,7 @@

public class Smoother extends ShaderProgram {
public Smoother () {
super(Gdx.files.internal(Setting.GAME_RES_SHADER+"distancefield.vert"), Gdx.files.internal(Setting.GAME_RES_SHADER+"distancefield.frag"));
super(Gdx.files.internal(Setting.SHADER+"distancefield.vert"), Gdx.files.internal(Setting.SHADER+"distancefield.frag"));
if (!isCompiled()) {
throw new RuntimeException("Shader compilation failed:\n" + getLog());
}
@@ -6,7 +6,10 @@

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.NinePatch;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.maps.MapProperties;
import com.rpsg.rpg.core.Setting;
import com.rpsg.rpg.utils.display.FontUtil;
@@ -51,4 +54,11 @@ public static Map<String,Object> parseMapProperties(MapProperties mp){
public static float getScale(){
return (float)Gdx.graphics.getWidth()/(float)GameUtil.screen_width;
}

public static NinePatch processNinePatchFile(String fname) {
final Texture t = new Texture(Gdx.files.internal(fname));
final int width = t.getWidth() - 2;
final int height = t.getHeight() - 2;
return new NinePatch(new TextureRegion(t, 1, 1, width, height), 12, 12, 12, 12);
}
}
@@ -26,7 +26,7 @@ public static boolean throwItem(String type,Item item){
public static boolean throwItem(String type,Item item,int count){
if(item.count==0){
if(!RPG.global.getItems(type).remove(item)){
AlertUtil.add("非法操作。", AlertUtil.Red);
RPG.putMessage("非法操作。", AlertUtil.Red);
return false;
}
}else{
@@ -21,16 +21,12 @@
import com.rpsg.rpg.object.rpg.Hero;
import com.rpsg.rpg.system.base.Initialization;
import com.rpsg.rpg.system.base.ThreadPool;
import com.rpsg.rpg.system.controller.Distant;
import com.rpsg.rpg.system.controller.DrawController;
import com.rpsg.rpg.system.controller.InputController;
import com.rpsg.rpg.system.controller.MapLoader;
import com.rpsg.rpg.system.controller.MoveController;
import com.rpsg.rpg.system.ui.StackView;
import com.rpsg.rpg.system.ui.View;
import com.rpsg.rpg.utils.display.ColorUtil;
import com.rpsg.rpg.utils.display.GameViewRes;
import com.rpsg.rpg.utils.display.Msg;
import com.rpsg.rpg.utils.display.PostUtil;
import com.rpsg.rpg.utils.display.WeatherUtil;
import com.rpsg.rpg.utils.game.Logger;
@@ -65,7 +61,7 @@ public View init() {
parameter = new TmxMapLoader.Parameters();
parameter.loadedCallback= new AssetLoaderParameters.LoadedCallback() {
public void finishedLoading(AssetManager assetManager, String fileName, Class type) {
RPG.maps.map = ma.get(Setting.GAME_RES_MAP + global.map);
RPG.maps.map = ma.get(Setting.MAP + global.map);
render=new OrthoCachedTiledMapRenderer(RPG.maps.map);
render.setBlending(true);
render.setView(camera);
@@ -74,19 +70,19 @@ public void finishedLoading(AssetManager assetManager, String fileName, Class ty
inited = true;
post = GameViews.post;
bloom = GameViews.bloom;
WeatherUtil.init(RPG.global.weather);
RPG.ctrl.weather.init(RPG.global.weather);
Logger.info("图形加载完成。");
}
};
filename=Setting.GAME_RES_MAP+global.map;
filename=Setting.MAP+global.map;
ma.load(filename, TiledMap.class ,parameter);
return this;
}

@Override
public void dispose() {
RPG.maps.loader.dispose();
Msg.dispose();
RPG.ctrl.msg.dispose();
if(!Setting.persistence.cacheResource){
RPG.maps.map.dispose();
ma.unload(filename);
@@ -124,7 +120,7 @@ public void draw(SpriteBatch batch) {
post.render(true);

if(Setting.persistence.betterLight && RPG.maps.getProp().get("weather")==null)
WeatherUtil.draw((SpriteBatch) PostUtil.stage.getBatch());
RPG.ctrl.weather.draw((SpriteBatch) PostUtil.stage.getBatch());

ColorUtil.draw();
if(!first)
@@ -10,8 +10,6 @@
import com.bitfire.postprocessing.effects.Vignette;
import com.rpsg.rpg.core.RPG;
import com.rpsg.rpg.core.Setting;
import com.rpsg.rpg.io.Input;
import com.rpsg.rpg.object.base.Global;
import com.rpsg.rpg.object.base.Persistence;
import com.rpsg.rpg.system.base.Res;
import com.rpsg.rpg.utils.display.AlertUtil;
@@ -66,13 +64,12 @@ public void create() {
logoview.init();//注册logoview
//other
batch = new SpriteBatch();//构建画笔
AlertUtil.init();//提示工具类,可以在屏幕右下角显示一个个的小框
if(Setting.persistence.errorMessage!=null && Setting.persistence.errorMessage.length()!=0){//当游戏异常退出之前,会尝试把错误信息写到Setting.persistence.errorMessage这里然后保存,然后下一次启动游戏的时候,看看这个变量是不是空的,如果不是,就把上次的异常信息显示出来。
AlertUtil.add(Setting.persistence.errorMessage, AlertUtil.Red);
RPG.putMessage(Setting.persistence.errorMessage, AlertUtil.Red);
Setting.persistence.errorMessage="";
}
if(!GameUtil.isDesktop)
AlertUtil.add("检测到您的游戏环境为手机/平板,已进行相应优化。", AlertUtil.Green);//然而并没有优化hhh(有的)
RPG.putMessage("检测到您的游戏环境为手机/平板,已进行相应优化。", AlertUtil.Green);//然而并没有优化hhh(有的)

TimeUtil.init();//时间工具类,可以记录游戏运行时间等东西。
selectUtil=new SelectUtil();//TODO 试着把它移到gameview而不是gameviews。
@@ -147,7 +144,7 @@ public void render() {
RPG.hover.draw(batch);//悬浮窗口,一些特殊的置顶窗口会使用。
GameUtil.drawFPS(batch);//绘制FPS
TimeUtil.logic();//STEP一下时间工具包
AlertUtil.draw(batch);//STEP一下提示工具包
RPG.alert.draw(batch);//STEP一下提示工具包

batch.end();

@@ -35,22 +35,22 @@ public class LoadView extends View {
@Override
public LoadView init() {
stage=new Stage(new ScalingViewport(Scaling.stretch, GameUtil.screen_width, GameUtil.screen_height, new OrthographicCamera()));
f_load= new Sprite(new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_LOAD+"f_load.png")));
f_load= new Sprite(new Texture(Gdx.files.internal(Setting.IMAGE_LOAD+"f_load.png")));
f_load.getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);
bg= new Image(new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_LOAD+"bg.png")));
bg= new Image(new Texture(Gdx.files.internal(Setting.IMAGE_LOAD+"bg.png")));
bg.setPosition(0, 0);
bg.setSize(GameUtil.screen_width,bg.getHeight());

bg.setColor(1,1,1,0);
hbx=new int[10];hby=new int[10];hbs=new int[10];hba=new int[10];hbr=new float[10];hbab=new boolean[10];hb=new Image[10];
for (int i = 0; i <hbx.length; i++) {
switch(new Random().nextInt(6) + 1){
case 1:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_LOAD+"f1.png")));break;
case 2:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_LOAD+"f2.png")));break;
case 3:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_LOAD+"f3.png")));break;
case 4:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_LOAD+"f4.png")));break;
case 5:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_LOAD+"f5.png")));break;
case 6:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_LOAD+"f6.png")));break;
case 1:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.IMAGE_LOAD+"f1.png")));break;
case 2:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.IMAGE_LOAD+"f2.png")));break;
case 3:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.IMAGE_LOAD+"f3.png")));break;
case 4:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.IMAGE_LOAD+"f4.png")));break;
case 5:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.IMAGE_LOAD+"f5.png")));break;
case 6:hb[i] = new Image(new Texture(Gdx.files.internal(Setting.IMAGE_LOAD+"f6.png")));break;
}
hbx[i]=0;hby[i]=40;hbs[i]=0;hba[i]=0;hbab[i]=true;
}
@@ -23,14 +23,14 @@ public class LogoView extends View{
@Override
public View init() {
stage=new Stage(new ScalingViewport(Scaling.stretch, GameUtil.screen_width, GameUtil.screen_height, new OrthographicCamera()));
stage.addActor(new Image(Setting.GAME_RES_IMAGE_LOGO+"wbg.png"));
stage.addActor(new Image(Setting.GAME_RES_IMAGE_LOGO+"bg.png").color(1,1,1,0).action(Actions.sequence(Actions.delay(0.2f),Actions.fadeIn(0.2f))));
stage.addActor(new Image(Setting.GAME_RES_IMAGE_LOGO+"logo.png").color(1,1,1,0).position(351, 295).action(Actions.sequence(Actions.delay(1f),Actions.parallel(Actions.fadeIn(0.2f),Actions.moveBy(0, 45,0.3f)))));
stage.addActor(new Image(Setting.GAME_RES_IMAGE_LOGO+"hr.png").color(1,1,1,0).size(3, 36).position(124, 300).action(Actions.sequence(Actions.delay(0.4f),Actions.parallel(Actions.fadeIn(0.4f),Actions.sizeTo(774, 36,0.4f)))));
stage.addActor(new Image(Setting.GAME_RES_IMAGE_LOGO+"info.png").color(1,1,1,0).position(290, 280).action(Actions.sequence(Actions.delay(2.6f),Actions.fadeIn(0.4f))));
stage.addActor(new Image(Setting.IMAGE_LOGO+"wbg.png"));
stage.addActor(new Image(Setting.IMAGE_LOGO+"bg.png").color(1,1,1,0).action(Actions.sequence(Actions.delay(0.2f),Actions.fadeIn(0.2f))));
stage.addActor(new Image(Setting.IMAGE_LOGO+"logo.png").color(1,1,1,0).position(351, 295).action(Actions.sequence(Actions.delay(1f),Actions.parallel(Actions.fadeIn(0.2f),Actions.moveBy(0, 45,0.3f)))));
stage.addActor(new Image(Setting.IMAGE_LOGO+"hr.png").color(1,1,1,0).size(3, 36).position(124, 300).action(Actions.sequence(Actions.delay(0.4f),Actions.parallel(Actions.fadeIn(0.4f),Actions.sizeTo(774, 36,0.4f)))));
stage.addActor(new Image(Setting.IMAGE_LOGO+"info.png").color(1,1,1,0).position(290, 280).action(Actions.sequence(Actions.delay(2.6f),Actions.fadeIn(0.4f))));
final2=new Action(){
public boolean act(float delta) {
stage.addActor(new Image(Setting.GAME_RES_IMAGE_LOGO+"wbg.png").color(0,0,0,0).action(Actions.sequence(Actions.color(new Color(0,0,0,1),0.2f),Actions.addAction(new Action(){
stage.addActor(new Image(Setting.IMAGE_LOGO+"wbg.png").color(0,0,0,0).action(Actions.sequence(Actions.color(new Color(0,0,0,1),0.2f),Actions.addAction(new Action(){
public boolean act(float delta) {
flag=2;
played=true;
@@ -43,20 +43,20 @@ public boolean act(float delta) {
final1=new Action(){
public boolean act(float delta) {
Music.stopCurrentMusic();
stage.addActor(new Image(Setting.GAME_RES_IMAGE_LOGO+"wbg.png").color(0,0,0,0).action(Actions.sequence(Actions.color(new Color(0,0,0,1),0.2f),Actions.addAction(new Action(){
stage.addActor(new Image(Setting.IMAGE_LOGO+"wbg.png").color(0,0,0,0).action(Actions.sequence(Actions.color(new Color(0,0,0,1),0.2f),Actions.addAction(new Action(){
public boolean act(float delta) {
stage.clear();
stage.addActor(new Image(Setting.GAME_RES_IMAGE_LOGO+"bg2.png").color(1,1,1,0).action(Actions.sequence(Actions.delay(0.1f),Actions.fadeIn(0.4f))));
stage.addActor(new Image(Setting.GAME_RES_IMAGE_LOGO+"hv.png").color(1,1,1,0).action(Actions.sequence(Actions.delay(0.5f),Actions.fadeIn(0.5f))));
stage.addActor(new Image(Setting.GAME_RES_IMAGE_LOGO+"wbg.png").color(0,0,0,0).action(Actions.sequence(Actions.delay(4f),Actions.color(new Color(0,0,0,1),0.2f),Actions.addAction(final2))));
stage.addActor(new Image(Setting.IMAGE_LOGO+"bg2.png").color(1,1,1,0).action(Actions.sequence(Actions.delay(0.1f),Actions.fadeIn(0.4f))));
stage.addActor(new Image(Setting.IMAGE_LOGO+"hv.png").color(1,1,1,0).action(Actions.sequence(Actions.delay(0.5f),Actions.fadeIn(0.5f))));
stage.addActor(new Image(Setting.IMAGE_LOGO+"wbg.png").color(0,0,0,0).action(Actions.sequence(Actions.delay(4f),Actions.color(new Color(0,0,0,1),0.2f),Actions.addAction(final2))));
return true;
}
}))));
flag=1;
return true;
}
};
stage.addActor(new Image(Setting.GAME_RES_IMAGE_LOGO+"wbg.png").color(0,0,0,0).action(Actions.sequence(Actions.delay(6),Actions.color(new Color(0,0,0,1),0.4f),Actions.addAction(final1))));
stage.addActor(new Image(Setting.IMAGE_LOGO+"wbg.png").color(0,0,0,0).action(Actions.sequence(Actions.delay(6),Actions.color(new Color(0,0,0,1),0.4f),Actions.addAction(final1))));
// Music.playMusic("logo.mp3");
return this;
}
@@ -23,12 +23,12 @@ public ConfirmView(String msg,Confirm ...confirms){

static TextButtonStyle style=new TextButtonStyle();
static{
style.up=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"savebut.png");
style.down=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"savebuth.png");
style.up=Res.getDrawable(Setting.IMAGE_MENU_SYSTEM+"savebut.png");
style.down=Res.getDrawable(Setting.IMAGE_MENU_SYSTEM+"savebuth.png");
}
public void init() {
int offset=0;
stage.addActor(Res.get(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"savebl.png").size(GameUtil.screen_width, GameUtil.screen_height).color(0,0,0,0.9f));
stage.addActor(Res.get(Setting.IMAGE_MENU_SYSTEM+"savebl.png").size(GameUtil.screen_width, GameUtil.screen_height).color(0,0,0,0.9f));
for(final Confirm con:confirms){
TextButton but= new TextButton(con.name, style).onClick(new Runnable() {
@Override
@@ -32,8 +32,8 @@ public class LoadView extends HoverView{
public int currentSelect=-1;
public TextButton autobut,savebutton;
public void init() {
stage.addActor(Res.get(Setting.GAME_RES_IMAGE_MENU_SYSTEM + "savebg.png").color(1, 1, 1, 0).action(Actions.fadeIn(0.2f)));
ImageButton exit=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"file_exit.png"),Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"file_exit_active.png"));
stage.addActor(Res.get(Setting.IMAGE_MENU_SYSTEM + "savebg.png").color(1, 1, 1, 0).action(Actions.fadeIn(0.2f)));
ImageButton exit=new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_SYSTEM+"file_exit.png"),Res.getDrawable(Setting.IMAGE_MENU_SYSTEM+"file_exit_active.png"));
exit.setPosition(945, 530);
exit.addAction(Actions.moveTo(945, 500, 0.1f));
exit.addListener(new InputListener() {
@@ -48,8 +48,8 @@ public boolean touchDown(InputEvent event, float x, float y, int pointer, int b)
stage.addActor(exit);

butstyle=new TextButtonStyle();
butstyle.up=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"savebut.png");
butstyle.down=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_SYSTEM + "savebuth.png");
butstyle.up=Res.getDrawable(Setting.IMAGE_MENU_SYSTEM+"savebut.png");
butstyle.down=Res.getDrawable(Setting.IMAGE_MENU_SYSTEM + "savebuth.png");

TextButton llbutton=new TextButton("<<", butstyle).onClick(new Runnable() {
@Override
@@ -82,10 +82,10 @@ public void run() {
TextButton rbutton=new TextButton(">", butstyle).onClick(new Runnable() {
@Override
public void run() {
if (currentPageStart + 5 < Setting.GAME_SAVE_FILE_MAX_PAGE)
if (currentPageStart + 5 < Setting.SAVE_FILE_MAX_PAGE)
currentPageStart += 1;
else
currentPageStart = Setting.GAME_SAVE_FILE_MAX_PAGE - 5;
currentPageStart = Setting.SAVE_FILE_MAX_PAGE - 5;
LoadView.this.generateList();
}
});
@@ -96,10 +96,10 @@ public void run() {
TextButton rrbutton=new TextButton(">>", butstyle).onClick(new Runnable() {
@Override
public void run() {
if (currentPageStart + 10 < Setting.GAME_SAVE_FILE_MAX_PAGE)
if (currentPageStart + 10 < Setting.SAVE_FILE_MAX_PAGE)
currentPageStart += 5;
else
currentPageStart = Setting.GAME_SAVE_FILE_MAX_PAGE - 5;
currentPageStart = Setting.SAVE_FILE_MAX_PAGE - 5;
LoadView.this.generateList();
}
});
@@ -116,15 +116,15 @@ public void run(Object view) {
if (currentSelect != -1) {
Object o = SL.load(currentSelect);
if (o != null) {
AlertUtil.add("读取档案成功。", AlertUtil.Green);
RPG.putMessage("读取档案成功。", AlertUtil.Green);
RPG.global = (Global) o;
Initialization.restartGame();
LoadView.this.disposed = true;
} else
AlertUtil.add("读取档案失败。", AlertUtil.Red);
RPG.putMessage("读取档案失败。", AlertUtil.Red);
LoadView.this.generateList();
} else {
AlertUtil.add("请选择要读取的档案位置。", AlertUtil.Yellow);
RPG.putMessage("请选择要读取的档案位置。", AlertUtil.Yellow);
Music.playSE("err");
}
((HoverView) view).disposed = true;
@@ -155,12 +155,12 @@ public void run() {
public void run(Object view) {
if (currentSelect != -1) {
if (SL.delete(currentSelect)) {
AlertUtil.add("删除档案成功。", AlertUtil.Green);
RPG.putMessage("删除档案成功。", AlertUtil.Green);
LoadView.this.generateList();
} else
AlertUtil.add("删除档案失败。", AlertUtil.Red);
RPG.putMessage("删除档案失败。", AlertUtil.Red);
} else
AlertUtil.add("请选择要删除的档案。", AlertUtil.Yellow);
RPG.putMessage("请选择要删除的档案。", AlertUtil.Yellow);
((HoverView) view).disposed = true;
}
}));
@@ -195,7 +195,7 @@ public void generateList(){

stage.getActors().removeAll(removeList, true);

if(!(currentPageStart+5>Setting.GAME_SAVE_FILE_MAX_PAGE))
if(!(currentPageStart+5>Setting.SAVE_FILE_MAX_PAGE))
for(int i=0;i<5;i++){
// if(currentPageStart+i>=Setting.GAME_SAVE_FILE_MAX_PAGE)
// continue;
@@ -227,12 +227,12 @@ public void run() {
}
}

if(currentPage!=Setting.GAME_SAVE_FILE_MAX_PAGE-1){
if(currentPage!=Setting.SAVE_FILE_MAX_PAGE-1){
autobut=new TextButton("Auto", butstyle).onClick(new Runnable() {
@Override
public void run() {
currentPageStart = Setting.GAME_SAVE_FILE_MAX_PAGE - 5;
currentPage = Setting.GAME_SAVE_FILE_MAX_PAGE - 1;
currentPageStart = Setting.SAVE_FILE_MAX_PAGE - 5;
currentPage = Setting.SAVE_FILE_MAX_PAGE - 1;
LoadView.this.generateList();
}
});
@@ -27,8 +27,8 @@ public class SaveView extends HoverView{
public int currentSelect=-1;
public TextButton autobut,savebutton;
public void init() {
stage.addActor(Res.get(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"savebg.png").color(1,1,1,0).action(Actions.fadeIn(0.2f)));
ImageButton exit=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"file_exit.png"),Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"file_exit_active.png"));
stage.addActor(Res.get(Setting.IMAGE_MENU_SYSTEM+"savebg.png").color(1,1,1,0).action(Actions.fadeIn(0.2f)));
ImageButton exit=new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_SYSTEM+"file_exit.png"),Res.getDrawable(Setting.IMAGE_MENU_SYSTEM+"file_exit_active.png"));
exit.setPosition(945, 530);
exit.addAction(Actions.moveTo(945, 500,0.1f));
exit.addListener(new InputListener(){
@@ -42,8 +42,8 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b
stage.addActor(exit);

butstyle=new TextButtonStyle();
butstyle.up=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"savebut.png");
butstyle.down=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"savebuth.png");
butstyle.up=Res.getDrawable(Setting.IMAGE_MENU_SYSTEM+"savebut.png");
butstyle.down=Res.getDrawable(Setting.IMAGE_MENU_SYSTEM+"savebuth.png");

TextButton llbutton=new TextButton("<<", butstyle).onClick(new Runnable() {
@Override
@@ -76,10 +76,10 @@ public void run() {
TextButton rbutton=new TextButton(">", butstyle).onClick(new Runnable() {
@Override
public void run() {
if (currentPageStart + 5 < Setting.GAME_SAVE_FILE_MAX_PAGE)
if (currentPageStart + 5 < Setting.SAVE_FILE_MAX_PAGE)
currentPageStart += 1;
else
currentPageStart = Setting.GAME_SAVE_FILE_MAX_PAGE - 5;
currentPageStart = Setting.SAVE_FILE_MAX_PAGE - 5;
SaveView.this.generateList();
}
});
@@ -90,10 +90,10 @@ public void run() {
TextButton rrbutton=new TextButton(">>", butstyle).onClick(new Runnable() {
@Override
public void run() {
if (currentPageStart + 10 < Setting.GAME_SAVE_FILE_MAX_PAGE)
if (currentPageStart + 10 < Setting.SAVE_FILE_MAX_PAGE)
currentPageStart += 5;
else
currentPageStart = Setting.GAME_SAVE_FILE_MAX_PAGE - 5;
currentPageStart = Setting.SAVE_FILE_MAX_PAGE - 5;
SaveView.this.generateList();
}
});
@@ -109,12 +109,12 @@ public void run() {
public void run(Object view) {
if (currentSelect != -1) {
if (SL.save(currentSelect))
AlertUtil.add("存档完成。", AlertUtil.Green);
RPG.putMessage("存档完成。", AlertUtil.Green);
else
AlertUtil.add("存档失败。", AlertUtil.Red);
RPG.putMessage("存档失败。", AlertUtil.Red);
SaveView.this.generateList();
} else {
AlertUtil.add("请选择要保存的位置。", AlertUtil.Yellow);
RPG.putMessage("请选择要保存的位置。", AlertUtil.Yellow);
Music.playSE("err");
}
((HoverView) view).disposed = true;
@@ -145,12 +145,12 @@ public void run() {
public void run(Object view) {
if (currentSelect != -1) {
if (SL.delete(currentSelect)) {
AlertUtil.add("删除档案成功。", AlertUtil.Green);
RPG.putMessage("删除档案成功。", AlertUtil.Green);
SaveView.this.generateList();
} else
AlertUtil.add("删除档案失败。", AlertUtil.Red);
RPG.putMessage("删除档案失败。", AlertUtil.Red);
} else
AlertUtil.add("请选择要删除的档案。", AlertUtil.Yellow);
RPG.putMessage("请选择要删除的档案。", AlertUtil.Yellow);
((HoverView) view).disposed = true;
}
}));
@@ -186,7 +186,7 @@ public void generateList(){

stage.getActors().removeAll(removeList, true);

if(!(currentPageStart+5>Setting.GAME_SAVE_FILE_MAX_PAGE))
if(!(currentPageStart+5>Setting.SAVE_FILE_MAX_PAGE))
for(int i=0;i<5;i++){
// if(currentPageStart+i>=Setting.GAME_SAVE_FILE_MAX_PAGE)
// continue;
@@ -218,12 +218,12 @@ public void run() {
}
}

if(currentPage!=Setting.GAME_SAVE_FILE_MAX_PAGE-1){
if(currentPage!=Setting.SAVE_FILE_MAX_PAGE-1){
autobut=new TextButton("Auto", butstyle).onClick(new Runnable() {
@Override
public void run() {
currentPageStart = Setting.GAME_SAVE_FILE_MAX_PAGE - 5;
currentPage = Setting.GAME_SAVE_FILE_MAX_PAGE - 1;
currentPageStart = Setting.SAVE_FILE_MAX_PAGE - 5;
currentPage = Setting.SAVE_FILE_MAX_PAGE - 1;
SaveView.this.generateList();
}
});
@@ -34,12 +34,12 @@ public void run() {
}));
stage.addActor(group);
group.pack();
group.addActor(Res.get(Setting.GAME_RES_IMAGE_MENU_TACTIC + "sup_detabox.png").size(784, GameUtil.screen_height).position(240, 0));
$.add(Res.get(Setting.GAME_RES_IMAGE_FG+hero.fgname+"/Normal.png").position(1100, 0).scaleY(0.35f).color(1,1,1,.5f).scaleX(-0.35f)).setOrigin(Align.bottomLeft).appendTo(group);
group.addActor(Res.get(Setting.IMAGE_MENU_TACTIC + "sup_detabox.png").size(784, GameUtil.screen_height).position(240, 0));
$.add(Res.get(Setting.IMAGE_FG+hero.fgname+"/Normal.png").position(1100, 0).scaleY(0.35f).color(1,1,1,.5f).scaleX(-0.35f)).setOrigin(Align.bottomLeft).appendTo(group);
group.addActor(new Label(hero.name,55).setPos(490, 520).setWidth(1000));
group.addActor(new Label(hero.jname,43).setPos(560, 490).setWidth(1000).color(1, 1, 1, .3f).setPad(-18));
group.addActor(new Label("角色等级"+hero.prop.get("level")+",社群("+hero.association.name+")等级"+hero.association.level,36).setPos(420, 440).setWidth(1000).color(1, 1, 1, .7f).setPad(-1));
group.addActor(new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_TACTIC+"left.png"),Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_TACTIC+"left_p.png")).pos(430, 465).onClick(new Runnable() {
group.addActor(new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_TACTIC+"left.png"),Res.getDrawable(Setting.IMAGE_MENU_TACTIC+"left_p.png")).pos(430, 465).onClick(new Runnable() {
@Override
public void run() {
SupportView.this.keyDown(Keys.ESCAPE);
@@ -59,18 +59,18 @@ public class EquipView extends IMenuView{

public View init() {

up=new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_MENU_EQUIP+"add.png"));
down=new Texture(Gdx.files.internal(Setting.GAME_RES_IMAGE_MENU_EQUIP+"sub.png"));
up=new Texture(Gdx.files.internal(Setting.IMAGE_MENU_EQUIP+"add.png"));
down=new Texture(Gdx.files.internal(Setting.IMAGE_MENU_EQUIP+"sub.png"));

stage=new Stage(new ScalingViewport(Scaling.stretch, GameUtil.screen_width, GameUtil.screen_height, new OrthographicCamera()),MenuView.stage.getBatch());

Image walkerbox=Res.get(Setting.GAME_RES_IMAGE_MENU_EQUIP+"walkerbox.png");
Image walkerbox=Res.get(Setting.IMAGE_MENU_EQUIP+"walkerbox.png");
walkerbox.setPosition(160, 350);
walkerbox.setColor(1,1,1,0);
walkerbox.addAction(Actions.fadeIn(0.2f));
stage.addActor(walkerbox);

ImageButton left=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"left.png"),Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"lefts.png"));
ImageButton left=new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"left.png"),Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"lefts.png"));
left.setPosition(245, 390);
left.addListener(new InputListener(){
public void touchUp (InputEvent event, float x, float y, int pointer, int b) {
@@ -82,7 +82,7 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b
});
stage.addActor(left);

ImageButton right=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"right.png"),Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"rights.png"));
ImageButton right=new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"right.png"),Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"rights.png"));
right.setPosition(377, 390);
right.addListener(new InputListener(){
public void touchUp (InputEvent event, float x, float y, int pointer, int b) {
@@ -94,15 +94,15 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b
});
stage.addActor(right);

Image bot=Res.get(Setting.GAME_RES_IMAGE_MENU_EQUIP+"botbar.png");
Image bot=Res.get(Setting.IMAGE_MENU_EQUIP+"botbar.png");
bot.setColor(1,1,1,0);
bot.addAction(Actions.fadeIn(0.2f));
bot.setPosition(130, 13);
stage.addActor(bot);

ListStyle style=new ListStyle();
style.font=FontUtil.generateFont(" ".toCharArray()[0], 22);
style.selection=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"equipsel.png");
style.selection=Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"equipsel.png");
style.fontColorSelected=Color.valueOf("f5e70c");
elist=new com.rpsg.rpg.system.ui.List<Equipment>(style);
elist.onClick(new Runnable() {
@@ -113,12 +113,12 @@ public void run() {
}
});
ScrollPane pane=new ScrollPane(elist);
pane.getStyle().vScroll=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"scrollbar.png");
pane.getStyle().vScrollKnob=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"scrollbarin.png");
pane.getStyle().vScroll=Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"scrollbar.png");
pane.getStyle().vScrollKnob=Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"scrollbarin.png");
pane.setForceScroll(false, true);
pane.layout();
Table table=new Table();
table.setBackground(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"equipbox.png"));
table.setBackground(Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"equipbox.png"));
table.add(pane);
table.padRight(20);
table.setPosition(600, 120);
@@ -164,24 +164,24 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b
});
stage.addActor(mask);

final Image msg=Res.get(Setting.GAME_RES_IMAGE_MENU_EQUIP+"equipmsgbox.png");
final Image msg=Res.get(Setting.IMAGE_MENU_EQUIP+"equipmsgbox.png");
msg.setPosition(380, 140);
stage.addActor(msg);
olist=new com.rpsg.rpg.system.ui.List<ListItem>(style);
olist.offsetX2=20;
olist.getItems().add(new ListItem("装备").setUserObject(Res.get(Setting.GAME_RES_IMAGE_ICONS+"add.png")).setRunnable(new Runnable() {
olist.getItems().add(new ListItem("装备").setUserObject(Res.get(Setting.IMAGE_ICONS+"add.png")).setRunnable(new Runnable() {
@Override
public void run() {
ItemUtil.useEquip(RPG.ctrl.hero.heros.get(currentSelectHero), equip);
EquipView.this.gengrateEList();
}
}));
olist.getItems().add(new ListItem("丢弃").setUserObject(Res.get(Setting.GAME_RES_IMAGE_ICONS+"bin.png")).setRunnable(new Runnable() {
olist.getItems().add(new ListItem("丢弃").setUserObject(Res.get(Setting.IMAGE_ICONS+"bin.png")).setRunnable(new Runnable() {
@Override
public void run() {
if (equip.throwable) {
ItemUtil.throwItem("equipment", equip);
AlertUtil.add("丢弃成功。", AlertUtil.Yellow);
RPG.putMessage("丢弃成功。", AlertUtil.Yellow);
EquipView.this.gengrateEList();
}
}
@@ -202,7 +202,7 @@ public void run() {
}
};
cancel.run();
olist.getItems().add(new ListItem("取消").setUserObject(Res.get(Setting.GAME_RES_IMAGE_ICONS+"no.png")));
olist.getItems().add(new ListItem("取消").setUserObject(Res.get(Setting.IMAGE_ICONS+"no.png")));
olist.onDBClick(new Runnable() {
@Override
public void run() {
@@ -66,23 +66,23 @@ public class ItemView extends DefaultIView{
Image[] throwimg=new Image[10];
public View init() {
add=new ParticleEffect();
add.load(Gdx.files.internal(Setting.GAME_RES_PARTICLE + "addp.p"), Gdx.files.internal(Setting.GAME_RES_PARTICLE));
add.load(Gdx.files.internal(Setting.PARTICLE + "addp.p"), Gdx.files.internal(Setting.PARTICLE));
add.setPosition(835, 111);

render=new ShapeRenderer();
render.setAutoShapeType(true);

stage=new Stage(new ScalingViewport(Scaling.stretch, GameUtil.screen_width, GameUtil.screen_height, new OrthographicCamera()),MenuView.stage.getBatch());

Image bg=Res.get(Setting.GAME_RES_IMAGE_MENU_ITEM+"item_bg.png");
Image bg=Res.get(Setting.IMAGE_MENU_ITEM+"item_bg.png");
bg.setColor(1, 1, 1, 0);
bg.setPosition(160, 28);
bg.addAction(Actions.fadeIn(0.2f));
stage.addActor(bg);

ListStyle style=new ListStyle();
style.font=FontUtil.generateFont(" ".toCharArray()[0], 22);
style.selection=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP + "equipsel.png");
style.selection=Res.getDrawable(Setting.IMAGE_MENU_EQUIP + "equipsel.png");
style.fontColorSelected=Color.valueOf("f5e70c");
elist=new com.rpsg.rpg.system.ui.List<Item>(style);
elist.onClick(new Runnable() {
@@ -94,8 +94,8 @@ public void run() {
});
elist.layout();
pane=new ScrollPane(elist);
pane.getStyle().vScroll=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_ITEM+"scrollbar.png");
pane.getStyle().vScrollKnob=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_ITEM+"scrollbarin.png");
pane.getStyle().vScroll=Res.getDrawable(Setting.IMAGE_MENU_ITEM+"scrollbar.png");
pane.getStyle().vScrollKnob=Res.getDrawable(Setting.IMAGE_MENU_ITEM+"scrollbarin.png");
pane.setForceScroll(false, true);
pane.layout();

@@ -108,9 +108,9 @@ public void run() {
table.setColor(1, 1, 1, 0);
table.addAction(Actions.fadeIn(0.2f));
stage.addActor(table);
topbarSel=Res.get(Setting.GAME_RES_IMAGE_MENU_ITEM+"topsel.png");
topbarSel=Res.get(Setting.IMAGE_MENU_ITEM+"topsel.png");
topbar=new Table();
topbar.setBackground(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_ITEM + "topbar.png"));
topbar.setBackground(Res.getDrawable(Setting.IMAGE_MENU_ITEM + "topbar.png"));
topbar.setSize(818, 42);
topbar.setPosition(160, 455);
int tmpI=0,offsetX=135;
@@ -143,7 +143,7 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b
}
});
stage.addActor(mask);
scuse=Res.get(Setting.GAME_RES_IMAGE_MENU_SC+"sc_use.png");
scuse=Res.get(Setting.IMAGE_MENU_SC+"sc_use.png");
scuse.loaded= new Runnable() {
@Override
public void run() {
@@ -193,7 +193,7 @@ public void run() {
sellist.offsetX2 = 20;
sellist.getItems().clear();
if (item.type == Item.TYPE_USEINMAP)
sellist.getItems().add(new ListItem("使用").setUserObject(Res.get(Setting.GAME_RES_IMAGE_ICONS + "yes.png")).setRunnable(new Runnable() {
sellist.getItems().add(new ListItem("使用").setUserObject(Res.get(Setting.IMAGE_ICONS + "yes.png")).setRunnable(new Runnable() {
@Override
public void run() {
scfor.visible = true;
@@ -203,7 +203,7 @@ public void run() {
}
}));
if (item.throwable)
sellist.getItems().add(new ListItem("丢弃").setUserObject(Res.get(Setting.GAME_RES_IMAGE_ICONS + "bin.png")).setRunnable(new Runnable() {
sellist.getItems().add(new ListItem("丢弃").setUserObject(Res.get(Setting.IMAGE_ICONS + "bin.png")).setRunnable(new Runnable() {
@Override
public void run() {
group.setVisible(true);
@@ -213,7 +213,7 @@ public void run() {
layer = 3;
}
}));
sellist.getItems().add(new ListItem("取消").setUserObject(Res.get(Setting.GAME_RES_IMAGE_ICONS + "no.png")).setRunnable(new Runnable() {
sellist.getItems().add(new ListItem("取消").setUserObject(Res.get(Setting.IMAGE_ICONS + "no.png")).setRunnable(new Runnable() {
@Override
public void run() {
can.run();
@@ -236,12 +236,12 @@ public void run() {


stage.addActor(mask2);
scfor=Res.get(Setting.GAME_RES_IMAGE_MENU_ITEM+"selbg.png");
scfor=Res.get(Setting.IMAGE_MENU_ITEM+"selbg.png");
scfor.setPosition(500, 87);

herolist=new com.rpsg.rpg.system.ui.List<ListItem>(style);
herolist.offsetX2=20;
herolist.getItems().add(new ListItem("取消").setUserObject(Res.get(Setting.GAME_RES_IMAGE_ICONS+"no.png")));
herolist.getItems().add(new ListItem("取消").setUserObject(Res.get(Setting.IMAGE_ICONS+"no.png")));
for (Hero h : RPG.ctrl.hero.heros) {
herolist.getItems().add(new ListItem(h.name).setUserObject(h));
}
@@ -272,19 +272,19 @@ public void run() {
}
};
TextButtonStyle butstyle=new TextButtonStyle();
butstyle.over=butstyle.checkedOver=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"button_RPG.hover.png");
butstyle.down=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"button_active.png");
butstyle.up=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"button.png");
butstyle.over=butstyle.checkedOver=Res.getDrawable(Setting.IMAGE_GLOBAL+"button_RPG.hover.png");
butstyle.down=Res.getDrawable(Setting.IMAGE_GLOBAL+"button_active.png");
butstyle.up=Res.getDrawable(Setting.IMAGE_GLOBAL+"button.png");
group=new Group();
Image tbg=new Image(Setting.GAME_RES_IMAGE_MENU_SC+"throw.png");
Image tbg=new Image(Setting.IMAGE_MENU_SC+"throw.png");
tbg.setPosition(350, 200);
group.addActor(tbg);
TextButton button;
button = new TextButton("确定", butstyle).onClick(new Runnable() {
@Override
public void run() {
ItemUtil.throwItem(currentBar.name, item, currentCount);
AlertUtil.add("丢弃成功。", AlertUtil.Yellow);
RPG.putMessage("丢弃成功。", AlertUtil.Yellow);
ItemView.this.generateLists(currentBar.name);
item = new TipItem();
can3.run();
@@ -303,7 +303,7 @@ public void run() {
button2.setPosition(630, 225);
button2.setSize(100, 50);
group.addActor(button2);
ImageButton upbutton1=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"up.png"), Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"ups.png"));
ImageButton upbutton1=new ImageButton(Res.getDrawable(Setting.IMAGE_NUMBER+"up.png"), Res.getDrawable(Setting.IMAGE_NUMBER+"ups.png"));
upbutton1.onClick(new Runnable() {
@Override
public void run() {
@@ -312,7 +312,7 @@ public void run() {
}
}).setPosition(395, 340);
group.addActor(upbutton1);
ImageButton upbutton2=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"up.png"), Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"ups.png"));
ImageButton upbutton2=new ImageButton(Res.getDrawable(Setting.IMAGE_NUMBER+"up.png"), Res.getDrawable(Setting.IMAGE_NUMBER+"ups.png"));
upbutton2.onClick(new Runnable() {
@Override
public void run() {
@@ -321,7 +321,7 @@ public void run() {
}
}).setPosition(435, 340);
group.addActor(upbutton2);
ImageButton upbutton3=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"up.png"), Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"ups.png"));
ImageButton upbutton3=new ImageButton(Res.getDrawable(Setting.IMAGE_NUMBER+"up.png"), Res.getDrawable(Setting.IMAGE_NUMBER+"ups.png"));
upbutton3.onClick(new Runnable() {
@Override
public void run() {
@@ -330,7 +330,7 @@ public void run() {
}
}).setPosition(475, 340);
group.addActor(upbutton3);
ImageButton dbutton1=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"down.png"), Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"downs.png"));
ImageButton dbutton1=new ImageButton(Res.getDrawable(Setting.IMAGE_NUMBER+"down.png"), Res.getDrawable(Setting.IMAGE_NUMBER+"downs.png"));
dbutton1.onClick(new Runnable() {
@Override
public void run() {
@@ -339,7 +339,7 @@ public void run() {
}
}).setPosition(395, 240);
group.addActor(dbutton1);
ImageButton dbutton2=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"down.png"), Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"downs.png"));
ImageButton dbutton2=new ImageButton(Res.getDrawable(Setting.IMAGE_NUMBER+"down.png"), Res.getDrawable(Setting.IMAGE_NUMBER+"downs.png"));
dbutton2.onClick(new Runnable() {
@Override
public void run() {
@@ -348,7 +348,7 @@ public void run() {
}
}).setPosition(435, 240);
group.addActor(dbutton2);
ImageButton dbutton3=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"down.png"), Res.getDrawable(Setting.GAME_RES_IMAGE_NUMBER+"downs.png"));
ImageButton dbutton3=new ImageButton(Res.getDrawable(Setting.IMAGE_NUMBER+"down.png"), Res.getDrawable(Setting.IMAGE_NUMBER+"downs.png"));
dbutton3.onClick(new Runnable() {
@Override
public void run() {
@@ -541,9 +541,9 @@ class TopBar extends Actor{
boolean selected=false;
Image bigImg,miniImg;
public TopBar(final String name,int offsetX){
bigImg=Res.get(Setting.GAME_RES_IMAGE_MENU_ITEM+name+".png");
bigImg=Res.get(Setting.IMAGE_MENU_ITEM+name+".png");
bigImg.setPosition(700, 300);
miniImg=Res.get(Setting.GAME_RES_IMAGE_MENU_ITEM+name+"_m.png");
miniImg=Res.get(Setting.IMAGE_MENU_ITEM+name+"_m.png");
miniImg.setPosition(230+offsetX, 465);
this.name=name;
this.setTouchable(miniImg.getTouchable());
@@ -63,21 +63,21 @@ public View init() {
final Actor hr;//左边栏hr下方
final Actor exit;
final WidgetGroup fgGroup=(WidgetGroup) $.add(new WidgetGroup()).appendTo(stage).getItem();//右侧
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"bg.png")).setHeight(1024).setPosition(0, 0).appendTo(leftBar);
$.add(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"bg.png")).setHeight(1024).setPosition(0, 0).appendTo(leftBar);
final WidgetGroup ld=(WidgetGroup) $.add(new WidgetGroup()).appendTo(leftBar).getItem();
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"ico_pos.png")).setPosition(-100, 330).appendTo(ld).addAction(Actions.moveTo(35, 330,0.55f,Interpolation.pow2Out));
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"ico_gold.png")).setPosition(-100, 275).appendTo(ld).addAction(Actions.moveTo(35, 275,0.55f,Interpolation.pow2Out));
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"ico_flag.png")).setPosition(-100, 212).appendTo(ld).addAction(Actions.moveTo(35, 212,0.55f,Interpolation.pow2Out));
$.add(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"ico_pos.png")).setPosition(-100, 330).appendTo(ld).addAction(Actions.moveTo(35, 330,0.55f,Interpolation.pow2Out));
$.add(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"ico_gold.png")).setPosition(-100, 275).appendTo(ld).addAction(Actions.moveTo(35, 275,0.55f,Interpolation.pow2Out));
$.add(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"ico_flag.png")).setPosition(-100, 212).appendTo(ld).addAction(Actions.moveTo(35, 212,0.55f,Interpolation.pow2Out));
frames=$.add($.add(new Label("",24).setWidth(1000).setPos(0, 558)).appendTo(ld).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(0.3f),Actions.moveTo(120,558,0.5f))),new GdxQueryRunnable() {public void run(GdxQuery self) {
((Label)self.getItem()).setText(/*RPG.global.tyear+"/"+*/RPG.global.date.getMonth()+"月"+RPG.global.date.getDay()+"日");
}});
frames.add($.add(new Label("",24).setWidth(1000).right(true).setPos(0, 558)).appendTo(ld).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(0.3f),Actions.moveTo(380,558,0.5f,Interpolation.pow2Out))),new GdxQueryRunnable() {public void run(GdxQuery self) {
((Label)self.getItem()).setText(((RPG.global.date.getTime()==Time.DAY?"上午":(RPG.global.date.getTime()==Time.NIGHT?"夜晚":"黄昏"))+" "+WeatherUtil.getName()));
((Label)self.getItem()).setText(((RPG.global.date.getTime()==Time.DAY?"上午":(RPG.global.date.getTime()==Time.NIGHT?"夜晚":"黄昏"))+" "+RPG.ctrl.weather.getName()));
}});
frames.add($.add(new Label("",18).setWidth(1000).right(true).setPos(383, 525)).appendTo(ld).setColor(1,1,1,0).addAction(Actions.fadeIn(0.7f)),new GdxQueryRunnable() {public void run(GdxQuery self) {
((Label)self.getItem()).setText("游戏已进行"+TimeUtil.getGameRunningTime());
}});
$.add(hr=Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"hr.png")).setPosition(-200, 490).appendTo(leftBar).setColor(1,1,1,0).addAction(Actions.delay(0.2f, Actions.parallel(Actions.fadeIn(0.1f),Actions.moveTo(20, 490,0.1f))));
$.add(hr=Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"hr.png")).setPosition(-200, 490).appendTo(leftBar).setColor(1,1,1,0).addAction(Actions.delay(0.2f, Actions.parallel(Actions.fadeIn(0.1f),Actions.moveTo(20, 490,0.1f))));
frames.add($.add(new Label("",24).setWidth(1000)).setPosition(-300, 357).appendTo(ld).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(0.3f),Actions.moveTo(75,357,0.5f,Interpolation.pow2Out))),new GdxQueryRunnable() {public void run(GdxQuery self) {
((Label)self.getItem()).setText((String)RPG.maps.getProp().get("name")+"["+RPG.ctrl.hero.getHeadHero().mapx+","+RPG.ctrl.hero.getHeadHero().mapy+"]");
}});
@@ -90,14 +90,14 @@ public View init() {
frames.add($.add(new Label("",16).setWidth(1000)).setPosition(-300, 215).appendTo(ld).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(0.3f),Actions.moveTo(80,215,0.5f,Interpolation.pow2Out))),new GdxQueryRunnable() {public void run(GdxQuery self) {
((Label)self.getItem()).setText("任务模块制作中");
}});
$.add(exit=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"ico_exit.png"),Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"ico_exit_p.png"))).setPosition(-100, 510).fadeOut().addAction(Actions.parallel(Actions.fadeIn(0.5f),Actions.moveTo(20, 510,0.6f,Interpolation.pow2Out))).onClick(new Runnable() {
$.add(exit=new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_NEW_GLOBAL+"ico_exit.png"),Res.getDrawable(Setting.IMAGE_MENU_NEW_GLOBAL+"ico_exit_p.png"))).setPosition(-100, 510).fadeOut().addAction(Actions.parallel(Actions.fadeIn(0.5f),Actions.moveTo(20, 510,0.6f,Interpolation.pow2Out))).onClick(new Runnable() {
public void run() {
Music.playSE("snd210.wav");
onkeyDown(Keys.ESCAPE);
}
}).appendTo(leftBar);
final Label menuLabel=new Label("", 32);
$.add(new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"button.png"),Setting.UI_BUTTON).setFg(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"btn_more.png"))).onClick(new Runnable() {public void run() {
$.add(new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_NEW_GLOBAL+"button.png"),Setting.UI_BUTTON).setFg(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"btn_more.png"))).onClick(new Runnable() {public void run() {
status=true;
ld.addAction(Actions.parallel(Actions.moveTo(-500, 0,0.5f,Interpolation.exp5),Actions.fadeOut(0.2f)));
leftBar.addAction(Actions.moveTo(-230,0,0.5f,Interpolation.pow4));
@@ -109,18 +109,18 @@ public void run() {

final GdxQuery table=$.add(new Table()).appendTo($.add(new ScrollPane(null)).appendTo(stage).setPosition(-250, 0).setSize(220, 475).addAction(Actions.moveTo(-10,0,0.5f,Interpolation.pow4)).getItem());
CheckBoxStyle cstyle=new CheckBoxStyle();
cstyle.checkboxOff=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"button.png");
cstyle.checkboxOn=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"menu_button_select.png");
cstyle.checkboxOff=Res.getDrawable(Setting.IMAGE_MENU_NEW_GLOBAL+"button.png");
cstyle.checkboxOn=Res.getDrawable(Setting.IMAGE_MENU_NEW_GLOBAL+"menu_button_select.png");
for(int i=0;i<MenuController.generate().size();i++){
final boolean firstFlag=i==0;
final Menu currentMenu=MenuController.generate().get(i);
$.add(new CheckBox("", cstyle,1).setFgOff(85).setForeground(Res.getNP(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"m_"+currentMenu.fileName+".png"))).appendTo(table.getItem()).run(new GdxQueryRunnable() {public void run(final GdxQuery self) {
$.add(new CheckBox("", cstyle,1).setFgOff(85).setForeground(Res.getNP(Setting.IMAGE_MENU_NEW_GLOBAL+"m_"+currentMenu.fileName+".png"))).appendTo(table.getItem()).run(new GdxQueryRunnable() {public void run(final GdxQuery self) {
self.onClick(new Runnable() {public void run() {
for(Actor box:table.children().getItems())
$.add(box).not(self.getItem()).setChecked(false).addAction(Actions.moveTo(21, box.getY(),0.1f,Interpolation.pow4)).setDisabled(false).run(new GdxQueryRunnable() {public void run(GdxQuery self2) {
if(self2.length()!=0) ((CheckBox)self2.getItem()).setOther(null);
}});
((CheckBox)self.getItem()).setOther(Res.getNP(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"menu_button_box.png")).setOtherPosition(160, -12);
((CheckBox)self.getItem()).setOther(Res.getNP(Setting.IMAGE_MENU_NEW_GLOBAL+"menu_button_box.png")).setOtherPosition(160, -12);
self.cleanActions().addAction(Actions.moveTo(40, self.getY(),0.2f,Interpolation.pow4Out)).setDisabled(true).setChecked(true);
menuLabel.text(currentMenu.name);
if(currentMenu.view != null){
@@ -138,10 +138,10 @@ public void run() {
}}).setSize(179, 76);
}
}}).appendTo(ld).setSize(370, 50).setPosition(-100, 20).addAction(Actions.moveTo(23, 20, .5f,Interpolation.pow2Out)).getCell().prefSize(370,50);
$.add(new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"button.png"),Setting.UI_BUTTON).setFg(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"btn_save.png"))).onClick(new Runnable() {public void run() {
$.add(new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_NEW_GLOBAL+"button.png"),Setting.UI_BUTTON).setFg(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"btn_save.png"))).onClick(new Runnable() {public void run() {
RPG.hover.add(SaveView.class);
}}).appendTo(ld).setSize(172, 76).setPosition(-100, 90).addAction(Actions.moveTo(23, 90, 0.5f,Interpolation.pow2Out)).getCell().prefSize(172,76);
$.add(new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"button.png"),Setting.UI_BUTTON).setFg(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"btn_load.png"))).onClick(new Runnable() {public void run() {
$.add(new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_NEW_GLOBAL+"button.png"),Setting.UI_BUTTON).setFg(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"btn_load.png"))).onClick(new Runnable() {public void run() {
RPG.hover.add(LoadView.class);
}}).appendTo(ld).setSize(172, 76).setPosition(0, 90).addAction(Actions.moveTo(221, 90, 0.5f,Interpolation.pow2Out)).getCell().prefSize(172,76);
boxs=new ArrayList<GdxQuery>();//角色框
@@ -154,10 +154,10 @@ public void run() {
((MenuHeroBox) self.getItem()).setSelect(true);
$.add(fgGroup).children().removeAll();
Hero hero=((MenuHeroBox) self.getItem()).hero;
$.add(Res.get(Setting.GAME_RES_IMAGE_FG+hero.fgname+"/Normal.png")).appendTo(fgGroup).setScaleX(-0.33f).setScaleY(0.33f).setOrigin(Align.bottomLeft).setPosition(1200, 0).setColor(0,0,0,0).addAction(Actions.parallel(Actions.color(new Color(0,0,0,0.3f),1f),Actions.moveTo(1030, 0,0.75f,Interpolation.pow2Out)));
$.add(Res.get(Setting.GAME_RES_IMAGE_FG+hero.fgname+"/Normal.png")).appendTo(fgGroup).setScaleX(-0.33f).setScaleY(0.33f).setOrigin(Align.bottomLeft).setPosition(1200, 0).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(0.5f),Actions.moveTo(1000, 0,0.7f,Interpolation.pow2Out)));
if(hero.prop.get("dead").equals(Hero.TRUE)) $.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"dead.png")).appendTo(fgGroup).setOrigin(Align.bottomLeft).setPosition(1200, 5).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(0.5f),Actions.moveTo(650, 50,0.7f,Interpolation.pow2Out)));
if(!status) $.add(Res.get(Setting.GAME_RES_IMAGE_FG+hero.fgname+"/card.png")).appendTo(fgGroup).setOrigin(Align.bottomLeft).setPosition(1200, 80).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(0.6f),Actions.moveTo(520, 80,0.6f,Interpolation.pow2Out))).setUserObject("card");
$.add(Res.get(Setting.IMAGE_FG+hero.fgname+"/Normal.png")).appendTo(fgGroup).setScaleX(-0.33f).setScaleY(0.33f).setOrigin(Align.bottomLeft).setPosition(1200, 0).setColor(0,0,0,0).addAction(Actions.parallel(Actions.color(new Color(0,0,0,0.3f),1f),Actions.moveTo(1030, 0,0.75f,Interpolation.pow2Out)));
$.add(Res.get(Setting.IMAGE_FG+hero.fgname+"/Normal.png")).appendTo(fgGroup).setScaleX(-0.33f).setScaleY(0.33f).setOrigin(Align.bottomLeft).setPosition(1200, 0).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(0.5f),Actions.moveTo(1000, 0,0.7f,Interpolation.pow2Out)));
if(hero.prop.get("dead").equals(Hero.TRUE)) $.add(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"dead.png")).appendTo(fgGroup).setOrigin(Align.bottomLeft).setPosition(1200, 5).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(0.5f),Actions.moveTo(650, 50,0.7f,Interpolation.pow2Out)));
if(!status) $.add(Res.get(Setting.IMAGE_FG+hero.fgname+"/card.png")).appendTo(fgGroup).setOrigin(Align.bottomLeft).setPosition(1200, 80).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(0.6f),Actions.moveTo(520, 80,0.6f,Interpolation.pow2Out))).setUserObject("card");

current=((MenuHeroBox)self.getItem()).hero;
}
@@ -56,7 +56,7 @@ public class SpellCardView extends IMenuView{
SpellCard spell=new TipSpellCard();
public View init() {
add=new ParticleEffect();
add.load(Gdx.files.internal(Setting.GAME_RES_PARTICLE+"addp.p"),Gdx.files.internal(Setting.GAME_RES_PARTICLE));
add.load(Gdx.files.internal(Setting.PARTICLE+"addp.p"),Gdx.files.internal(Setting.PARTICLE));
add.setPosition(845, 261);


@@ -66,13 +66,13 @@ public View init() {
stage=new Stage(new ScalingViewport(Scaling.stretch, GameUtil.screen_width, GameUtil.screen_height, new OrthographicCamera()),MenuView.stage.getBatch());


Image bg=Res.get(Setting.GAME_RES_IMAGE_MENU_SC+"bg.png");
Image bg=Res.get(Setting.IMAGE_MENU_SC+"bg.png");
bg.setColor(1,1,1,0);
bg.setPosition(160,28);
bg.addAction(Actions.fadeIn(0.2f));
stage.addActor(bg);

ImageButton left=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"left.png"),Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"lefts.png"));
ImageButton left=new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"left.png"),Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"lefts.png"));
left.setPosition(262, 383);
left.addListener(new InputListener(){
public void touchUp (InputEvent event, float x, float y, int pointer, int b) {
@@ -84,7 +84,7 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b
});
stage.addActor(left);

ImageButton right=new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"right.png"),Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"rights.png"));
ImageButton right=new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"right.png"),Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"rights.png"));
right.setPosition(395, 383);
right.addListener(new InputListener(){
public void touchUp (InputEvent event, float x, float y, int pointer, int b) {
@@ -99,7 +99,7 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b

ListStyle style=new ListStyle();
style.font=FontUtil.generateFont(" ".toCharArray()[0], 22);
style.selection=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"equipsel.png");
style.selection=Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"equipsel.png");
style.fontColorSelected=Color.valueOf("f5e70c");
elist=new com.rpsg.rpg.system.ui.List<SpellCard>(style);
elist.onClick(new Runnable() {
@@ -112,8 +112,8 @@ public void run() {
generateLists();
elist.layout();
ScrollPane pane=new ScrollPane(elist);
pane.getStyle().vScroll=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"scrollbar.png");
pane.getStyle().vScrollKnob=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_EQUIP+"scrollbarin.png");
pane.getStyle().vScroll=Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"scrollbar.png");
pane.getStyle().vScrollKnob=Res.getDrawable(Setting.IMAGE_MENU_EQUIP+"scrollbarin.png");
pane.setForceScroll(false, true);
pane.layout();
Table table=new Table();
@@ -139,7 +139,7 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b
});
stage.addActor(mask);

scuse=Res.get(Setting.GAME_RES_IMAGE_MENU_SC+"sc_use.png");
scuse=Res.get(Setting.IMAGE_MENU_SC+"sc_use.png");
scuse.loaded= new Runnable() {
@Override
public void run() {
@@ -190,7 +190,7 @@ public boolean touchDown (InputEvent event, float x, float y, int pointer, int b
}
});
sellist.offsetX2=20;
sellist.getItems().add(new ListItem("使用").setUserObject(Res.get(Setting.GAME_RES_IMAGE_ICONS+"yes.png")).setRunnable(new Runnable() {
sellist.getItems().add(new ListItem("使用").setUserObject(Res.get(Setting.IMAGE_ICONS+"yes.png")).setRunnable(new Runnable() {
@Override
public void run() {
scfor.visible = true;
@@ -199,7 +199,7 @@ public void run() {
layer = 2;
}
}));
sellist.getItems().add(new ListItem("取消").setUserObject(Res.get(Setting.GAME_RES_IMAGE_ICONS+"no.png")).setRunnable(new Runnable() {
sellist.getItems().add(new ListItem("取消").setUserObject(Res.get(Setting.IMAGE_ICONS+"no.png")).setRunnable(new Runnable() {
@Override
public void run() {
can.run();
@@ -214,13 +214,13 @@ public void run() {
sellist.setItemHeight(27);
sellist.padTop=2;
stage.addActor(mask2);
scfor=Res.get(Setting.GAME_RES_IMAGE_MENU_SC+"sc_for.png");
scfor=Res.get(Setting.IMAGE_MENU_SC+"sc_for.png");
scfor.setPosition(500, 87);


herolist=new com.rpsg.rpg.system.ui.List<ListItem>(style);
herolist.offsetX2=20;
herolist.getItems().add(new ListItem("取消").setUserObject(Res.get(Setting.GAME_RES_IMAGE_ICONS+"no.png")));
herolist.getItems().add(new ListItem("取消").setUserObject(Res.get(Setting.IMAGE_ICONS+"no.png")));
for (Hero h : RPG.ctrl.hero.heros) {
herolist.getItems().add(new ListItem(h.name).setUserObject(h));
}
@@ -33,7 +33,7 @@ public class StatusView extends DefaultIView {
public View init() {
stage=new Stage(new ScalingViewport(Scaling.stretch, GameUtil.screen_width, GameUtil.screen_height, new OrthographicCamera()),MenuView.stage.getBatch());
group=(Group) $.add(new Group()).setHeight(1750).getItem();
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"menu_fg_shadow.png").disableTouch()).appendTo(group).setPosition(50, y(30)).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(.3f),Actions.moveTo(50, y(180),0.3f,Interpolation.pow4Out)));
$.add(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"menu_fg_shadow.png").disableTouch()).appendTo(group).setPosition(50, y(30)).setColor(1,1,1,0).addAction(Actions.parallel(Actions.fadeIn(.3f),Actions.moveTo(50, y(180),0.3f,Interpolation.pow4Out)));
inner=(Group) $.add(new Group()).setHeight(1750).appendTo(group).getItem();
pane=(ScrollPane) $.add(new ScrollPane(group)).setSize(GameUtil.screen_width-190, GameUtil.screen_height).setX(190).appendTo(stage).getItem();
// stage.setDebugAll(true);
@@ -43,28 +43,28 @@ public View init() {

private void generate() {
inner.clear();
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"m_right.png")).appendTo(inner).setPosition(570, y(150)).onClick(new Runnable() {public void run() {
$.add(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"m_right.png")).appendTo(inner).setPosition(570, y(150)).onClick(new Runnable() {public void run() {
next();
}}).addAction(Actions.fadeIn(0.2f)).setColor(1,1,1,0);
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_GLOBAL+"m_right.png")).setScaleX(-1).appendTo(inner).setPosition(36, y(150)).onClick(new Runnable() {public void run() {
$.add(Res.get(Setting.IMAGE_MENU_NEW_GLOBAL+"m_right.png")).setScaleX(-1).appendTo(inner).setPosition(36, y(150)).onClick(new Runnable() {public void run() {
prev();
}}).addAction(Actions.fadeIn(0.2f)).setColor(1,1,1,0);
$.add(new Label(parent.current.name,parent.current.name.length()>7?50:60).align(306, y(90))).appendTo(inner).addAction(Actions.fadeIn(0.2f)).setColor(1,1,1,0);;
$.add(new Label(parent.current.jname,30).align(326, y(155)).setPad(-8)).setColor(1,1,1,0f).appendTo(inner).addAction(Actions.color(new Color(1,1,1,0.3f),0.2f));

Group group=(Group) $.add(new Group()).setX(70).addAction(Actions.parallel(Actions.moveTo(70,y(320),0.5f,Interpolation.pow4Out),Actions.fadeIn(0.4f))).setColor(1, 1, 1,0).appendTo(inner).getItem();
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"info.png")).appendTo(group);
$.add(Res.get(Setting.IMAGE_MENU_NEW_STATUS+"info.png")).appendTo(group);
$.add(new Label(parent.current.prop.get("level")+"",60).align(40, 90)).appendTo(group);
$.add(new Label(parent.current.tag+"",20).align(60, 28)).appendTo(group).setColor(1,1,1,0.5f);
$.add(Res.get(Setting.UI_BASE_IMG)).setSize(327,27).setPosition(142, 75).appendTo(group);
$.add(Res.get(Setting.UI_BASE_PRO)).setSize(0,27).setPosition(142, 75).appendTo(group).setColor(Color.valueOf("c33737")).addAction(Actions.delay(0.3f,Actions.sizeTo(((float)parent.current.prop.get("exp")/(float)parent.current.prop.get("maxexp"))*327, 27,0.4f,Interpolation.pow4Out)));
$.add(new Label(parent.current.prop.get("exp")+"/"+parent.current.prop.get("maxexp"),20).align(300, 97).setPad(-5)).appendTo(group).setColor(Color.valueOf("3bb740"));
$.add(new Label(parent.current.prop.get("level")+1+"",20).align(485, 88)).appendTo(group);
$.add(new Label(parent.current.lead?"无信息":parent.current.association.name+"(等级"+parent.current.association.level+")",20).align(320, 65)).appendTo(group);
$.add(new ImageButton(Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"more_soc_info.png"), Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"more_soc_info_p.png"))).appendTo(group).setX(142);
$.add(new ImageButton(Res.getDrawable(Setting.IMAGE_MENU_NEW_STATUS+"more_soc_info.png"), Res.getDrawable(Setting.IMAGE_MENU_NEW_STATUS+"more_soc_info_p.png"))).appendTo(group).setX(142);

Group group2=(Group) $.add(new Group()).setX(70).addAction(Actions.parallel(Actions.moveTo(70,y(420),0.7f,Interpolation.pow4Out),Actions.fadeIn(0.4f))).setColor(1, 1, 1,0).appendTo(inner).getItem();
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"info2.png")).appendTo(group2);
$.add(Res.get(Setting.IMAGE_MENU_NEW_STATUS+"info2.png")).appendTo(group2);
$.add(Res.get(Setting.UI_BASE_IMG)).setSize(245,24).setPosition(120, 48).appendTo(group2);
$.add(Res.get(Setting.UI_BASE_PRO)).setSize(0,18).setPosition(123, 51).appendTo(group2).setColor(Color.valueOf("c33737")).addAction(Actions.delay(0.4f,Actions.sizeTo(((float)parent.current.prop.get("hp")/(float)parent.current.prop.get("maxhp"))*239, 18,0.6f,Interpolation.pow4Out)));
$.add(Res.get(Setting.UI_BASE_IMG)).setSize(245,24).setPosition(120, 8).appendTo(group2);
@@ -73,7 +73,7 @@ private void generate() {
$.add(new Label(parent.current.prop.get("mp")+"/"+parent.current.prop.get("maxmp"),22).align(438, 28).setPad(-8)).appendTo(group2);

Group group3=(Group) $.add(new Group()).setX(70).addAction(Actions.parallel(Actions.moveTo(70,y(558),0.8f,Interpolation.pow4Out),Actions.fadeIn(0.4f))).setColor(1, 1, 1,0).appendTo(inner).getItem();
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"info3.png")).appendTo(group3);
$.add(Res.get(Setting.IMAGE_MENU_NEW_STATUS+"info3.png")).appendTo(group3);
$.add(new Label(parent.current.prop.get("attack")+"",22).align(170, 103).setPad(-8)).appendTo(group3);
$.add(new Label(parent.current.prop.get("defense")+"",22).align(435, 103).setPad(-8)).appendTo(group3);
$.add(new Label(parent.current.prop.get("magicAttack")+"",22).align(170, 65).setPad(-8)).appendTo(group3);
@@ -82,7 +82,7 @@ private void generate() {
$.add(new Label(parent.current.prop.get("hit")+"",22).align(435, 27).setPad(-8)).appendTo(group3);

Group group4=(Group) $.add(new Group()).setX(70).addAction(Actions.parallel(Actions.moveTo(70,y(1032),1f,Interpolation.pow4Out),Actions.fadeIn(0.4f))).setColor(1, 1, 1,0).appendTo(inner).getItem();
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"equipbox.png")).appendTo(group4);
$.add(Res.get(Setting.IMAGE_MENU_NEW_STATUS+"equipbox.png")).appendTo(group4);
int yoff=0;
for(String key:parent.current.equips.keySet()){
Equipment equip=parent.current.equips.get(key);
@@ -93,21 +93,21 @@ private void generate() {
}

Group group5=(Group) $.add(new Group()).setX(70).addAction(Actions.parallel(Actions.moveTo(70,y(1442),1f,Interpolation.pow4Out),Actions.fadeIn(0.4f))).setColor(1, 1, 1,0).appendTo(inner).getItem();
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"p.png")).appendTo(group5);
$.add(Res.get(Setting.IMAGE_MENU_NEW_STATUS+"p.png")).appendTo(group5);
int count=-1;
for(String key:parent.current.resistance.keySet())
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+parent.current.resistance.get(key).name()+".png")).appendTo(group5).setPosition(38+(174*(++count%3)), 247-(count>=3 && count <6?115:count>=6?228:0));
$.add(Res.get(Setting.IMAGE_MENU_NEW_STATUS+parent.current.resistance.get(key).name()+".png")).appendTo(group5).setPosition(38+(174*(++count%3)), 247-(count>=3 && count <6?115:count>=6?228:0));
CheckBoxStyle cstyle=new CheckBoxStyle();
cstyle.checkboxOff=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"help.png");
cstyle.checkboxOn=Res.getDrawable(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"help_p.png");// help button press
final Image phelp=(Image) $.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"p_help.png")).appendTo(group5).setColor(1,1,1,0).getItem();//resistance help button
cstyle.checkboxOff=Res.getDrawable(Setting.IMAGE_MENU_NEW_STATUS+"help.png");
cstyle.checkboxOn=Res.getDrawable(Setting.IMAGE_MENU_NEW_STATUS+"help_p.png");// help button press
final Image phelp=(Image) $.add(Res.get(Setting.IMAGE_MENU_NEW_STATUS+"p_help.png")).appendTo(group5).setColor(1,1,1,0).getItem();//resistance help button
$.add(new CheckBox("", cstyle, 1)).appendTo(group5).setPosition(392,342).run(new GdxQueryRunnable() {public void run(final GdxQuery self) {self.onClick(new Runnable() {public void run() {
phelp.addAction(self.isChecked()?Actions.fadeIn(0.3f):Actions.fadeOut(0.3f));
}});}});

if(parent.current.lead){
Group group6=(Group) $.add(new Group()).setX(70).addAction(Actions.parallel(Actions.moveTo(70,y(1702),1f,Interpolation.pow4Out),Actions.fadeIn(0.4f))).setColor(1, 1, 1,0).appendTo(inner).getItem();
$.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"person.png")).appendTo(group6);
$.add(Res.get(Setting.IMAGE_MENU_NEW_STATUS+"person.png")).appendTo(group6);
$.add(Res.get(Setting.UI_BASE_IMG)).setSize(420,24).setPosition(87, 159).appendTo(group6);
$.add(Res.get(Setting.UI_BASE_PRO)).setSize(0,18).setPosition(90, 162).appendTo(group6).setColor(Color.valueOf("717171")).addAction(Actions.delay(0.4f,Actions.sizeTo(((float)parent.current.prop.get("courage")/100f)*414, 18,0.6f,Interpolation.pow4Out)));
$.add(Res.get(Setting.UI_BASE_IMG)).setSize(420,24).setPosition(87, 121).appendTo(group6);
@@ -118,7 +118,7 @@ private void generate() {
$.add(Res.get(Setting.UI_BASE_PRO)).setSize(0,18).setPosition(90, 48).appendTo(group6).setColor(Color.valueOf("717171")).addAction(Actions.delay(0.4f,Actions.sizeTo(((float)parent.current.prop.get("perseverance")/100f)*414, 18,0.6f,Interpolation.pow4Out)));
$.add(Res.get(Setting.UI_BASE_IMG)).setSize(420,24).setPosition(87, 7).appendTo(group6);
$.add(Res.get(Setting.UI_BASE_PRO)).setSize(0,18).setPosition(90, 10).appendTo(group6).setColor(Color.valueOf("717171")).addAction(Actions.delay(0.4f,Actions.sizeTo(((float)parent.current.prop.get("knowledge")/100f)*414, 18,0.6f,Interpolation.pow4Out)));
final Image pe_help=(Image) $.add(Res.get(Setting.GAME_RES_IMAGE_MENU_NEW_STATUS+"person_help.png")).appendTo(group6).setColor(1,1,1,0).getItem();//resistance help button
final Image pe_help=(Image) $.add(Res.get(Setting.IMAGE_MENU_NEW_STATUS+"person_help.png")).appendTo(group6).setColor(1,1,1,0).getItem();//resistance help button
$.add(new CheckBox("", cstyle, 1)).appendTo(group6).setPosition(392,190).run(new GdxQueryRunnable() {public void run(final GdxQuery self) {self.onClick(new Runnable() {public void run() {
pe_help.addAction(self.isChecked()?Actions.fadeIn(0.3f):Actions.fadeOut(0.3f));
}});}});
@@ -49,20 +49,20 @@ public View init() {
Table table = new Table();

TextButtonStyle butstyle=new TextButtonStyle();
butstyle.over=butstyle.checkedOver=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"button_RPG.hover.png");
butstyle.down=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"button_active.png");
butstyle.up=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"button.png");
butstyle.over=butstyle.checkedOver=Res.getDrawable(Setting.IMAGE_GLOBAL+"button_RPG.hover.png");
butstyle.down=Res.getDrawable(Setting.IMAGE_GLOBAL+"button_active.png");
butstyle.up=Res.getDrawable(Setting.IMAGE_GLOBAL+"button.png");

CheckBoxStyle cs=new CheckBoxStyle();
cs.checkboxOff=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"optb_s.png");
cs.checkboxOn=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"optb.png");
cs.checkboxOff=Res.getDrawable(Setting.IMAGE_GLOBAL+"optb_s.png");
cs.checkboxOn=Res.getDrawable(Setting.IMAGE_GLOBAL+"optb.png");

SliderStyle slsty=new SliderStyle();
slsty.background=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"sliderbar.png");
slsty.knob=Res.getDrawable(Setting.GAME_RES_IMAGE_GLOBAL+"slider.png");
slsty.background=Res.getDrawable(Setting.IMAGE_GLOBAL+"sliderbar.png");
slsty.knob=Res.getDrawable(Setting.IMAGE_GLOBAL+"slider.png");

WidgetGroup group=new WidgetGroup();
group.addActor(Res.get(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"savebar.png"));
group.addActor(Res.get(Setting.IMAGE_MENU_SYSTEM+"savebar.png"));
Label lvl=new Label("LV "+RPG.ctrl.hero.getHeadHero().prop.get("level"),40).setWidth(1000).setPad(-15);
lvl.setPosition(360, 190);
group.addActor(lvl);
@@ -125,7 +125,7 @@ public void run(Object view) {
table.row();

WidgetGroup group2=new WidgetGroup();
group2.addActor(Res.get(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"graphics.png"));
group2.addActor(Res.get(Setting.IMAGE_MENU_SYSTEM+"graphics.png"));
final CheckBox box=new CheckBox("", cs,22);
box.setPosition(190,276);
group2.addActor(box.onClick(new Runnable() {
@@ -154,7 +154,7 @@ public void run() {
table.row();

WidgetGroup group3=new WidgetGroup();
group3.addActor(Res.get(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"performance.png"));
group3.addActor(Res.get(Setting.IMAGE_MENU_SYSTEM+"performance.png"));
final Slider sd1=new Slider(256, 1024, 1, false, slsty);
sd1.setStrEnd(" MB").setLabelful(true).setPosition(200, 135);
sd1.setWidth(620);
@@ -177,7 +177,7 @@ public void run() {
table.row();

WidgetGroup group4=new WidgetGroup();
group4.addActor(Res.get(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"sound.png"));
group4.addActor(Res.get(Setting.IMAGE_MENU_SYSTEM+"sound.png"));
final Slider sd2=new Slider(0, 100, 1, false, slsty);
sd2.setStrEnd(" %").setLabelful(true).setPosition(200, 165);
sd2.setWidth(620);
@@ -212,7 +212,7 @@ public void run() {
table.row();

WidgetGroup group5=new WidgetGroup();
group5.addActor(Res.get(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"game.png"));
group5.addActor(Res.get(Setting.IMAGE_MENU_SYSTEM+"game.png"));
ttest=new Label(ttstr, 26);
ttest.setWidth(1000).setPosition(200, 663);
group5.addActor(ttest);
@@ -264,7 +264,7 @@ public void run() {
table.row();

WidgetGroup group6=new WidgetGroup();
group6.addActor(Res.get(Setting.GAME_RES_IMAGE_MENU_SYSTEM+"about.png"));
group6.addActor(Res.get(Setting.IMAGE_MENU_SYSTEM+"about.png"));
Label gamever=new Label(Setting.GAME_VERSION,23).setWidth(1000).setPad(-7);
gamever.setPosition(405,811);
group6.addActor(gamever);
@@ -283,7 +283,7 @@ public void run() {
try {
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http://www.rpsg-team.com");
} catch (Exception e) {
AlertUtil.add("无法正确打开网页。", AlertUtil.Red);
RPG.putMessage("无法正确打开网页。", AlertUtil.Red);
}
}
});
@@ -377,7 +377,7 @@ public void draw(SpriteBatch batch) {
}
int step=0;
int stepmax=1;
String ttstr=Setting.GAME_MENU_SYSTEM_TEST_MESSAGE;
String ttstr=Setting.MENU_SYSTEM_TEST_MESSAGE;
public void logic() {
stage.act();
lvl5.setText(TimeUtil.getGameRunningTime());