67
67
import phasereditor .scene .core .TextureComponent ;
68
68
import phasereditor .scene .core .TransformComponent ;
69
69
import phasereditor .scene .ui .editor .undo .WorldSnapshotOperation ;
70
+ import phasereditor .ui .ColorUtil ;
70
71
import phasereditor .ui .ZoomCanvas ;
71
72
72
73
/**
@@ -102,7 +103,7 @@ public SceneCanvas(Composite parent, int style) {
102
103
addMouseMoveListener (this );
103
104
104
105
init_DND ();
105
-
106
+
106
107
setZoomWhenShiftPressed (false );
107
108
}
108
109
@@ -280,6 +281,9 @@ private void renderBorders(GC gc, ZoomCalculator calc) {
280
281
}
281
282
282
283
private void renderSelection (GC gc ) {
284
+
285
+ var selectionColor = SWTResourceManager .getColor (ColorUtil .GREENYELLOW .rgb );
286
+
283
287
for (var obj : _selection ) {
284
288
if (obj instanceof ObjectModel ) {
285
289
var model = (ObjectModel ) obj ;
@@ -294,19 +298,27 @@ private void renderSelection(GC gc) {
294
298
295
299
var merge = SceneObjectRenderer .joinBounds (bounds , childrenBounds );
296
300
297
- gc .setAlpha (150 );
298
- gc .setForeground (getDisplay ().getSystemColor (SWT .COLOR_GREEN ));
301
+ gc .setForeground (selectionColor );
299
302
300
303
gc .drawPolygon (new int [] { (int ) merge [0 ], (int ) merge [1 ], (int ) merge [2 ], (int ) merge [3 ],
301
304
(int ) merge [4 ], (int ) merge [5 ], (int ) merge [6 ], (int ) merge [7 ] });
302
- gc .setAlpha (255 );
303
305
}
304
306
305
307
}
306
308
}
307
309
308
310
if (bounds != null ) {
309
- gc .setForeground (getDisplay ().getSystemColor (SWT .COLOR_BLUE ));
311
+ gc .setLineWidth (3 );
312
+ gc .setAlpha (150 );
313
+ gc .setForeground (SWTResourceManager .getColor (SWT .COLOR_BLACK ));
314
+
315
+ gc .drawPolygon (new int [] { (int ) bounds [0 ], (int ) bounds [1 ], (int ) bounds [2 ], (int ) bounds [3 ],
316
+ (int ) bounds [4 ], (int ) bounds [5 ], (int ) bounds [6 ], (int ) bounds [7 ] });
317
+
318
+ gc .setAlpha (255 );
319
+ gc .setLineWidth (1 );
320
+
321
+ gc .setForeground (selectionColor );
310
322
gc .drawPolygon (new int [] { (int ) bounds [0 ], (int ) bounds [1 ], (int ) bounds [2 ], (int ) bounds [3 ],
311
323
(int ) bounds [4 ], (int ) bounds [5 ], (int ) bounds [6 ], (int ) bounds [7 ] });
312
324
}
0 commit comments