Browse Source

Fix helper.py syntax error

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
4741892ee6
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      helper.py

+ 4
- 4
helper.py View File

@@ -162,7 +162,7 @@ def create_manifest(plugin_dir, slug=None):

# Query manifest information
if not slug:
slug = input_default("Plugin slug (unique identifier)", slug)
slug = input_default("Plugin slug (unique identifier)")
manifest['slug'] = slug
manifest['name'] = input_default("Plugin name", slug)
manifest['version'] = input_default("Version", "1.0.0")
@@ -478,13 +478,13 @@ struct {identifier}Widget : ModuleWidget {{
if len(components['widgets']) > 0:
source += "\n"
for c in components['widgets']:
else:
if 'x' in c:
source += f"""
// mm2px(Vec({c['width']}, {c['height']}))
if 'x' in c:
addChild(createWidget<Widget>(mm2px(Vec({c['x']}, {c['y']}))));"""
else:
source += f"""
addChild(createWidgetCentered<Widget>(mm2px(Vec({c['cx']}, {c['cy']}))));"""
addChild(createWidget<Widget>(mm2px(Vec({c['x']}, {c['y']}))));"""

source += f"""
}}


Loading…
Cancel
Save