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:
@@ -434,6 +434,44 @@ const tests = [
|
||||
delegate: false,
|
||||
development: false,
|
||||
},
|
||||
{
|
||||
name: "Set Relative Rotation",
|
||||
subtitle: "Target is Scene Component",
|
||||
value: String.raw`
|
||||
Begin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name="K2Node_CallFunction_5" ExportPath=/Script/BlueprintGraph.K2Node_CallFunction'"/Temp/Untitled_1.Untitled_1:PersistentLevel.Untitled.EventGraph.K2Node_CallFunction_5"'
|
||||
FunctionReference=(MemberParent=/Script/CoreUObject.Class'"/Script/Engine.SceneComponent"',MemberName="K2_SetRelativeRotation")
|
||||
NodePosX=512
|
||||
NodePosY=-48
|
||||
AdvancedPinDisplay=Hidden
|
||||
NodeGuid=2140E0AA9D8F4C5FB89F5CA378A9B56D
|
||||
CustomProperties Pin (PinId=C347AFEE7AFC4848A63B99FF6167F73F,PinName="execute",PinToolTip="\nExec",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=F3E0EED07DD54370A2DA0FD76353286B,PinName="then",PinToolTip="\nExec",Direction="EGPD_Output",PinType.PinCategory="exec",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=7EB45B16ED954F929722FBCD91A187A8,PinName="self",PinFriendlyName=NSLOCTEXT("K2Node", "Target", "Target"),PinToolTip="Target\nScene Component Object Reference",PinType.PinCategory="object",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.Class'"/Script/Engine.SceneComponent"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=AE73B4E46A094DD788D04725FD7C6DF9,PinName="NewRotation",PinToolTip="New Rotation\nRotator\n\nNew rotation of the component relative to its parent",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/CoreUObject.Rotator"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="0, 0, 0",AutogeneratedDefaultValue="0, 0, 0",SubPins=(K2Node_CallFunction_5 F82B6140AD50485E8955369B735BC627,K2Node_CallFunction_5 0A417B3EA3074164B7DC605B7F85AF05,K2Node_CallFunction_5 8539DDEA84C24BE48F9D84B629FEA410,),PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=F82B6140AD50485E8955369B735BC627,PinName="NewRotation_Roll",PinFriendlyName=LOCGEN_FORMAT_NAMED(NSLOCTEXT("KismetSchema", "SplitPinFriendlyNameFormat", "{PinDisplayName} {ProtoPinDisplayName}"), "PinDisplayName", NSLOCTEXT("", "8F133E70437642249A31E409DD1E3852", "New Rotation"), "ProtoPinDisplayName", NSLOCTEXT("", "751A9C34B79E4E7F94E2F02DB922AFCE", "X (Roll)")),PinType.PinCategory="real",PinType.PinSubCategory="float",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="0.0",AutogeneratedDefaultValue="0.0",ParentPin=K2Node_CallFunction_5 AE73B4E46A094DD788D04725FD7C6DF9,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=0A417B3EA3074164B7DC605B7F85AF05,PinName="NewRotation_Pitch",PinFriendlyName=LOCGEN_FORMAT_NAMED(NSLOCTEXT("KismetSchema", "SplitPinFriendlyNameFormat", "{PinDisplayName} {ProtoPinDisplayName}"), "PinDisplayName", NSLOCTEXT("", "26BC4556F421494A8E68A42D38A23EF1", "New Rotation"), "ProtoPinDisplayName", NSLOCTEXT("", "105B6B68DAF74E6CAD83079F9E795ECF", "Y (Pitch)")),PinType.PinCategory="real",PinType.PinSubCategory="float",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="0.0",AutogeneratedDefaultValue="0.0",ParentPin=K2Node_CallFunction_5 AE73B4E46A094DD788D04725FD7C6DF9,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=8539DDEA84C24BE48F9D84B629FEA410,PinName="NewRotation_Yaw",PinFriendlyName=LOCGEN_FORMAT_NAMED(NSLOCTEXT("KismetSchema", "SplitPinFriendlyNameFormat", "{PinDisplayName} {ProtoPinDisplayName}"), "PinDisplayName", NSLOCTEXT("", "DE7AB5AB52D84405922E28EE72ABBB26", "New Rotation"), "ProtoPinDisplayName", NSLOCTEXT("", "1462F96F7C0B4D68B082EBA02E99F1EC", "Z (Yaw)")),PinType.PinCategory="real",PinType.PinSubCategory="float",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="0.0",AutogeneratedDefaultValue="0.0",ParentPin=K2Node_CallFunction_5 AE73B4E46A094DD788D04725FD7C6DF9,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=E9652915F52D465E993222AC59ABBEDF,PinName="bSweep",PinToolTip="Sweep\nBoolean\n\nWhether we sweep to the destination (currently not supported for rotation).",PinType.PinCategory="bool",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="false",AutogeneratedDefaultValue="false",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=True,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=3EE87DFBA5AB473F93F003AC9F8A2DED,PinName="SweepHitResult",PinToolTip="Sweep Hit Result\nHit Result Structure\n\nHit result from any impact if sweep is true.",Direction="EGPD_Output",PinType.PinCategory="struct",PinType.PinSubCategory="",PinType.PinSubCategoryObject=/Script/CoreUObject.ScriptStruct'"/Script/Engine.HitResult"',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=True,bOrphanedPin=False,)
|
||||
CustomProperties Pin (PinId=649255CFBCB9480E8DC1AA214F9FCE6B,PinName="bTeleport",PinToolTip="Teleport\nBoolean\n\nWhether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts).",PinType.PinCategory="bool",PinType.PinSubCategory="",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue="false",AutogeneratedDefaultValue="false",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=True,bOrphanedPin=False,)
|
||||
End Object
|
||||
`,
|
||||
size: [15, 17],
|
||||
color: Configuration.nodeColors.blue,
|
||||
icon: SVGIcon.functionSymbol,
|
||||
pins: 9,
|
||||
pinNames: [
|
||||
"Target",
|
||||
"New Rotation X (Roll)",
|
||||
"New Rotation Y (Pitch)",
|
||||
"New Rotation Z (Yaw)",
|
||||
"Sweep",
|
||||
"Teleport",
|
||||
"Sweep Hit Result",
|
||||
],
|
||||
delegate: false,
|
||||
development: false,
|
||||
},
|
||||
]
|
||||
|
||||
generateNodeTests(tests)
|
||||
|
||||
20
dist/css/ueb-style.css
vendored
20
dist/css/ueb-style.css
vendored
@@ -59,7 +59,8 @@ ueb-blueprint svg {
|
||||
margin-left: auto;
|
||||
padding: 5px;
|
||||
color: #2b2b2b;
|
||||
font-size: 20px;
|
||||
/* 1.53846 is to get an effective font size of 20px from --ueb-font-size which is 13 px */
|
||||
font-size: calc(1.53846 * var(--ueb-font-size));
|
||||
font-weight: bold;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
@@ -400,7 +401,7 @@ ueb-node.ueb-node-style-event .ueb-node-top {
|
||||
}
|
||||
|
||||
.ueb-node-name:last-child {
|
||||
padding-right: 25px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.ueb-zoom--2 .ueb-node-name {
|
||||
@@ -446,11 +447,11 @@ ueb-node[data-pure-function=true] .ueb-node-name-symbol {
|
||||
|
||||
.ueb-node-outputs,
|
||||
.ueb-node-variadic {
|
||||
padding-right: 10px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.ueb-node-has-inputs .ueb-node-inputs {
|
||||
padding-right: 30px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.ueb-node-variadic {
|
||||
@@ -556,7 +557,8 @@ ueb-node.ueb-node-style-operation .ueb-node-top {
|
||||
align-self: center;
|
||||
justify-self: center;
|
||||
padding: 0;
|
||||
font-size: 28px;
|
||||
/* 2.15385 is to get an effective font size of 28px from --ueb-font-size which is 13 px */
|
||||
font-size: calc(2.15385 * var(--ueb-font-size));
|
||||
font-stretch: condensed;
|
||||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
@@ -608,7 +610,8 @@ ueb-node.ueb-node-style-comment .ueb-node-top {
|
||||
border-radius: 0;
|
||||
background: rgb(var(--ueb-node-color)) linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
/* 1.84615 is to get an effective font size of 24px from --ueb-font-size which is 13 px */
|
||||
font-size: calc(1.84615 * var(--ueb-font-size));
|
||||
text-shadow: 2px 1px 1px #444, 0 0 2px #bbb;
|
||||
line-height: 1.22;
|
||||
z-index: 1;
|
||||
@@ -765,7 +768,7 @@ ueb-node[data-type="/Script/BlueprintGraph.K2Node_VariableSet"] ueb-pin[data-dir
|
||||
}
|
||||
|
||||
.ueb-pin-input-wrapper {
|
||||
display: inline-flex;
|
||||
display: flex;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
@@ -829,7 +832,8 @@ ueb-pin[data-type="/Script/CoreUObject.LinearColor"] .ueb-pin-input {
|
||||
min-width: 10px;
|
||||
max-width: 400px;
|
||||
max-height: 16em;
|
||||
font-size: 12.6px;
|
||||
/* 0.96923 is to get an effective font size of 12.6px from --ueb-font-size which is 13 px */
|
||||
font-size: calc(0.96923 * var(--ueb-font-size));
|
||||
white-space: nowrap;
|
||||
background: none;
|
||||
color: inherit;
|
||||
|
||||
2
dist/css/ueb-style.css.map
vendored
2
dist/css/ueb-style.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/ueb-style.min.css
vendored
2
dist/css/ueb-style.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/ueb-style.min.css.map
vendored
2
dist/css/ueb-style.min.css.map
vendored
File diff suppressed because one or more lines are too long
25
dist/ueblueprint.js
vendored
25
dist/ueblueprint.js
vendored
@@ -189,6 +189,7 @@ 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",
|
||||
@@ -3609,6 +3610,7 @@ 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)
|
||||
@@ -3636,6 +3638,9 @@ class ObjectEntity extends IEntity {
|
||||
return "dot"
|
||||
case "Vector4_DotProduct3": return "dot3"
|
||||
}
|
||||
if (memberName.startsWith("Add_")) {
|
||||
return "+"
|
||||
}
|
||||
if (memberName.startsWith("And_")) {
|
||||
return "&"
|
||||
}
|
||||
@@ -3663,6 +3668,9 @@ class ObjectEntity extends IEntity {
|
||||
if (memberName.startsWith("LessEqual_")) {
|
||||
return "<="
|
||||
}
|
||||
if (memberName.startsWith("Multiply_")) {
|
||||
return String.fromCharCode(0x2a2f)
|
||||
}
|
||||
if (memberName.startsWith("Not_")) {
|
||||
return "~"
|
||||
}
|
||||
@@ -3832,7 +3840,15 @@ 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":
|
||||
@@ -9761,7 +9777,8 @@ 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
|
||||
@@ -9779,7 +9796,7 @@ 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);
|
||||
}
|
||||
@@ -10626,9 +10643,7 @@ class VectorInputPinTemplate extends INumericPinTemplate {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @extends INumericPinTemplate<VectorEntity>
|
||||
*/
|
||||
/** @extends INumericPinTemplate<VectorEntity> */
|
||||
class VectorPinTemplate extends INumericPinTemplate {
|
||||
|
||||
#getX() {
|
||||
|
||||
2
dist/ueblueprint.min.js
vendored
2
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -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() {
|
||||
|
||||
@@ -65,7 +65,8 @@ ueb-blueprint svg {
|
||||
margin-left: auto;
|
||||
padding: 5px;
|
||||
color: #2b2b2b;
|
||||
font-size: 20px;
|
||||
/* 1.53846 is to get an effective font size of 20px from --ueb-font-size which is 13 px */
|
||||
font-size: calc(1.53846 * var(--ueb-font-size));
|
||||
font-weight: bold;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ ueb-node.ueb-node-style-event .ueb-node-top {
|
||||
}
|
||||
|
||||
.ueb-node-name:last-child {
|
||||
padding-right: 25px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
.ueb-zoom--2 .ueb-node-name {
|
||||
@@ -198,11 +198,11 @@ ueb-node[data-pure-function="true"] .ueb-node-name-symbol {
|
||||
|
||||
.ueb-node-outputs,
|
||||
.ueb-node-variadic {
|
||||
padding-right: 10px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.ueb-node-has-inputs .ueb-node-inputs {
|
||||
padding-right: 30px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.ueb-node-variadic {
|
||||
@@ -320,7 +320,8 @@ ueb-node.ueb-node-style-operation .ueb-node-top {
|
||||
align-self: center;
|
||||
justify-self: center;
|
||||
padding: 0;
|
||||
font-size: 28px;
|
||||
/* 2.15385 is to get an effective font size of 28px from --ueb-font-size which is 13 px */
|
||||
font-size: calc(2.15385 * var(--ueb-font-size));
|
||||
font-stretch: condensed;
|
||||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
@@ -385,7 +386,8 @@ ueb-node.ueb-node-style-comment .ueb-node-top {
|
||||
border-radius: 0;
|
||||
background: rgb(var(--ueb-node-color)) linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
/* 1.84615 is to get an effective font size of 24px from --ueb-font-size which is 13 px */
|
||||
font-size: calc(1.84615 * var(--ueb-font-size));
|
||||
text-shadow: 2px 1px 1px #444, 0 0 2px #bbb;
|
||||
line-height: 1.22;
|
||||
z-index: 1;
|
||||
|
||||
@@ -141,7 +141,7 @@ ueb-node[data-type="/Script/BlueprintGraph.K2Node_VariableSet"] ueb-pin[data-dir
|
||||
}
|
||||
|
||||
.ueb-pin-input-wrapper {
|
||||
display: inline-flex;
|
||||
display: flex;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
@@ -209,7 +209,8 @@ ueb-pin[data-type="/Script/CoreUObject.LinearColor"] .ueb-pin-input {
|
||||
min-width: 10px;
|
||||
max-width: 400px;
|
||||
max-height: 16em;
|
||||
font-size: 12.6px;
|
||||
/* 0.96923 is to get an effective font size of 12.6px from --ueb-font-size which is 13 px */
|
||||
font-size: calc(0.96923 * var(--ueb-font-size));
|
||||
white-space: nowrap;
|
||||
background: none;
|
||||
color: inherit;
|
||||
|
||||
Reference in New Issue
Block a user