|
@@ -21,13 +21,20 @@ public class layerEditFrame extends JFrame {
|
21
|
21
|
boolean changedStateSinceSave = false;
|
22
|
22
|
byte[] frame;
|
23
|
23
|
int li;
|
|
24
|
+ boolean finish = false;
|
|
25
|
+ cubeWorker worker = null;
|
|
26
|
+ int animI;
|
|
27
|
+ int frameI;
|
24
|
28
|
|
25
|
29
|
// Ende Attribute
|
26
|
30
|
|
27
|
|
- public layerEditFrame(byte[] f, int layerIndex) {
|
|
31
|
+ public layerEditFrame(int animIndex, int frameIndex, int layerIndex, cubeWorker work) {
|
28
|
32
|
// Frame-Initialisierung
|
29
|
|
- super("Layer Edit");
|
30
|
|
- frame = f;
|
|
33
|
+ super("Layer Edit");
|
|
34
|
+ worker = work;
|
|
35
|
+ animI = animIndex;
|
|
36
|
+ frameI = frameIndex;
|
|
37
|
+ frame = worker.getFrame(animIndex, frameIndex);
|
31
|
38
|
li = layerIndex;
|
32
|
39
|
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
33
|
40
|
int frameWidth = 180;
|
|
@@ -121,7 +128,10 @@ public class layerEditFrame extends JFrame {
|
121
|
128
|
}
|
122
|
129
|
|
123
|
130
|
byte[] getFinalFrame(){
|
124
|
|
- return frame;
|
|
131
|
+ if (finish == false) {
|
|
132
|
+ return null;
|
|
133
|
+ }
|
|
134
|
+ return frame;
|
125
|
135
|
}
|
126
|
136
|
|
127
|
137
|
public void btnClicked(int i, int j){
|
|
@@ -156,7 +166,7 @@ public class layerEditFrame extends JFrame {
|
156
|
166
|
}
|
157
|
167
|
frame = tmpFrame;
|
158
|
168
|
dispose();
|
159
|
|
-
|
|
169
|
+ worker.setFrame(frame, animI, frameI);
|
160
|
170
|
}
|
161
|
171
|
|
162
|
172
|
private int saveExitDialog() {
|