Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 0 additions & 144 deletions engine/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 47 additions & 4 deletions pixelot/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pixelot/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ToolbarComponent } from './toolbar/toolbar.component';
import { AddEntityDialog, AddLayerDialog, LeftSidebarComponent } from './left-sidebar/left-sidebar.component';
import { AddComponentDialog, RightSidebarComponent } from './right-sidebar/right-sidebar.component';
import { AddComponentDialog, RightSidebarComponent, AddAssetDialog } from './right-sidebar/right-sidebar.component';
import { NavbarComponent } from './navbar/navbar.component';
import { SceneTabComponent } from './scene-tab/scene-tab.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
Expand Down Expand Up @@ -35,6 +35,7 @@ import { LandingComponent } from './landing/landing.component';
import { OpenProjectDialogComponent } from './open-project-dialog/open-project-dialog.component';
import { NewProjectDialogComponent } from './new-project-dialog/new-project-dialog.component';
import { DragDropModule } from '@angular/cdk/drag-drop';
import {MatSelectModule} from '@angular/material/select';

@NgModule({
declarations: [
Expand All @@ -43,6 +44,7 @@ import { DragDropModule } from '@angular/cdk/drag-drop';
LeftSidebarComponent,
RightSidebarComponent,
AddComponentDialog,
AddAssetDialog,
AddEntityDialog,
AddLayerDialog,
NavbarComponent,
Expand All @@ -61,6 +63,7 @@ import { DragDropModule } from '@angular/cdk/drag-drop';
],
imports: [
BrowserModule,
MatSelectModule,
AppRoutingModule,
BrowserAnimationsModule,
ReactiveFormsModule,
Expand Down
16 changes: 16 additions & 0 deletions pixelot/src/app/right-sidebar/add-asset-dialog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<h1 mat-dialog-title>Pick an asset to load into the Engine</h1>
<div mat-dialog-content>
<mat-form-field>
<mat-label>Asset name</mat-label>
<input type="text" matInput [formControl]="formControl" [matAutocomplete]="auto">
<mat-autocomplete #auto="matAutocomplete">
<mat-option *ngFor="let option of filteredOptions" [value]="option">
{{option}}
</mat-option>
</mat-autocomplete>
</mat-form-field>
</div>
<div mat-dialog-actions>
<button mat-raised-button color="primary" mat-dialog-close>Cancel</button>
<button mat-raised-button color="accent" (click)="onAddClick()" cdkFocusInitial>Add</button>
</div>
12 changes: 11 additions & 1 deletion pixelot/src/app/right-sidebar/right-sidebar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,17 @@ <h2 class="mat-h2">Components</h2>
</mat-panel-title>
</mat-expansion-panel-header>
<ng-container *ngFor="let property of importManager.getComponent(component).arg_names; index as i">
<!-- if component is sprite and property is a string(for assets): -->
<mat-form-field *ngIf="importManager.getComponent(component).arg_types[i] == stringType && (property == 'texAlias')" [style.width.%]="100">
<mat-label color="primary">{{property}}</mat-label>
<mat-select [(value)]="selectedAsset" (selectionChange)="handleComponentChange($event, component, i)">
<mat-option *ngFor="let asset of assets" [value]="asset">
{{asset}}
</mat-option>
</mat-select>
</mat-form-field>
<!-- if property is a string: -->
<mat-form-field *ngIf="importManager.getComponent(component).arg_types[i] == stringType" [style.width.%]="100">
<mat-form-field *ngIf="importManager.getComponent(component).arg_types[i] == stringType && (property != 'texAlias')" [style.width.%]="100">
<mat-label color="primary">{{property}}</mat-label>
<input matInput value={{sceneData.getComponentArgs(currentSceneName,entity.name,component)[i]}} (change)="handleComponentChange($event, component, i)">
</mat-form-field>
Expand All @@ -48,6 +57,7 @@ <h2 class="mat-h2">Components</h2>
</mat-slide-toggle>
</ng-container>
<mat-action-row>
<button *ngIf="(component == 'Sprite')" mat-raised-button color="accent" (click)="addNewAsset()" >Add asset</button>
<button mat-stroked-button color="warn" (click)="removeComponent(component)">Remove Component</button>
</mat-action-row>
</mat-expansion-panel>
Expand Down
Loading