if-node.css 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. /* IF 分支节点样式 - 自定义布局 */
  2. .Blueprint-if-node {
  3. min-width: 200px;
  4. min-height: 120px;
  5. background: linear-gradient(180deg, #3d3d40 0%, #2a2a2d 100%);
  6. border: 1px solid rgba(255, 255, 255, 0.15);
  7. border-radius: 12px;
  8. box-shadow:
  9. 0 1px 0 0 rgba(255, 255, 255, 0.2) inset,
  10. 0 4px 12px rgba(0, 0, 0, 0.5),
  11. 0 0 20px rgba(156, 39, 176, 0.3);
  12. display: flex;
  13. flex-direction: column;
  14. position: relative;
  15. overflow: visible;
  16. }
  17. .Blueprint-if-node.selected {
  18. border-color: rgba(255, 165, 0, 0.6);
  19. box-shadow:
  20. 0 1px 0 0 rgba(255, 255, 255, 0.2) inset,
  21. 0 0 0 2px rgba(255, 165, 0, 0.4),
  22. 0 4px 12px rgba(0, 0, 0, 0.5),
  23. 0 0 20px rgba(255, 165, 0, 0.4);
  24. }
  25. /* 内部发光效果 */
  26. .Blueprint-if-node::before {
  27. content: '';
  28. position: absolute;
  29. top: 0;
  30. left: 0;
  31. right: 0;
  32. bottom: 0;
  33. background: radial-gradient(circle at 20% 50%, rgba(156, 39, 176, 0.2) 0%, transparent 60%);
  34. border-radius: 12px;
  35. pointer-events: none;
  36. }
  37. /* 顶部光泽效果(类似图像中的光泽头部) */
  38. .Blueprint-if-node-header {
  39. background: linear-gradient(180deg, rgba(156, 39, 176, 0.3) 0%, rgba(156, 39, 176, 0.1) 50%, transparent 100%);
  40. color: #fff;
  41. padding: 8px 16px;
  42. font-size: 13px;
  43. font-weight: 600;
  44. text-align: left;
  45. letter-spacing: 0.5px;
  46. position: relative;
  47. z-index: 1;
  48. border-radius: 12px 12px 0 0;
  49. }
  50. /* 自定义布局容器 - 使用 flex */
  51. .Blueprint-if-node-body {
  52. position: relative;
  53. flex: 1;
  54. display: flex;
  55. flex-direction: column;
  56. padding: 12px 16px;
  57. z-index: 1;
  58. min-height: 100px;
  59. justify-content: space-between;
  60. }
  61. /* 第一行:执行输入和 True 输出 */
  62. .Blueprint-if-node-top-row {
  63. display: flex;
  64. justify-content: space-between;
  65. align-items: flex-start;
  66. min-height: 30px;
  67. }
  68. /* 第二行:条件输入区域 */
  69. .Blueprint-if-node-middle-row {
  70. display: flex;
  71. align-items: center;
  72. flex: 1;
  73. padding: 8px 0;
  74. }
  75. /* 第三行:False 输出 */
  76. .Blueprint-if-node-bottom-row {
  77. display: flex;
  78. justify-content: flex-end;
  79. align-items: flex-end;
  80. min-height: 30px;
  81. }
  82. /* 左上:执行输入 */
  83. .Blueprint-if-node-execution-input {
  84. display: flex;
  85. align-items: flex-start;
  86. justify-content: flex-start;
  87. }
  88. .Blueprint-if-node-execution-input .Blueprint-node-port {
  89. position: relative;
  90. left: 0;
  91. }
  92. /* 右上:true 输出 */
  93. .Blueprint-if-node-true-output {
  94. display: flex;
  95. align-items: flex-start;
  96. justify-content: flex-end;
  97. }
  98. .Blueprint-if-node-true-output .Blueprint-node-port {
  99. position: relative;
  100. right: 0;
  101. }
  102. /* 左中:条件输入 */
  103. .Blueprint-if-node-condition {
  104. display: flex;
  105. align-items: center;
  106. width: 100%;
  107. }
  108. /* 空条件提示 */
  109. .Blueprint-if-condition-empty {
  110. color: #888;
  111. font-size: 11px;
  112. font-style: italic;
  113. }
  114. /* 右下:false 输出 */
  115. .Blueprint-if-node-false-output {
  116. display: flex;
  117. align-items: flex-end;
  118. justify-content: flex-end;
  119. }
  120. .Blueprint-if-node-false-output .Blueprint-node-port {
  121. position: relative;
  122. right: 0;
  123. }
  124. /* 条件端口样式:让 bool 类型使用红色 */
  125. .Blueprint-if-node .Blueprint-node-port.port-bool .Blueprint-node-port-dot {
  126. background: #f44336;
  127. border: none;
  128. width: 12px;
  129. height: 12px;
  130. border-radius: 50%;
  131. box-shadow: 0 0 6px rgba(244, 67, 54, 0.5);
  132. }
  133. .Blueprint-if-node .Blueprint-node-port.port-bool.connected .Blueprint-node-port-dot {
  134. background: #ef5350;
  135. box-shadow: 0 0 10px rgba(244, 67, 54, 0.7);
  136. }
  137. /* 条件标签样式 */
  138. .Blueprint-if-node .Blueprint-node-port[data-port-type="data"] .Blueprint-node-port-label {
  139. color: #e0e0e0;
  140. font-size: 12px;
  141. font-weight: 500;
  142. margin-left: 6px;
  143. }
  144. /* true/false 输出端口标签样式 */
  145. .Blueprint-if-node .Blueprint-node-port.output.port-execution .Blueprint-node-port-label {
  146. color: #ffffff !important;
  147. font-size: 12px;
  148. font-weight: 600;
  149. margin-right: 6px;
  150. text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  151. display: inline-block;
  152. opacity: 1;
  153. visibility: visible;
  154. }
  155. /* 执行端口箭头样式 */
  156. .Blueprint-if-node .Blueprint-node-port-arrow {
  157. filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
  158. }
  159. /* 确保端口可见且可交互 */
  160. .Blueprint-if-node .Blueprint-node-port {
  161. pointer-events: auto;
  162. position: relative;
  163. display: flex;
  164. align-items: center;
  165. gap: 4px;
  166. z-index: 2;
  167. }
  168. .Blueprint-if-node .Blueprint-node-port.output {
  169. flex-direction: row;
  170. }
  171. .Blueprint-if-node .Blueprint-node-port.input {
  172. flex-direction: row;
  173. }