Add placeholder texts in controller condition fields

Fix CSS editor component in theme dialog
Fix minor issue with animation controllers
This commit is contained in:
JannisX11 2022-12-30 01:07:25 +01:00
parent db9e83f98f
commit 5112b56bf0
7 changed files with 16 additions and 7 deletions

View File

@ -623,6 +623,9 @@
display: flex;
flex-direction: column;
}
#css_editor > .prism-editor-component {
flex-grow: 1;
}
#theme_list {
overflow-y: auto;

View File

@ -874,8 +874,13 @@
min-height: 30px;
margin-bottom: auto;
}
.molang_input .prism-editor-placeholder {
font-family: var(--font-code);
margin-top: 2px;
}
.molang_input pre {
padding: 2px;
padding-bottom: 1px;
height: 100%;
min-height: 28px;
background-color: transparent;
@ -1534,6 +1539,7 @@ span.controller_state_section_info {
}
.controller_state .prism-editor-wrapper {
font-size: 0.9em;
padding-top: 2px;
}
.controller_state input[type=text] {
font-size: 0.96em;

View File

@ -5,9 +5,7 @@ https://prismjs.com/download.html#themes=prism-okaidia&languages=css+json */
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
* @author ocodia
*/
.prism-editor-wrapper code{font-family:inherit;line-height:inherit}.prism-editor-component{width:100%;height:auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;position:relative}.prism-editor-wrapper{width:100%;height:100%;overflow:auto;-o-tab-size:1.5em;tab-size:1.5em;-moz-tab-size:1.5em}.prism-editor__line-numbers{height:100%;overflow:hidden;-ms-flex-negative:0;flex-shrink:0;padding-top:4px;margin-top:0}.prism-editor__line-number{text-align:right;white-space:nowrap}.prism-editor__autocomplete{position:absolute;min-width:100px;width:100%;max-width:250px;top:25px;min-height:12px;max-height:180px;overflow-y:auto;z-index:4}.prism-editor__autocomplete li{overflow:hidden;white-space:nowrap;padding:1px 5px;cursor:pointer}.prism-editor__code{margin-top:0!important;margin-bottom:0!important;-webkit-box-flex:2;-ms-flex-positive:2;flex-grow:2;min-height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;-o-tab-size:4;tab-size:4;-moz-tab-size:4;outline:none}pre.prism-editor__code:focus{outline:none}
.prism-editor-wrapper code{font-family:inherit;line-height:inherit}.prism-editor-component{height:auto;max-height:100%;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;position:relative}.prism-editor-component,.prism-editor-wrapper{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex}.prism-editor-wrapper{height:100%;overflow:auto;-o-tab-size:1.5em;tab-size:1.5em;-moz-tab-size:1.5em}.prism-editor-wrapper pre{display:inline-block;width:100%}div.prism-editor-wrapper .prism-editor-placeholder{color:#6f7276;pointer-events:none;width:0;overflow:visible;display:inline-block}div.prism-editor-wrapper:focus-within .prism-editor-placeholder{visibility:hidden}.prism-editor__line-numbers{height:100%;overflow:hidden;-ms-flex-negative:0;flex-shrink:0;padding-top:4px;margin-top:0}.prism-editor__line-number{text-align:right;white-space:nowrap}.prism-editor__autocomplete{position:absolute;min-width:100px;width:100%;max-width:250px;top:25px;min-height:12px;max-height:180px;overflow-y:auto;z-index:4}.prism-editor__autocomplete li{overflow:hidden;white-space:nowrap;padding:1px 5px;cursor:pointer}.prism-editor__code{margin-top:0!important;margin-bottom:0!important;-webkit-box-flex:2;-ms-flex-positive:2;flex-grow:2;min-height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;-o-tab-size:4;tab-size:4;-moz-tab-size:4;outline:none}pre.prism-editor__code:focus{outline:none}
code[class*="language-"],
pre[class*="language-"] {

View File

@ -312,6 +312,7 @@ class AnimationControllerState {
addAnimation(animation) {
Undo.initEdit({animation_controller_state: this});
let anim_link = {
uuid: guid(),
key: animation ? animation.getShortName() : '',
animation: animation ? animation.uuid : '',
blend_value: ''
@ -1475,6 +1476,7 @@ Interface.definePanels(() => {
v-model="animation.blend_value"
language="molang"
:autocomplete="autocomplete"
:placeholder="'${tl('animation_controllers.state.condition')}'"
:ignoreTabKey="true"
:line-numbers="false"
/>

View File

@ -584,7 +584,6 @@ UndoSystem.save = class {
}
if (aspects.animation_controller_state) {
this.animation_controller_state = aspects.animation_controller_state.getUndoCopy();
console.log(aspects.animation_controller_state, this.animation_controller_state)
this.animation_controller_state.controller = aspects.animation_controller_state.controller?.uuid;
}

View File

@ -1559,6 +1559,7 @@
"animation_controllers.state.on_entry": "On Entry",
"animation_controllers.state.on_exit": "On Exit",
"animation_controllers.state.transitions": "Transitions",
"animation_controllers.state.condition": "Condition",
"animation_controllers.state.blend_transition": "Blend Time",
"animation_controllers.state.shortest_path": "Blend by Shortest Path",
"animation_controllers.state.edit_transition": "Edit Transition",

File diff suppressed because one or more lines are too long