1
1
package states .editors ;
2
2
3
+ import openfl .display .BitmapData ;
3
4
import online .states .SkinsState ;
4
5
import flixel .FlxObject ;
5
6
import flixel .graphics .FlxGraphic ;
6
7
import flixel .animation .FlxAnimation ;
7
8
import flixel .graphics .frames .FlxAtlasFrames ;
8
- import flixel .system .debug .interaction .tools .Pointer .GraphicCursorCross ;
9
9
import flixel .addons .ui .FlxUI ;
10
10
import flixel .addons .ui .FlxUICheckBox ;
11
11
import flixel .addons .ui .FlxUIInputText ;
@@ -25,6 +25,9 @@ import objects.HealthBar;
25
25
import sys .FileSystem ;
26
26
#end
27
27
28
+ @:bitmap (" assets/images/debugger/cursorCross.png" )
29
+ class FlixelGraphicCursorCross extends BitmapData {}
30
+
28
31
class CharacterEditorState extends MusicBeatState {
29
32
var char : Character ;
30
33
var ghostChar : Character ;
@@ -110,11 +113,11 @@ class CharacterEditorState extends MusicBeatState {
110
113
charLayer = new FlxTypedGroup <Character >();
111
114
add (charLayer );
112
115
113
- var pointer : FlxGraphic = FlxGraphic .fromClass (GraphicCursorCross );
116
+ var pointer : FlxGraphic = FlxGraphic .fromClass (FlixelGraphicCursorCross );
114
117
cameraFollowPointer = new FlxSprite ().loadGraphic (pointer );
115
- cameraFollowPointer .setGraphicSize (40 , 40 );
116
- cameraFollowPointer .updateHitbox ();
118
+ updateCamPointerZoom ();
117
119
cameraFollowPointer .color = FlxColor .WHITE ;
120
+ cameraFollowPointer .antialiasing = false ; // global antialiasing is set by psych online to true
118
121
add (cameraFollowPointer );
119
122
120
123
changeBGbutton = new FlxButton (FlxG .width - 360 , 25 , " " , function () {
@@ -1026,8 +1029,8 @@ class CharacterEditorState extends MusicBeatState {
1026
1029
}
1027
1030
y - = 100 - char .cameraPosition [1 ];
1028
1031
1029
- x - = cameraFollowPointer .width / 2 ;
1030
- y - = cameraFollowPointer .height / 2 ;
1032
+ // x -= cameraFollowPointer.width / 2;
1033
+ // y -= cameraFollowPointer.height / 2;
1031
1034
cameraFollowPointer .setPosition (x , y );
1032
1035
}
1033
1036
@@ -1233,17 +1236,20 @@ class CharacterEditorState extends MusicBeatState {
1233
1236
1234
1237
if (FlxG .keys .justPressed .R ) {
1235
1238
FlxG .camera .zoom = 1 ;
1239
+ updateCamPointerZoom ();
1236
1240
}
1237
1241
1238
1242
if (FlxG .keys .pressed .E && FlxG .camera .zoom < 3 ) {
1239
1243
FlxG .camera .zoom + = elapsed * FlxG .camera .zoom ;
1240
1244
if (FlxG .camera .zoom > 3 )
1241
1245
FlxG .camera .zoom = 3 ;
1246
+ updateCamPointerZoom ();
1242
1247
}
1243
1248
if (FlxG .keys .pressed .Q && FlxG .camera .zoom > 0.1 ) {
1244
1249
FlxG .camera .zoom - = elapsed * FlxG .camera .zoom ;
1245
1250
if (FlxG .camera .zoom < 0.1 )
1246
1251
FlxG .camera .zoom = 0.1 ;
1252
+ updateCamPointerZoom ();
1247
1253
}
1248
1254
1249
1255
if (FlxG .keys .pressed .I || FlxG .keys .pressed .J || FlxG .keys .pressed .K || FlxG .keys .pressed .L ) {
@@ -1332,6 +1338,12 @@ class CharacterEditorState extends MusicBeatState {
1332
1338
super .update (elapsed );
1333
1339
}
1334
1340
1341
+ function updateCamPointerZoom () {
1342
+ cameraFollowPointer .setGraphicSize (40 / FlxG .camera .zoom , 40 / FlxG .camera .zoom );
1343
+ cameraFollowPointer .updateHitbox ();
1344
+ cameraFollowPointer .offset .set (cameraFollowPointer .frameWidth / 2 , cameraFollowPointer .frameHeight / 2 );
1345
+ }
1346
+
1335
1347
var _file : FileReference ;
1336
1348
1337
1349
/* private function saveOffsets()
0 commit comments