mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
added highlight color to the input panel
This commit is contained in:
committed by
Bruno Perdigão
parent
f8f22257b4
commit
a3b2860789
@@ -405,11 +405,15 @@ class WallPolylineDecorator:
|
||||
self.font_id = 0
|
||||
blf.size(self.font_id, 12)
|
||||
color = self.addon_prefs.decorations_colour
|
||||
blf.color(self.font_id, *color)
|
||||
color_highlight = self.addon_prefs.decorator_color_special
|
||||
offset = 20
|
||||
new_line = 20
|
||||
keys = list(self.input_panel.keys())
|
||||
for i, text in enumerate(texts):
|
||||
if keys[i] == self.input_type:
|
||||
blf.color(self.font_id, *color_highlight)
|
||||
else:
|
||||
blf.color(self.font_id, *color)
|
||||
blf.position(self.font_id, self.mouse_pos[0] + offset, self.mouse_pos[1] + offset - (new_line * i), 0)
|
||||
blf.draw(self.font_id, text + self.input_panel[keys[i]])
|
||||
|
||||
|
||||
@@ -564,6 +564,9 @@ class DrawPolylineWall(bpy.types.Operator):
|
||||
self.input_type = event.type
|
||||
self.number_input = []
|
||||
self.number_output = ''
|
||||
WallPolylineDecorator.set_input_panel(self.input_panel, self.input_type)
|
||||
tool.Blender.update_viewport()
|
||||
|
||||
|
||||
if event.value == 'PRESS' and event.type in {'RIGHTMOUSE', 'ESC'}:
|
||||
self.is_input_on = False
|
||||
@@ -604,8 +607,10 @@ class DrawPolylineWall(bpy.types.Operator):
|
||||
|
||||
if event.value == 'PRESS' and event.type in {'RET', 'NUMPAD_ENTER'}:
|
||||
tool.Snaping.insert_polyline_point(float(self.input_panel['X']), float(self.input_panel['Y']))
|
||||
tool.Blender.update_viewport()
|
||||
self.is_input_on = False
|
||||
self.input_type = None
|
||||
WallPolylineDecorator.set_input_panel(self.input_panel, self.input_type)
|
||||
tool.Blender.update_viewport()
|
||||
|
||||
if event.type in {'MIDDLEMOUSE', 'WHEELUPMOUSE', 'WHEELDOWNMOUSE'}:
|
||||
return {'PASS_THROUGH'}
|
||||
|
||||
Reference in New Issue
Block a user