the knob labels are centered between the right border of the middle knobs and the right border of the display
This commit is contained in:
4
knobs.py
4
knobs.py
@ -44,8 +44,8 @@ class Knobs:
|
|||||||
label_fx_name = font_helvetica.render(knob.name, False, color_primary_light)
|
label_fx_name = font_helvetica.render(knob.name, False, color_primary_light)
|
||||||
label_fx_value = font_helvetica.render('[ ' + str(int(round(knob.value * 100, 0))) + '% ]',
|
label_fx_value = font_helvetica.render('[ ' + str(int(round(knob.value * 100, 0))) + '% ]',
|
||||||
False, color_primary_light)
|
False, color_primary_light)
|
||||||
|
min_x = self.knobs[5].get_position()[0] + self.knobs_radius * 1.5
|
||||||
label_x = self.gui.screenW - label_fx_name.get_width() - 20
|
label_x = min_x + (self.gui.screenW - min_x - label_fx_name.get_width()) / 2
|
||||||
label_y = (self.gui.screenH - label_fx_name.get_height() - label_fx_value.get_height()) / 2
|
label_y = (self.gui.screenH - label_fx_name.get_height() - label_fx_value.get_height()) / 2
|
||||||
self.gui.screen.blit(label_fx_name, (label_x, label_y))
|
self.gui.screen.blit(label_fx_name, (label_x, label_y))
|
||||||
self.gui.screen.blit(label_fx_value, (label_x, self.gui.screenH / 2))
|
self.gui.screen.blit(label_fx_value, (label_x, self.gui.screenH / 2))
|
||||||
|
|||||||
Reference in New Issue
Block a user