-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show dragged items in realtime for all users.
also updates cursor with dragging coordinates while dragging ( mosuemove + pointermove events dont fire during item drag. fixes mini-game performance by spawning at most 20 pickups
- Loading branch information
Showing
11 changed files
with
62 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
angular-frontend/src/app/components/dragged-item/dragged-item.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="dragged-item" [ngClass]="'ghost-item'"> | ||
<img [alt]="itemDragInfo" [src]="'assets/items/' + itemDragInfo.name + '.png'"/> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
angular-frontend/src/app/components/dragged-item/dragged-item.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.ghost-item { | ||
width:50px; | ||
height:50px; | ||
border-radius:9px; | ||
margin:3px; | ||
border-width:2px; | ||
border-style: dashed; | ||
border-color: gray; | ||
} |
12 changes: 12 additions & 0 deletions
12
angular-frontend/src/app/components/dragged-item/dragged-item.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {Component, Input} from '@angular/core'; | ||
import {ItemDragInfo} from "../../../model"; | ||
|
||
@Component({ | ||
selector: 'app-dragged-item', | ||
templateUrl: './dragged-item.component.html', | ||
styleUrls: ['./dragged-item.component.scss'] | ||
}) | ||
export class DraggedItemComponent { | ||
@Input() | ||
itemDragInfo!: ItemDragInfo | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,4 +88,5 @@ export interface ItemDragInfo { | |
posX: number; | ||
posY: number; | ||
finished : boolean; | ||
draggingPlayer : string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters