Started creating GuiEditKeyframe

Therefore, added support for floating point numbers in GuiNumberInput
This commit is contained in:
CrushedPixel
2015-05-20 16:40:54 +02:00
parent ce9e717d21
commit 4754ecc6bf
18 changed files with 248 additions and 52 deletions

View File

@@ -1,9 +1,14 @@
package eu.crushedpixel.replaymod.holders;
public class Keyframe {
public class Keyframe implements Cloneable {
private final int realTimestamp;
@Override
public Object clone() {
return new Keyframe(realTimestamp);
}
public Keyframe(int realTimestamp) {
this.realTimestamp = realTimestamp;
}

View File

@@ -6,6 +6,11 @@ public class PositionKeyframe extends Keyframe {
private Position position;
@Override
public Object clone() {
return new PositionKeyframe(this.getRealTimestamp(), this.getPosition());
}
public PositionKeyframe(int realTime, Position position) {
super(realTime);
this.position = position;

View File

@@ -6,6 +6,11 @@ public class TimeKeyframe extends Keyframe {
private final int timestamp;
@Override
public Object clone() {
return new TimeKeyframe(this.getRealTimestamp(), this.getTimestamp());
}
public TimeKeyframe(int realTime, int timestamp) {
super(realTime);
this.timestamp = timestamp;