Skip to content

Commit

Permalink
starting properties panel
Browse files Browse the repository at this point in the history
  • Loading branch information
kleber-swf committed Aug 30, 2021
1 parent b4d1a6b commit 9ae9558
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 7 deletions.
2 changes: 1 addition & 1 deletion example/game.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const game = new Phaser.Game({
width: 1920,
height: 1600,
height: 1200,
renderer: Phaser.AUTO,
parent: 'game',
scaleMode: Phaser.ScaleManager.SHOW_ALL,
Expand Down
4 changes: 3 additions & 1 deletion src/ui/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ $primary-color: #2980B9;
$on-primary-color: #F2F2F2;

$background-color: #232323;
$on-background-color: #F2F2F2;
$on-background-color: #F2F2F2;

$shadow-color: rgba(#111, 0.6)
17 changes: 16 additions & 1 deletion src/ui/properties/panel/properties-panel.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
@import "colors";

phed-properties-panel {
display: flex;
flex-direction: column;
justify-content: stretch;

.title {
font-weight: bold;
font-size: 14px;
color: rgba($on-background-color, 0.5);
background-color: rgba(black, 0.2);
padding: 6px 8px;
}
}

.content {
padding: 12px;
box-shadow: 0 2px 2px $shadow-color;
}
}
8 changes: 7 additions & 1 deletion src/ui/properties/panel/properties-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ export class PropertiesPanel extends Widget {

public connectedCallback() {
super.connectedCallback();

const title = document.createElement('div');
title.classList.add('title');
this.appendChild(title);
title.append('TITLE')
title.append('PROPERTIES');

const content = document.createElement('div');
content.classList.add('content');
this.appendChild(content);
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/ui/properties/toolbar/properties-toolbar.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@import 'colors';

phred-properties-toolbar {
width: 250px;
box-shadow: -4px 0px 4px rgba(20, 20, 20, 0.5);
box-shadow: -4px 0px 4px $shadow-color;
z-index: 2;
}

Expand Down
2 changes: 1 addition & 1 deletion src/ui/stage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ phred-stage {
flex-direction: column;

.phred-game-container {
background-color: #1b1b1b;
background-color: #1B1B1B;
flex: 1;
overflow: overlay;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/widget/widget.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../colors';
@import 'colors';

.phred-widget {
background-color: $background-color;
Expand Down

0 comments on commit 9ae9558

Please sign in to comment.