Magic_Ling_Pixel_Dungeon/src/com/shatteredpixel/shatteredpixeldungeon/Chrome.java

68 lines
1.8 KiB
Java
Raw Normal View History

2014-07-27 13:39:07 +00:00
/*
* Pixel Dungeon
2015-06-12 20:44:04 +00:00
* Copyright (C) 2012-2015 Oleg Dolya
*
* Shattered Pixel Dungeon
* Copyright (C) 2014-2015 Evan Debenham
2014-07-27 13:39:07 +00:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon;
2014-07-27 13:39:07 +00:00
import com.watabou.noosa.NinePatch;
public class Chrome {
public enum Type {
TOAST,
TOAST_TR,
WINDOW,
BUTTON,
TAG,
GEM,
SCROLL,
TAB_SET,
TAB_SELECTED,
TAB_UNSELECTED
2014-07-27 13:39:07 +00:00
};
public static NinePatch get( Type type ) {
String Asset = Assets.CHROME;
2014-07-27 13:39:07 +00:00
switch (type) {
case WINDOW:
return new NinePatch( Asset, 0, 0, 20, 20, 6 );
2014-07-27 13:39:07 +00:00
case TOAST:
return new NinePatch( Asset, 22, 0, 18, 18, 5 );
2014-07-27 13:39:07 +00:00
case TOAST_TR:
return new NinePatch( Asset, 40, 0, 18, 18, 5 );
2014-07-27 13:39:07 +00:00
case BUTTON:
2015-11-10 09:19:04 +00:00
return new NinePatch( Asset, 58, 0, 6, 6, 2 );
2014-07-27 13:39:07 +00:00
case TAG:
return new NinePatch( Asset, 22, 18, 16, 14, 3 );
2014-07-27 13:39:07 +00:00
case GEM:
return new NinePatch( Asset, 0, 32, 32, 32, 13 );
2014-07-27 13:39:07 +00:00
case SCROLL:
return new NinePatch( Asset, 32, 32, 32, 32, 5, 11, 5, 11 );
2014-07-27 13:39:07 +00:00
case TAB_SET:
return new NinePatch( Asset, 64, 0, 20, 20, 6 );
2014-07-27 13:39:07 +00:00
case TAB_SELECTED:
return new NinePatch( Asset, 65, 22, 8, 13, 3, 7, 3, 5 );
2014-07-27 13:39:07 +00:00
case TAB_UNSELECTED:
return new NinePatch( Asset, 75, 22, 8, 13, 3, 7, 3, 5 );
2014-07-27 13:39:07 +00:00
default:
return null;
}
}
}