-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Jump to a texture from texture inputs
- Loading branch information
1 parent
f15f7bb
commit b0989cb
Showing
10 changed files
with
103 additions
and
45 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 |
---|---|---|
|
@@ -2,9 +2,11 @@ type-editor.panel.view.flexrow | |
.type-editor-Properties | ||
.tall.flexfix.panel.pad | ||
.flexfix-header | ||
.type-editor-aTexturePicker.panel(onclick="{changeSprite}") | ||
img.ohchangeme(src="{type.texture === -1? 'data/img/notexture.png' : (glob.texturemap[type.texture].src.split('?')[0] + '[email protected]?' + getTypeTextureRevision(type)) + getTypeTextureRevision(type)}") | ||
div {voc.change} | ||
texture-input.wide( | ||
large="yup" showempty="da" | ||
val="{type.texture}" | ||
onselected="{applyTexture}" | ||
) | ||
b {voc.name} | ||
input.wide(type="text" onchange="{wire('this.type.name')}" value="{type.name}") | ||
.anErrorNotice(if="{nameTaken}" ref="errorNotice") {vocGlob.nametaken} | ||
|
@@ -49,7 +51,6 @@ type-editor.panel.view.flexrow | |
.aCodeEditor(ref="typeondraw") | ||
#typeondestroy.tabbed(show="{tab === 'typeondestroy'}") | ||
.aCodeEditor(ref="typeondestroy") | ||
texture-selector(if="{selectingTexture}" onselected="{applyTexture}" oncancelled="{cancelTexture}" ref="textureselector" showempty="sure") | ||
script. | ||
const glob = require('./data/node_requires/glob'); | ||
this.glob = glob; | ||
|
@@ -171,7 +172,7 @@ type-editor.panel.view.flexrow | |
this.changeSprite = () => { | ||
this.selectingTexture = true; | ||
}; | ||
this.applyTexture = texture => () => { | ||
this.applyTexture = texture => { | ||
if (texture === -1) { | ||
this.type.texture = -1; | ||
} else { | ||
|
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 |
---|---|---|
@@ -1,5 +1,40 @@ | ||
texture-input | ||
& > button img | ||
& > .aButtonGroup img | ||
width 2rem | ||
margin-right 1rem | ||
vertical-align bottom | ||
.texture-input-aBigInput | ||
@extends .panel | ||
margin 0 auto | ||
padding 0.5rem 0.5rem 1rem | ||
text-align center | ||
position relative | ||
cursor pointer | ||
{trans} | ||
background backgroundDeeper | ||
div | ||
position absolute | ||
left 0 | ||
right 0 | ||
text-align center | ||
bottom 0 | ||
font-size 80% | ||
opacity 0.5 | ||
{trans} | ||
&:hover | ||
border-color act | ||
div | ||
opacity 1 | ||
&.large | ||
position relative | ||
display inline-block | ||
& > button | ||
margin 0 | ||
position absolute | ||
right 0.5rem | ||
top 0.5rem | ||
width auto | ||
font-size 0.5rem | ||
svg | ||
width 1rem | ||
height 1rem |
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