diff --git a/Http/SkinEditor/app.css b/Http/SkinEditor/app.css index 84cdc80..4f9e96d 100644 --- a/Http/SkinEditor/app.css +++ b/Http/SkinEditor/app.css @@ -161,18 +161,26 @@ input { .t-exp.t-inline { margin: 0 2px; - padding: 2px; + padding: 2px 1px; } .t-exp .t-inline { - margin: 0 2px 2px 2px; + margin: 0 0 2px 0; + } + + .mode-hide-delete .t-exp .t-inline { + margin-bottom: 0; + } + + .mode-hide-delete .t-exp.t-inline { + padding-bottom: 0; } .t-exp .t-statement { margin: 0; border: 0; border-left: solid 1px orangered; - padding: 0; + padding: 0 2px; } .t-exp:hover { diff --git a/Http/SkinEditor/app.js b/Http/SkinEditor/app.js index db9de7e..bcae148 100644 --- a/Http/SkinEditor/app.js +++ b/Http/SkinEditor/app.js @@ -36,13 +36,17 @@ var inputlists = { var statementlists = { "statement.comp": ["input.comp"], "statement.define": ["input.ident", "exp"], + "statement.exp.cast.vector2number": ["exp.vector"], + "statement.exp.cast.number2vector": ["exp.number"], "statement.exp.const.w": [], "statement.exp.const.h": [], "statement.exp.const.inf": [], + "statement.exp.const.null": [], "statement.exp.const.true": [], "statement.exp.const.false": [], "statement.exp.literal.ident": ["input.ident"], "statement.exp.literal.number": ["input.number"], + "statement.exp.literal.string": ["input.string"], "statement.exp.op.add": ["exp.number", "exp.number"], "statement.exp.op.sub": ["exp.number", "exp.number"], "statement.exp.op.mul": ["exp.number", "exp.number"], @@ -64,33 +68,54 @@ var statementlists = { "statement.exp.func.abs": ["exp.number"], "statement.exp.func.interval": ["exp.number", "exp.number", "exp.number"], "statement.exp.func.is": ["exp", "exp"], + "statement.exp.func.cubic_bezier": ["exp.number", "exp.number", "exp.number", "exp.number", "exp.number"], + "statement.exp.func.ease": ["exp.number"], + "statement.exp.func.ease_in": ["exp.number"], + "statement.exp.func.ease_out": ["exp.number"], + "statement.exp.func.ease_in_out": ["exp.number"], + "statement.exp.func.screen_edge": ["exp.number"], + "statement.exp.func.anim": ["exp.vector", "exp.vector", "exp.number"], "statement.obj": ["block.element"], "statement.prop": ["input.prop", "exp"], "statement.select": ["block.select", "block.element"], "statement.select.anchor": ["input.identanchor"], "statement.select.atanchor": ["input.identanchor"], - "statement.select.exp": ["exp"], + "statement.select.exp": ["exp.number"], "statement.select.type": ["input.type"], }; var explists = { - "exp": ["#exp.array", "#exp.error", "#exp.identifier", "#exp.null", "#exp.number", "#exp.string", "#exp.vector"], + "exp": ["#exp.array", "#exp.identifier", "#exp.number", "#exp.string", "#exp.vector"], "exp.any": [ - "statement.exp.literal.ident", + "statement.exp.literal.ident", "statement.exp.literal.identforced", "statement.exp.op.and", "statement.exp.op.or" ], + "exp.identifier": [ + "statement.exp.const.null", + "#exp.any" + ], "exp.number": [ - "statement.exp.literal.number", + "statement.exp.literal.number", "statement.exp.cast.vector2number", "statement.exp.const.w", "statement.exp.const.h", "statement.exp.const.inf", "statement.exp.const.true", "statement.exp.const.false", "statement.exp.op.add", "statement.exp.op.sub", "statement.exp.op.mul", "statement.exp.op.div", "statement.exp.op.mod", "statement.exp.op.add1", "statement.exp.op.sub1", "statement.exp.op.not", "statement.exp.op.at", "statement.exp.op.lt", "statement.exp.op.eq", "statement.exp.op.gt", "statement.exp.func.int", "statement.exp.func.clamp", "statement.exp.func.min", "statement.exp.func.max", "statement.exp.func.abs", "statement.exp.func.interval", "statement.exp.func.is", - "statement.exp.func.anim", "statement.exp.func.cubic_bezier", "statement.exp.func.ease", "statement.exp.func.ease_in", "statement.exp.func.ease_out", "statement.exp.func.ease_in_out", + "statement.exp.func.cubic_bezier", "statement.exp.func.ease", "statement.exp.func.ease_in", "statement.exp.func.ease_out", "statement.exp.func.ease_in_out", "statement.exp.func.attack_timing", "statement.exp.func.enter_timing", "statement.exp.func.release_timing", "statement.exp.func.leave_timing", "statement.exp.func.contact_timing", "#exp.any" ], + "exp.string": [ + "statement.exp.literal.string", + "#exp.any" + ], + "exp.vector": [ + "statement.exp.cast.number2vector", + "statement.exp.func.screen_edge", + "statement.exp.func.anim", + "#exp.any" + ], }; window.onload = function () { diff --git a/Http/SkinEditor/messages/en_US.js b/Http/SkinEditor/messages/en_US.js index 84cc813..f2715b5 100644 --- a/Http/SkinEditor/messages/en_US.js +++ b/Http/SkinEditor/messages/en_US.js @@ -42,6 +42,7 @@ messages["en_US"] = { "input.prop.text.size": "text sprite: font size", "input.prop.text.spacing": "text sprite: character spacing", "input.prop.text.value": "text sprite: content", + "input.string.default": "abc", "input.type.chart": "chart", "input.type.default": "element", "input.type.group": "track group", @@ -49,20 +50,32 @@ messages["en_US"] = { "input.type.track": "track", "list.statement.comp": "Attach component", "list.statement.define": "Define static variable", + "list.statement.exp.cast.number2vector": "From number", + "list.statement.exp.cast.vector2number": "From vector", "list.statement.exp.const.false": "False", "list.statement.exp.const.h": "Screen height", "list.statement.exp.const.inf": "Infinity", + "list.statement.exp.const.null": "Null", "list.statement.exp.const.true": "True", "list.statement.exp.const.w": "Screen width", "list.statement.exp.func.abs": "Absolute value", + "list.statement.exp.func.anim": "Animate value", "list.statement.exp.func.clamp": "Clamp", + "list.statement.exp.func.cubic_bezier": "Cubic Bézier curve", + "list.statement.exp.func.ease": "Ease", + "list.statement.exp.func.ease_in": "Ease in", + "list.statement.exp.func.ease_in_out": "Ease in out", + "list.statement.exp.func.ease_out": "Ease out", "list.statement.exp.func.int": "Round down", "list.statement.exp.func.interval": "Interval", "list.statement.exp.func.is": "Is equivalent", "list.statement.exp.func.max": "Maximum", "list.statement.exp.func.min": "Minimum", + "list.statement.exp.func.screen_edge": "Screen edge", "list.statement.exp.literal.ident": "Variable", + "list.statement.exp.literal.identforced": "Variable (forced)", "list.statement.exp.literal.number": "Number", + "list.statement.exp.literal.string": "String", "list.statement.exp.op.add": "a + b", "list.statement.exp.op.add1": "+n", "list.statement.exp.op.and": "p and q", @@ -86,20 +99,32 @@ messages["en_US"] = { "list.statement.select.type": "Filter element type", "statement.comp": "with a {0}", "statement.define": "Define static {0} = {1}", + "statement.exp.cast.number2vector": "number {0}", + "statement.exp.cast.vector2number": "vector {0}", "statement.exp.const.false": "false", "statement.exp.const.h": "screen height", "statement.exp.const.inf": "infinity", + "statement.exp.const.null": "null", "statement.exp.const.true": "true", "statement.exp.const.w": "screen width", "statement.exp.func.abs": "absolute value of {0}", + "statement.exp.func.anim": "animate value from {0} to {1} with {2}", "statement.exp.func.clamp": "clamp {1} between {0} and {2}", + "statement.exp.func.cubic_bezier": "cubic Bézier curve defined by the control points ({0}, {1}) and ({2}, {3}) with {4}", + "statement.exp.func.ease": "ease with {0}", + "statement.exp.func.ease_in": "ease in with {0}", + "statement.exp.func.ease_in_out": "ease in out with {0}", + "statement.exp.func.ease_out": "ease out with {0}", "statement.exp.func.int": "round down {0}", "statement.exp.func.interval": "interval between {0} and {1}", "statement.exp.func.is": "{0} is equivalent to {1}", "statement.exp.func.max": "maximum of {0} and {1}", "statement.exp.func.min": "minimum of {0} and {1}", + "statement.exp.func.screen_edge": "the screen edge #{0}", "statement.exp.literal.ident": "{0}", + "statement.exp.literal.identforced": "{0} (forced)", "statement.exp.literal.number": "{0}", + "statement.exp.literal.string": "{0}", "statement.exp.op.add": "{0} + {1}", "statement.exp.op.add1": "+{0}", "statement.exp.op.and": "{0} and {1}",