silver-zepp / zeppos-autogui

AutoGUI: Rapid GUI Prototyping for ZeppOS
9 stars 2 forks source link

gui.newRow makes the app not work #1

Closed Noxde closed 8 months ago

Noxde commented 8 months ago
import AutoGUI from "@silver-zepp/autogui";

Page({
  state: {},
  build() {
    const gui = new AutoGUI();

    // add a text widget
    const my_text = gui.text("Hello, world!");

    //split the line
    gui.newRow();

    // add a button widget with a click event
    gui.button("Click me!", () => {
    // update the text widget on button click
      my_text.update({ text: "Button clicked!" });
    });

    // finally render the GUI
    gui.render();
  },
});

Following the hello world example using gui.newRow() will leave a blank screen (using the simulator or in the actual watch), if newRow is removed the app will work as expected though the layout will be different obviously.

Im using a gtr3 watch on Zepp OS 1.0

Noxde commented 8 months ago

Should instead use gui.newLine(); just found it.