mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-03 23:55:04 +08:00
Fix style to match unreal sizes
This commit is contained in:
@@ -165,6 +165,7 @@ export default class Configuration {
|
||||
switchName: "/Script/BlueprintGraph.K2Node_SwitchName",
|
||||
switchString: "/Script/BlueprintGraph.K2Node_SwitchString",
|
||||
timeline: "/Script/BlueprintGraph.K2Node_Timeline",
|
||||
timeManagementBlueprintLibrary: "/Script/TimeManagement.TimeManagementBlueprintLibrary",
|
||||
transform: "/Script/CoreUObject.Transform",
|
||||
userDefinedEnum: "/Script/Engine.UserDefinedEnum",
|
||||
variableGet: "/Script/BlueprintGraph.K2Node_VariableGet",
|
||||
|
||||
@@ -676,6 +676,7 @@ export default class ObjectEntity extends IEntity {
|
||||
switch (memberParent) {
|
||||
case Configuration.paths.slateBlueprintLibrary:
|
||||
case Configuration.paths.kismetMathLibrary:
|
||||
case Configuration.paths.timeManagementBlueprintLibrary:
|
||||
const leadingLetter = memberName.match(/[BF]([A-Z]\w+)/)
|
||||
if (leadingLetter) {
|
||||
// Some functions start with B or F (Like FCeil, FMax, BMin)
|
||||
@@ -703,6 +704,9 @@ export default class ObjectEntity extends IEntity {
|
||||
return "dot"
|
||||
case "Vector4_DotProduct3": return "dot3"
|
||||
}
|
||||
if (memberName.startsWith("Add_")) {
|
||||
return "+"
|
||||
}
|
||||
if (memberName.startsWith("And_")) {
|
||||
return "&"
|
||||
}
|
||||
@@ -730,6 +734,9 @@ export default class ObjectEntity extends IEntity {
|
||||
if (memberName.startsWith("LessEqual_")) {
|
||||
return "<="
|
||||
}
|
||||
if (memberName.startsWith("Multiply_")) {
|
||||
return String.fromCharCode(0x2a2f)
|
||||
}
|
||||
if (memberName.startsWith("Not_")) {
|
||||
return "~"
|
||||
}
|
||||
@@ -899,7 +906,15 @@ export default class ObjectEntity extends IEntity {
|
||||
let pinNameFromIndex
|
||||
switch (this.getType()) {
|
||||
case Configuration.paths.commutativeAssociativeBinaryOperator:
|
||||
case Configuration.paths.promotableOperator:
|
||||
switch (this.FunctionReference?.MemberName) {
|
||||
default:
|
||||
if (
|
||||
!this.FunctionReference?.MemberName?.startsWith("Multiply_")
|
||||
&& !this.FunctionReference?.MemberName?.startsWith("Add_")
|
||||
) {
|
||||
break
|
||||
}
|
||||
case "And_Int64Int64":
|
||||
case "And_IntInt":
|
||||
case "BMax":
|
||||
|
||||
@@ -55,7 +55,8 @@ export default class IInputPinTemplate extends PinTemplate {
|
||||
/** @param {PropertyValues} changedProperties */
|
||||
firstUpdated(changedProperties) {
|
||||
super.firstUpdated(changedProperties)
|
||||
if (/** @type {typeof IInputPinTemplate} */(this.constructor).canWrapInput) {
|
||||
const Self = /** @type {typeof IInputPinTemplate} */(this.constructor)
|
||||
if (Self.canWrapInput) {
|
||||
this.element.addEventListener("input", this.#checkWrapHandler)
|
||||
this.nameWidth = this.blueprint.scaleCorrect(
|
||||
this.element.querySelector(".ueb-pin-name")?.getBoundingClientRect().width ?? 0
|
||||
@@ -73,7 +74,7 @@ export default class IInputPinTemplate extends PinTemplate {
|
||||
} else {
|
||||
this.element.addEventListener("focusout", this.#setInput)
|
||||
}
|
||||
if (/** @type {typeof IInputPinTemplate} */(this.constructor).canWrapInput) {
|
||||
if (Self.canWrapInput) {
|
||||
this.element.addEventListener("input", this.#checkWrapHandler)
|
||||
this.element.nodeElement.addEventListener(Configuration.nodeReflowEventName, this.#checkWrapHandler)
|
||||
}
|
||||
|
||||
@@ -3,9 +3,7 @@ import INumericPinTemplate from "./INumericPinTemplate.js"
|
||||
import Utility from "../../Utility.js"
|
||||
import VectorEntity from "../../entity/VectorEntity.js"
|
||||
|
||||
/**
|
||||
* @extends INumericPinTemplate<VectorEntity>
|
||||
*/
|
||||
/** @extends INumericPinTemplate<VectorEntity> */
|
||||
export default class VectorPinTemplate extends INumericPinTemplate {
|
||||
|
||||
#getX() {
|
||||
|
||||
Reference in New Issue
Block a user