generated from maximegris/angular-electron
-
-
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.
- Loading branch information
Showing
3 changed files
with
64 additions
and
4 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
31 changes: 28 additions & 3 deletions
31
src/app/shared/components/input-sprite/input-sprite.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 |
---|---|---|
@@ -1,12 +1,37 @@ | ||
<div class="flex flex-row items-center"> | ||
|
||
<app-sprite class="w-16 mr-4 bg-gray-400 p-1" [sprite]="sprite()" [type]="type()"></app-sprite> | ||
<app-sprite class="w-17 mr-4 bg-gray-400 p-1" [sprite]="sprite()" [type]="type()"></app-sprite> | ||
|
||
<div class="relative"> | ||
<div class="relative flex"> | ||
<app-input-floating-label>Sprite</app-input-floating-label> | ||
<input class="flex-1" [(ngModel)]="sprite" min="0" [step]="step()" type="number" placeholder="Choose sprite..." | ||
class="input input-sm input-bordered w-full max-w-xs" /> | ||
|
||
<app-input-floating-label>Sprite</app-input-floating-label> | ||
<button class="ml-1 btn btn-secondary btn-sm" (click)="changeIcon()"> | ||
<ng-icon name="heroArrowTopRightOnSquare"></ng-icon> | ||
</button> | ||
</div> | ||
|
||
</div> | ||
|
||
<dialog #iconPicker class="modal"> | ||
<div class="modal-box w-11/12 max-w-5xl"> | ||
<h3 class="text-lg font-bold mb-2">Icon Picker</h3> | ||
|
||
<div class="relative flex flex-wrap overflow-y-scroll max-h-[70vh]"> | ||
@for(icon of iconArray(); track $index) { | ||
<app-sprite | ||
class="bg-gray-400 p-1 flex-1 m-2 min-w-[70px] min-h-[70px] max-w-[70px] max-h-[70px] outline-2 outline-offset-2 hover:outline-dashed outline-primary" | ||
[class.outline]="icon === pickerSprite()" [sprite]="icon" [type]="type()" | ||
(click)="pickerSprite.set(icon)"></app-sprite> | ||
} | ||
</div> | ||
|
||
<div class="modal-action mt-2"> | ||
<form method="dialog"> | ||
<button class="btn btn-sm">Close</button> | ||
<button class="ml-2 btn btn-primary btn-sm" (click)="confirmNewIcon(pickerSprite())">Pick</button> | ||
</form> | ||
</div> | ||
</div> | ||
</dialog> |
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