Revision f404152d
Added by Leszek Koltunski 12 months ago
src/main/java/org/distorted/bandaged/BandagedCreatorView.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package org.distorted.bandaged; |
11 | 11 |
|
12 |
import android.annotation.SuppressLint; |
|
12 | 13 |
import android.app.ActivityManager; |
13 | 14 |
import android.content.Context; |
14 | 15 |
import android.content.pm.ConfigurationInfo; |
... | ... | |
19 | 20 |
|
20 | 21 |
import com.google.firebase.crashlytics.FirebaseCrashlytics; |
21 | 22 |
|
22 |
import org.distorted.library.main.DistortedScreen; |
|
23 |
|
|
24 | 23 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
25 | 24 |
|
26 | 25 |
public class BandagedCreatorView extends GLSurfaceView |
... | ... | |
53 | 52 |
{ |
54 | 53 |
BandagedCreatorActivity act = (BandagedCreatorActivity)context; |
55 | 54 |
mRenderer = new BandagedCreatorRenderer(this); |
56 |
DistortedScreen screen = mRenderer.getScreen(); |
|
57 |
mTouchControl = new BandagedCreatorTouchControl( mRenderer.getObjectRatio() , screen.getFOV() ); |
|
55 |
mTouchControl = mRenderer.createTouchControl(); |
|
58 | 56 |
|
59 | 57 |
final ActivityManager activityManager= (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
60 | 58 |
|
... | ... | |
105 | 103 |
return mRenderer; |
106 | 104 |
} |
107 | 105 |
|
108 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
109 |
|
|
110 |
public void setCubits(BandagedCubit[] cubits, int x, int y, int z) |
|
111 |
{ |
|
112 |
mTouchControl.setCubits(cubits,x,y,z); |
|
113 |
} |
|
114 |
|
|
115 | 106 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
116 | 107 |
|
117 | 108 |
public void resetCubits() |
... | ... | |
321 | 312 |
|
322 | 313 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
323 | 314 |
|
315 |
@SuppressLint("ClickableViewAccessibility") |
|
324 | 316 |
@Override |
325 | 317 |
public boolean onTouchEvent(MotionEvent event) |
326 | 318 |
{ |
Also available in: Unified diff
Introduce 'BandagedObject' - an abstraction and a step towards creator of Bandaged Pyraminxes.