public void addTexture(String file) {
Texture texture = new Texture(Gdx.files.internal(file), true);
texture.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
if(ExterminateGame.useGL3) {
texture.setFilter(TextureFilter.MipMapLinearLinear, TextureFilter.Linear);
}
else {
texture.setFilter(TextureFilter.MipMapLinearNearest, TextureFilter.Linear);
}
if(ltid==0) {
textureHerbe = texture;
}
else if(ltid==1) {
textureSand = texture;
}
else if(ltid==2) {
textureDirt = texture;
}
else if(ltid==3) {
textureRock = texture;
}
ltid++;
}
java类com.badlogic.gdx.graphics.Texture.TextureWrap的实例源码
Biome.java 文件源码
项目:exterminate
阅读 25
收藏 0
点赞 0
评论 0
SpriteRenderer.java 文件源码
项目:RavTech
阅读 31
收藏 0
点赞 0
评论 0
@Override
public void write (Json json) {
super.write(json);
json.writeValue("width", width);
json.writeValue("height", height);
json.writeValue("texture", texturePath);
if (regionName != null)
json.writeValue(regionName);
json.writeValue("srcX", srcX);
json.writeValue("srcY", srcY);
json.writeValue("srcWidth", srcWidth);
json.writeValue("srcHeight", srcHeight);
json.writeValue("originX", originX);
json.writeValue("originY", originY);
json.writeValue("minFilter", minFilter == TextureFilter.Linear ? "Linear" : "Nearest");
json.writeValue("magFilter", magFilter == TextureFilter.Linear ? "Linear" : "Nearest");
JsonUtil.writeColorToJson(json, color, "tint");
json.writeValue("uWrap",
uWrap == TextureWrap.ClampToEdge ? "ClampToEdge" : uWrap == TextureWrap.Repeat ? "Repeat" : "MirroredRepeat");
json.writeValue("vWrap",
vWrap == TextureWrap.ClampToEdge ? "ClampToEdge" : vWrap == TextureWrap.Repeat ? "Repeat" : "MirroredRepeat");
}
PowerLUT.java 文件源码
项目:DoubleHelix
阅读 25
收藏 0
点赞 0
评论 0
/** W power will be in luminance, and H power will be in alpha**/
public PowerLUT(float powerW, float intensityW, float powerH, float intensityH, int width, int height){
Pixmap pixmap = new Pixmap(width, height, Format.RGBA8888);
for (int i=0; i<width; i++){
float valueW = (float)Math.pow((float)i/width, powerW) * intensityW;
for (int j = 0; j < height; j++) {
float valueH = (float)Math.pow((float)j/height, powerH) * intensityH;
pixmap.setColor(valueW, valueH, 1.0f, 1.0f);
pixmap.drawPixel(i, j);
}
}
PixmapTextureData data = new PixmapTextureData(pixmap, Format.RGBA8888, false, false, true);
texture = new Texture(data);
texture.setWrap(TextureWrap.ClampToEdge, TextureWrap.ClampToEdge);
texture.setFilter(TextureFilter.Linear, TextureFilter.Linear);
}
OrthogonalTiledMapRendererWithObjects.java 文件源码
项目:swampmachine
阅读 27
收藏 0
点赞 0
评论 0
public OrthogonalTiledMapRendererWithObjects(TiledMap map) {
super(map);
this.occlusionFbo = new FrameBuffer(Format.RGBA8888, Gdx.graphics.getWidth() / 2, Gdx.graphics.getHeight() / 2, false);
this.shadowmapFbo = new FrameBuffer(Format.RGBA8888, Gdx.graphics.getWidth() / 2, 1, false);
this.shadowmapTex = shadowmapFbo.getColorBufferTexture();
this.shadowmapTex.setFilter(TextureFilter.Linear, TextureFilter.Linear);
this.shadowmapTex.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
//this.orthoCam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
//this.orthoCam.setToOrtho(Y_DOWN);
this.lights = new ArrayList<Light>();
this.mouseLight = new Light(0, 0, Color.WHITE);
}
SpriteManager.java 文件源码
项目:Crazy-Driver-VideoGame
阅读 28
收藏 0
点赞 0
评论 0
public SpriteManager(CrazyDriver game){
//poner donde empieza el coche en 150 x y en 0 y
car = new Car(ResourceManager.getAtlas("imagenes")
.findRegion("car_up"), 150, 0);
//instancia los arrays de amigos y enemigos
enemies=new Array<Enemy>();
friends=new Array<Friend>();
objetos=new Array<Objetos>();
//esto es para que el fondo de mueva
texture = new Texture(Gdx.files.internal("suelo/tunnel_road.jpg"));
texture.setWrap(TextureWrap.Repeat,TextureWrap.Repeat);
sprite = new Sprite(texture, 0, 0, 512, 512);
//genero aleatoriamente peatones
//generarPersonas();
generarObjetos();
this.game = game;
}
PostProcessor.java 文件源码
项目:RuinsOfRevenge
阅读 22
收藏 0
点赞 0
评论 0
public PostProcessor( int fboWidth, int fboHeight, boolean useDepth, boolean useAlphaChannel, boolean use32Bits,
TextureWrap u, TextureWrap v ) {
if( use32Bits ) {
if( useAlphaChannel ) {
fbFormat = Format.RGBA8888;
} else {
fbFormat = Format.RGB888;
}
} else {
if( useAlphaChannel ) {
fbFormat = Format.RGBA4444;
} else {
fbFormat = Format.RGB565;
}
}
composite = newPingPongBuffer( fboWidth, fboHeight, fbFormat, useDepth );
setBufferTextureWrap( u, v );
pipelineState = new PipelineState();
capturing = false;
hasCaptured = false;
enabled = true;
this.useDepth = useDepth;
}
bo.java 文件源码
项目:ingress-indonesia-dev
阅读 38
收藏 0
点赞 0
评论 0
public static void b()
{
try
{
aj.a("PlayerCompassVisuals.createResources");
boolean bool = f.b();
if (!bool)
return;
c.a("CreateXmpRingMesh", c.e("scanner/emp_ring.obj"), new bp());
c.a("CreatePlayerCompassTexture", c.b("scanner/compass_ring.png", true), Texture.TextureFilter.MipMapNearestLinear, Texture.TextureFilter.Linear, Texture.TextureWrap.Repeat, Texture.TextureWrap.ClampToEdge, new bq());
ad.a("CreatePlayerCompassShader", "attribute vec4 a_position;\nattribute vec2 a_texCoord0;\nuniform mat4 u_modelViewProject;\nuniform vec2 u_uvScale;\nuniform vec3 u_bearing;\nuniform vec2 u_bearingThreshold;\nuniform vec4 u_color;\nuniform vec4 u_bearingColor;\nvarying vec2 v_texCoord0;\nvarying vec4 v_bearingColor;\nvoid main() {\n v_texCoord0 = u_uvScale * a_texCoord0;\n vec3 normalizedPos = normalize(a_position.xyz);\n float bearingDot = dot(normalizedPos, u_bearing); float bearingStrength = (bearingDot - u_bearingThreshold.x) * u_bearingThreshold.y; v_bearingColor = mix(u_color, u_bearingColor, clamp(bearingStrength, 0.0, 1.0));\n gl_Position = u_modelViewProject * a_position;\n}\n", "#ifdef GL_ES\nprecision mediump float;\n#endif\nuniform sampler2D u_texture;\nvarying vec4 v_bearingColor;\nvarying vec2 v_texCoord0;\nvoid main() {\n gl_FragColor = v_bearingColor + texture2D(u_texture, v_texCoord0);\n}\n", new br());
f.c();
return;
}
finally
{
aj.b();
}
}
aw.java 文件源码
项目:ingress-indonesia-dev
阅读 21
收藏 0
点赞 0
评论 0
public static void a(boolean paramBoolean)
{
try
{
aj.a("InterferenceVisuals.createResources");
boolean bool = i.a(paramBoolean);
if (!bool)
return;
VertexAttribute[] arrayOfVertexAttribute = new VertexAttribute[1];
arrayOfVertexAttribute[0] = new VertexAttribute(0, 2, "a_position");
c.a("CreateInterferenceMesh", a.a(c, d, null, arrayOfVertexAttribute), new ax());
c.a("CreateInterferenceTexture", c.b("scanner/zeroxm_static.png", false), Texture.TextureFilter.Linear, Texture.TextureFilter.Linear, Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat, new ay());
c.a("CreateInterferenceNoiseTexture", c.b("scanner/zeroxm_static_noise.png", false), Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest, Texture.TextureWrap.Repeat, Texture.TextureWrap.Repeat, new az());
ad.a("CreateInterferenceShader", "attribute vec2 a_position;\nuniform vec2 u_uvBias;\nvarying vec2 v_texCoord0;\nvarying vec2 v_texCoord1;\nvarying vec2 v_texCoord2;\nvoid main() {\n v_texCoord0 = a_position.xy;\n v_texCoord1 = u_uvBias + a_position.xy;\n v_texCoord2 = u_uvBias - a_position.xy;\n gl_Position = vec4(a_position.xy * 2.0 - 1.0, 1, 1);\n}\n", "#ifdef GL_ES\nprecision mediump float;\n#endif\nuniform sampler2D u_texture;\nuniform sampler2D u_textureNoise;\nuniform float u_rampTarget;\nuniform vec3 u_noiseColor;\nvarying vec2 v_texCoord0;\nvarying vec2 v_texCoord1;\nvarying vec2 v_texCoord2;\nvoid main() {\n vec4 scans = texture2D(u_texture, v_texCoord0);\n vec4 noise_down = texture2D(u_textureNoise, v_texCoord1);\n vec4 noise_up = texture2D(u_textureNoise, v_texCoord2);\n float flicker_alpha = abs(noise_down.a - u_rampTarget); flicker_alpha = flicker_alpha < 0.15 ? 0.0 : flicker_alpha * 0.6;\n gl_FragColor = vec4(mix(scans.aaa, noise_up.aaa, 0.5) * u_noiseColor, flicker_alpha);\n}\n", new ba());
i.c();
return;
}
finally
{
aj.b();
}
}
BouncingBuffer.java 文件源码
项目:gdx-gfx
阅读 24
收藏 0
点赞 0
评论 0
public BouncingBuffer(Format format, int width, int height, boolean hasDepth) {
buffer1 = new BouncyBuffer(format, width, height, hasDepth);
buffer2 = new BouncyBuffer(format, width, height, hasDepth);
current = buffer1;
this.width = this.buffer1.getWidth();
this.height = this.buffer1.getHeight();
this.uWrap = TextureWrap.ClampToEdge;
this.vWrap = TextureWrap.ClampToEdge;
rebind();
}
BouncingBuffer.java 文件源码
项目:gdx-gfx
阅读 19
收藏 0
点赞 0
评论 0
public void setTextureWrap(TextureWrap u, TextureWrap v) {
this.uWrap = u;
this.vWrap = v;
texture1.setWrap(u, v);
texture2.setWrap(u, v);
}
PostProcessor.java 文件源码
项目:exterminate
阅读 26
收藏 0
点赞 0
评论 0
/** Construct a new PostProcessor with the given parameters and the specified texture wrap mode */
public PostProcessor (int fboWidth, int fboHeight, boolean useDepth, boolean fsaa, boolean useAlphaChannel, boolean use32Bits,
TextureWrap u, TextureWrap v) {
if (use32Bits) {
if (useAlphaChannel) {
fbFormat = Format.RGBA8888;
} else {
fbFormat = Format.RGB888;
}
} else {
if (useAlphaChannel) {
fbFormat = Format.RGBA4444;
} else {
fbFormat = Format.RGB565;
}
}
composite = newPingPongBuffer(fboWidth, fboHeight, fbFormat, useDepth, fsaa);
setBufferTextureWrap(u, v);
pipelineState = new PipelineState();
capturing = false;
hasCaptured = false;
enabled = true;
this.useDepth = useDepth;
if (useDepth) {
clearBits |= GL20.GL_DEPTH_BUFFER_BIT;
}
setViewport(null);
}
PostProcessor.java 文件源码
项目:exterminate
阅读 29
收藏 0
点赞 0
评论 0
public void setBufferTextureWrap (TextureWrap u, TextureWrap v) {
compositeWrapU = u;
compositeWrapV = v;
composite.texture1.setWrap(compositeWrapU, compositeWrapV);
composite.texture2.setWrap(compositeWrapU, compositeWrapV);
}
TexturePacker_Base.java 文件源码
项目:cachebox3.0
阅读 19
收藏 0
点赞 0
评论 0
private String getRepeatValue() {
if (settings.wrapX == TextureWrap.Repeat && settings.wrapY == TextureWrap.Repeat)
return "xy";
if (settings.wrapX == TextureWrap.Repeat && settings.wrapY == TextureWrap.ClampToEdge)
return "x";
if (settings.wrapX == TextureWrap.ClampToEdge && settings.wrapY == TextureWrap.Repeat)
return "y";
return "none";
}
SpriteRenderer.java 文件源码
项目:RavTech
阅读 27
收藏 0
点赞 0
评论 0
@Override
public void read (Json json, JsonValue jsonData) {
super.read(json, jsonData);
if (jsonData.has("width"))
width = jsonData.getFloat("width");
if (jsonData.has("height"))
height = jsonData.getFloat("height");
if (jsonData.has("texture"))
texturePath = jsonData.getString("texture");
if (jsonData.has("srcX")) {
useCustomSrc = true;
srcX = jsonData.getInt("srcX");
}
if (jsonData.has("srcY"))
srcY = jsonData.getInt("srcY");
if (jsonData.has("srcWidth"))
srcWidth = jsonData.getInt("srcWidth");
if (jsonData.has("srcHeight"))
srcHeight = jsonData.getInt("srcHeight");
if (jsonData.has("originX"))
originX = jsonData.getFloat("originX");
if (jsonData.has("originY"))
originY = jsonData.getFloat("originY");
if (jsonData.has("minFilter"))
minFilter = jsonData.getString("minFilter").equals("Linear") ? TextureFilter.Linear : TextureFilter.Nearest;
if (jsonData.has("magFilter"))
magFilter = jsonData.getString("magFilter").equals("Linear") ? TextureFilter.Linear : TextureFilter.Nearest;
if (jsonData.has("tint"))
setColor(JsonUtil.readColorFromJson(jsonData, "tint"));
if (jsonData.has("uWrap")) {
String uWrapStrings = jsonData.getString("uWrap");
uWrap = uWrapStrings.equals("ClampToEdge") ? TextureWrap.ClampToEdge
: uWrapStrings.equals("Repeat") ? TextureWrap.Repeat : TextureWrap.MirroredRepeat;
}
if (jsonData.has("vWrap")) {
String vWrapStrings = jsonData.getString("vWrap");
vWrap = vWrapStrings.equals("ClampToEdge") ? TextureWrap.ClampToEdge
: vWrapStrings.equals("Repeat") ? TextureWrap.Repeat : TextureWrap.MirroredRepeat;
}
}
GdxGraphicsImpl.java 文件源码
项目:inari-firefly-libGDX
阅读 24
收藏 0
点赞 0
评论 0
private TextureWrap getLibGDXTextureWrap( int glConst ) {
for ( TextureWrap tw : TextureWrap.values() ) {
if ( tw.getGLEnum() == glConst ) {
return tw;
}
}
return TextureWrap.Repeat;
}
GameScreen.java 文件源码
项目:Crazy-Car-Race
阅读 25
收藏 0
点赞 0
评论 0
@Override
public void create() {
// set game speed
int sh = Gdx.graphics.getHeight();
if(MainGame.level == 1 && MainGame.debug){
speed = sh / 200;
}
else if(MainGame.level == 2 && MainGame.debug){
speed = sh / 80;
}
else if(MainGame.level == 3 && MainGame.debug){
speed = sh / 30;
}
else if(MainGame.level == 1){
speed = sh / 100;
}else if(MainGame.level == 2){
speed = sh / 80;
}else if(MainGame.level == 3){
speed = sh / 60;
}
//set user score
MainGame.scoreCurrent = 0;
if (MainGame.scoreHigh == null) MainGame.scoreHigh = 0;
camera = new OrthoCamera();
entityManager = new EntityManager();
//For background img
px = new Pixmap(Gdx.files.internal("background.png"));
backgroundImg1 = new Texture(px);
backgroundImg1.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
backgroundImg2 = backgroundImg1;
}
PostProcessor.java 文件源码
项目:braingdx
阅读 19
收藏 0
点赞 0
评论 0
/**
* Construct a new PostProcessor with the given parameters and the specified texture wrap mode
*/
public PostProcessor(int fboWidth, int fboHeight, boolean useDepth, boolean useAlphaChannel, boolean use32Bits,
TextureWrap u, TextureWrap v) {
if (use32Bits) {
if (useAlphaChannel) {
fbFormat = Format.RGBA8888;
} else {
fbFormat = Format.RGB888;
}
} else {
if (useAlphaChannel) {
fbFormat = Format.RGBA4444;
} else {
fbFormat = Format.RGB565;
}
}
composite = newPingPongBuffer(fboWidth, fboHeight, fbFormat, useDepth);
setBufferTextureWrap(u, v);
pipelineState = new PipelineState();
capturing = false;
hasCaptured = false;
enabled = true;
this.useDepth = useDepth;
if (useDepth) {
clearBits |= GL20.GL_DEPTH_BUFFER_BIT;
}
setViewport(null);
}
PostProcessor.java 文件源码
项目:braingdx
阅读 30
收藏 0
点赞 0
评论 0
public void setBufferTextureWrap(TextureWrap u, TextureWrap v) {
compositeWrapU = u;
compositeWrapV = v;
composite.texture1.setWrap(compositeWrapU, compositeWrapV);
composite.texture2.setWrap(compositeWrapU, compositeWrapV);
}
SpriteMapper.java 文件源码
项目:taloonerrl
阅读 24
收藏 0
点赞 0
评论 0
private Texture loadTexture(final String fileName) {
final Texture texture = new Texture(Gdx.files.internal(fileName), false);
texture.setFilter(TextureFilter.Nearest, TextureFilter.Nearest);
texture.setWrap(TextureWrap.ClampToEdge, TextureWrap.ClampToEdge);
toDispose.add(texture);
return texture;
}
GdxTextureUtil.java 文件源码
项目:nvlist
阅读 24
收藏 0
点赞 0
评论 0
/**
* Converts {@link GLTilingMode} to its equivalent {@link TextureWrap}.
*/
public static TextureWrap toGdxWrap(GLTilingMode mode) {
switch (mode) {
case CLAMP: return TextureWrap.ClampToEdge;
case REPEAT: return TextureWrap.Repeat;
}
throw new IllegalArgumentException("Unsupported tiling mode: " + mode);
}
GdxTextureStoreTest.java 文件源码
项目:nvlist
阅读 36
收藏 0
点赞 0
评论 0
/**
* Check that the generated {@link TextureParameter} matches the corresponding {@link IImageDefinition}
* settings for that texture.
*/
@Test
public void testLoadParams() {
FilePath imagePath = FilePath.of("img/loadparams/loadparams.png");
Texture tex = texStore.get(imagePath).get();
Assert.assertNotNull(tex);
Assert.assertEquals(TextureFilter.MipMapLinearLinear, tex.getMinFilter());
Assert.assertEquals(TextureFilter.Nearest, tex.getMagFilter());
Assert.assertEquals(TextureWrap.ClampToEdge, tex.getUWrap());
Assert.assertEquals(TextureWrap.Repeat, tex.getVWrap());
}
DesktopRunner.java 文件源码
项目:GoingUnder
阅读 26
收藏 0
点赞 0
评论 0
private static void createAtlasWidgets() {
Settings settings = new Settings();
settings.minHeight = 512;
settings.minWidth = 512;
settings.maxHeight = 512;
settings.maxWidth = 512;
settings.paddingY = 2;
settings.paddingX = 2;
settings.wrapY = TextureWrap.Repeat;
TexturePacker2.process(settings,
//"D:\\gamepictures\\widgets\\",
"D:\\gamepictures\\widgets\\redjavolak",
"D:/MySelf/Android/Workspace/HgRepo/GoingUnder/assets/atlases", "widgets");
}
DesktopRunner.java 文件源码
项目:GoingUnder
阅读 21
收藏 0
点赞 0
评论 0
private static void createAtlas() {
Settings settings = new Settings();
settings.minHeight = 512;
settings.minWidth = 512;
settings.maxHeight = 512;
settings.maxWidth = 512;
settings.paddingY = 2;
settings.paddingX = 2;
settings.wrapY = TextureWrap.Repeat;
TexturePacker2.process(settings,
"D:\\gamepictures\\2\\",
"D:/MySelf/Android/Workspace/HgRepo/GoingUnder/assets/atlases", "game");
}
FloatFrameBuffer.java 文件源码
项目:libgdxcn
阅读 29
收藏 0
点赞 0
评论 0
/** Override this method in a derived class to set up the backing texture as you like. */
protected void setupTexture () {
FloatTextureData data = new FloatTextureData(width, height);
colorTexture = new Texture(data);
if (Gdx.app.getType() == ApplicationType.Desktop || Gdx.app.getType() == ApplicationType.Applet)
colorTexture.setFilter(TextureFilter.Linear, TextureFilter.Linear);
else
// no filtering for float textures in OpenGL ES
colorTexture.setFilter(TextureFilter.Nearest, TextureFilter.Nearest);
colorTexture.setWrap(TextureWrap.ClampToEdge, TextureWrap.ClampToEdge);
}
TextureAtlas.java 文件源码
项目:libgdxcn
阅读 33
收藏 0
点赞 0
评论 0
public Page (FileHandle handle, float width, float height, boolean useMipMaps, Format format, TextureFilter minFilter,
TextureFilter magFilter, TextureWrap uWrap, TextureWrap vWrap) {
this.width = width;
this.height = height;
this.textureFile = handle;
this.useMipMaps = useMipMaps;
this.format = format;
this.minFilter = minFilter;
this.magFilter = magFilter;
this.uWrap = uWrap;
this.vWrap = vWrap;
}
GLTexture.java 文件源码
项目:libgdxcn
阅读 30
收藏 0
点赞 0
评论 0
/** Sets the {@link TextureWrap} for this texture on the u and v axis. Assumes the texture is bound and active!
* @param u the u wrap
* @param v the v wrap
* @param force True to always set the values, even if they are the same as the current values. */
public void unsafeSetWrap (TextureWrap u, TextureWrap v, boolean force) {
if (u != null && (force || uWrap != u)) {
Gdx.gl.glTexParameterf(glTarget, GL20.GL_TEXTURE_WRAP_S, u.getGLEnum());
uWrap = u;
}
if (v != null && (force || vWrap != v)) {
Gdx.gl.glTexParameterf(glTarget, GL20.GL_TEXTURE_WRAP_T, v.getGLEnum());
vWrap = v;
}
}
GLTexture.java 文件源码
项目:libgdxcn
阅读 26
收藏 0
点赞 0
评论 0
/** Sets the {@link TextureWrap} for this texture on the u and v axis. This will bind this texture!
* @param u the u wrap
* @param v the v wrap */
public void setWrap (TextureWrap u, TextureWrap v) {
this.uWrap = u;
this.vWrap = v;
bind();
Gdx.gl.glTexParameterf(glTarget, GL20.GL_TEXTURE_WRAP_S, u.getGLEnum());
Gdx.gl.glTexParameterf(glTarget, GL20.GL_TEXTURE_WRAP_T, v.getGLEnum());
}
Cubemap.java 文件源码
项目:libgdxcn
阅读 21
收藏 0
点赞 0
评论 0
/** Construct a Cubemap with the specified {@link TextureData}'s for the sides */
public Cubemap (TextureData positiveX, TextureData negativeX, TextureData positiveY, TextureData negativeY,
TextureData positiveZ, TextureData negativeZ) {
super(GL20.GL_TEXTURE_CUBE_MAP);
minFilter = TextureFilter.Nearest;
magFilter = TextureFilter.Nearest;
uWrap = TextureWrap.ClampToEdge;
vWrap = TextureWrap.ClampToEdge;
data = new FacedCubemapData(positiveX, negativeX, positiveY, negativeY, positiveZ, negativeZ);
load(data);
}
DiplomacyRenderSystem.java 文件源码
项目:ShapeOfThingsThatWere
阅读 26
收藏 0
点赞 0
评论 0
public DiplomacyRenderSystem(OrthographicCamera camera, SpriteBatch batch) {
super(with(Diplomacy.class), camera, batch);
arrow = new Texture("textures/arrow.png");
arrow.setWrap(TextureWrap.Repeat, TextureWrap.ClampToEdge);
textureRatio = arrow.getHeight() / ARROW_HEIGHT;
}
ControlsWindow.java 文件源码
项目:gaiasky
阅读 32
收藏 0
点赞 0
评论 0
public ControlsWindow(String title, Skin skin, Stage ui) {
super(title, skin);
this.setName(title);
this.skin = skin;
this.ui = ui;
/** Global resources **/
TextureRegion septexreg = ((TextureRegionDrawable) skin.newDrawable("separator")).getRegion();
septexreg.getTexture().setWrap(TextureWrap.Repeat, TextureWrap.ClampToEdge);
this.separator = new TiledDrawable(septexreg);
EventManager.instance.subscribe(this, Events.TOGGLE_TIME_CMD, Events.GUI_SCROLL_POSITION_CMD, Events.GUI_FOLD_CMD, Events.GUI_MOVE_CMD, Events.RECALCULATE_OPTIONS_SIZE);
}