mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-16 10:54:42 +08:00
Some fixes and new nodes names added
This commit is contained in:
@@ -74,7 +74,8 @@ export default class Configuration {
|
||||
*/
|
||||
static linkRightSVGPath = (start, c1, c2) => {
|
||||
let end = 100 - start
|
||||
return `M ${start} 0 C ${c1.toFixed(3)} 0, ${c2.toFixed(3)} 0, 50 50 S ${(end - c1 + start).toFixed(3)} 100, ${end.toFixed(3)} 100`
|
||||
return `M ${start} 0 C ${c1.toFixed(3)} 0, ${c2.toFixed(3)} 0, 50 50 S ${(end - c1 + start).toFixed(3)} 100, `
|
||||
+ `${end.toFixed(3)} 100`
|
||||
}
|
||||
static maxZoom = 7
|
||||
static minZoom = -12
|
||||
@@ -124,6 +125,7 @@ export default class Configuration {
|
||||
forLoop: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoop",
|
||||
forLoopWithBreak: "/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:ForLoopWithBreak",
|
||||
functionEntry: "/Script/BlueprintGraph.K2Node_FunctionEntry",
|
||||
functionResult: "/Script/BlueprintGraph.K2Node_FunctionResult",
|
||||
getInputAxisKeyValue: "/Script/BlueprintGraph.K2Node_GetInputAxisKeyValue",
|
||||
ifThenElse: "/Script/BlueprintGraph.K2Node_IfThenElse",
|
||||
inputAxisKeyEvent: "/Script/BlueprintGraph.K2Node_InputAxisKeyEvent",
|
||||
@@ -240,6 +242,7 @@ export default class Configuration {
|
||||
begin: "ueb-tracking-mouse-begin",
|
||||
end: "ueb-tracking-mouse-end",
|
||||
}
|
||||
static unescapedBackslash = /(?<=(?:[^\\]|^)(?:\\\\)*)\\(?!\\)/
|
||||
static windowApplyEventName = "ueb-window-apply"
|
||||
static windowApplyButtonText = "OK"
|
||||
static windowCancelEventName = "ueb-window-cancel"
|
||||
|
||||
@@ -349,8 +349,8 @@ export default class Utility {
|
||||
/** @param {String} value */
|
||||
static unescapeString(value) {
|
||||
return value
|
||||
.replaceAll("\\t", "\t") // Replace tab with \t
|
||||
.replaceAll("\\n", "\n") // Replace newline with \n
|
||||
.replaceAll(new RegExp(Configuration.unescapedBackslash.source + "t", "g"), "\t") // Replace tab with \t
|
||||
.replaceAll(new RegExp(Configuration.unescapedBackslash.source + "n", "g"), "\n") // Replace newline with \n
|
||||
.replaceAll(new RegExp(`\\\\(${Configuration.stringEscapedCharacters.source})`, "g"), "$1")
|
||||
}
|
||||
|
||||
|
||||
@@ -585,7 +585,11 @@ export default class ObjectEntity extends IEntity {
|
||||
case Configuration.paths.forEachLoopWithBreak:
|
||||
return "For Each Loop with Break"
|
||||
case Configuration.paths.functionEntry:
|
||||
return "Construction Script"
|
||||
return this.FunctionReference?.MemberName === "UserConstructionScript"
|
||||
? "Construction Script"
|
||||
: this.FunctionReference?.MemberName
|
||||
case Configuration.paths.functionResult:
|
||||
return "Return Node"
|
||||
case Configuration.paths.ifThenElse:
|
||||
return "Branch"
|
||||
case Configuration.paths.materialExpressionConstant:
|
||||
@@ -710,6 +714,7 @@ export default class ObjectEntity extends IEntity {
|
||||
case "Min": return "MIN"
|
||||
case "MinInt64": return "MIN"
|
||||
case "Not_PreBool": return "NOT"
|
||||
case "Sin": return "SIN"
|
||||
case "Sqrt": return "SQRT"
|
||||
case "Square": return "^2"
|
||||
// Dot products not respecting MemberName pattern
|
||||
@@ -828,6 +833,7 @@ export default class ObjectEntity extends IEntity {
|
||||
case Configuration.paths.multiGate:
|
||||
return Configuration.nodeColors.gray
|
||||
case Configuration.paths.functionEntry:
|
||||
case Configuration.paths.functionResult:
|
||||
return Configuration.nodeColors.violet
|
||||
case Configuration.paths.timeline:
|
||||
return Configuration.nodeColors.yellow
|
||||
@@ -850,6 +856,7 @@ export default class ObjectEntity extends IEntity {
|
||||
case Configuration.paths.addDelegate:
|
||||
case Configuration.paths.createDelegate:
|
||||
case Configuration.paths.functionEntry:
|
||||
case Configuration.paths.functionResult:
|
||||
return SVGIcon.node
|
||||
case Configuration.paths.customEvent: return SVGIcon.event
|
||||
case Configuration.paths.doN: return SVGIcon.doN
|
||||
|
||||
@@ -56,7 +56,7 @@ export default class IInputPinTemplate extends PinTemplate {
|
||||
firstUpdated(changedProperties) {
|
||||
super.firstUpdated(changedProperties)
|
||||
const Self = /** @type {typeof IInputPinTemplate} */(this.constructor)
|
||||
if (Self.canWrapInput) {
|
||||
if (Self.canWrapInput && this.isInputRendered()) {
|
||||
this.element.addEventListener("input", this.#checkWrapHandler)
|
||||
this.nameWidth = this.blueprint.scaleCorrect(
|
||||
this.element.querySelector(".ueb-pin-name")?.getBoundingClientRect().width ?? 0
|
||||
@@ -74,7 +74,7 @@ export default class IInputPinTemplate extends PinTemplate {
|
||||
} else {
|
||||
this.element.addEventListener("focusout", this.#setInput)
|
||||
}
|
||||
if (Self.canWrapInput) {
|
||||
if (Self.canWrapInput && this.isInputRendered()) {
|
||||
this.element.addEventListener("input", this.#checkWrapHandler)
|
||||
this.element.nodeElement.addEventListener(Configuration.nodeReflowEventName, this.#checkWrapHandler)
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export default class PinTemplate extends ITemplate {
|
||||
const content = html`
|
||||
<div class="ueb-pin-content">
|
||||
${this.isNameRendered ? this.renderName() : nothing}
|
||||
${this.element.isInput() && !this.element.entity.bDefaultValueIsIgnored ? this.renderInput() : html``}
|
||||
${this.isInputRendered() ? this.renderInput() : html``}
|
||||
</div>
|
||||
`
|
||||
return html`
|
||||
@@ -105,6 +105,12 @@ export default class PinTemplate extends ITemplate {
|
||||
`
|
||||
}
|
||||
|
||||
isInputRendered() {
|
||||
return this.element.isInput()
|
||||
&& !this.element.entity.bDefaultValueIsIgnored
|
||||
&& !this.element.entity.PinType.bIsReference
|
||||
}
|
||||
|
||||
renderInput() {
|
||||
return html``
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user