mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-18 03:27:32 +08:00
Fix style to match unreal sizes
This commit is contained in:
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
Reference in New Issue
Block a user