Skip to content

Commit

Permalink
[added] InputMultiplexer getProcessors().
Browse files Browse the repository at this point in the history
[added] Skin load().
  • Loading branch information
nathan.sweet committed Nov 6, 2011
1 parent 1cfbc42 commit 58ad40c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
8 changes: 8 additions & 0 deletions gdx/src/com/badlogic/gdx/InputMultiplexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ public void clear () {
processors.clear();
}

public void setProcessors (ArrayList<InputProcessor> processors) {
this.processors = processors;
}

public ArrayList<InputProcessor> getProcessors () {
return processors;
}

public boolean keyDown (int keycode) {
for (int i = 0, n = processors.size(); i < n; i++)
if (processors.get(i).keyDown(keycode)) return true;
Expand Down
2 changes: 1 addition & 1 deletion gdx/src/com/badlogic/gdx/math/Interpolation.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

package com.badlogic.gdx.math;

/** Function that takes a linear value in the range of 0-1 and outputs a (usually) non-linear interpolated value. */
/** Takes a linear value in the range of 0-1 and outputs a (usually) non-linear, interpolated value. */
public abstract class Interpolation {
abstract public float apply (float a);

Expand Down
10 changes: 5 additions & 5 deletions gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Skin.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,16 @@ public Skin () {

public Skin (FileHandle skinFile, FileHandle textureFile) {
texture = new Texture(textureFile);
try {
getJsonLoader(skinFile).fromJson(Skin.class, skinFile);
} catch (SerializationException ex) {
throw new SerializationException("Error reading file: " + skinFile, ex);
}
load(skinFile);
}

public Skin (FileHandle skinFile, Texture texture) {
this.texture = texture;
texture.setFilter(TextureFilter.Linear, TextureFilter.Linear);
load(skinFile);
}

public void load (FileHandle skinFile) {
try {
getJsonLoader(skinFile).fromJson(Skin.class, skinFile);
} catch (SerializationException ex) {
Expand Down

0 comments on commit 58ad40c

Please sign in to comment.