add new nodes

This commit is contained in:
t3du 2021-10-11 17:41:03 -03:00 committed by GitHub
parent b8319fe28b
commit 67d511568f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,11 @@
from arm.logicnode.arm_nodes import *
class GetGlobalCanvasFontSizeNode(ArmLogicTreeNode):
"""Returns the font size of the entire UI Canvas."""
bl_idname = 'LNGetGlobalCanvasFontSizeNode'
bl_label = 'Get Global Canvas Font Size'
arm_version = 1
def arm_init(self, context):
self.add_output('ArmFloatSocket', 'Size')

View file

@ -0,0 +1,14 @@
from arm.logicnode.arm_nodes import *
class CanvasSetProgressBarColorNode(ArmLogicTreeNode):
"""Sets the color of the given UI element."""
bl_idname = 'LNCanvasSetProgressBarColorNode'
bl_label = 'Set Canvas Progress Bar Color'
arm_version = 1
def arm_init(self, context):
self.add_input('ArmNodeSocketAction', 'In')
self.add_input('ArmStringSocket', 'Element')
self.add_input('ArmColorSocket', 'Color In', default_value=[1.0, 1.0, 1.0, 1.0])
self.add_output('ArmNodeSocketAction', 'Out')

View file

@ -0,0 +1,14 @@
from arm.logicnode.arm_nodes import *
class SetGlobalCanvasFontSizeNode(ArmLogicTreeNode):
"""Sets the font size of the entire UI Canvas."""
bl_idname = 'LNSetGlobalCanvasFontSizeNode'
bl_label = 'Set Global Canvas Font Size'
arm_version = 1
def arm_init(self, context):
self.add_input('ArmNodeSocketAction', 'In')
self.add_input('ArmFloatSocket', 'Size', default_value=10)
self.add_output('ArmNodeSocketAction', 'Out')