lib:menu

none

Aŭtoro
rssa_romeo
Ĉiutagaj instaloj
0
Tutaj instaloj
3
Ratings
0 0 0
Versio
3
Kreita
2024/04/10
Ĝisdatigita
2024/05/15
Licenco
GPLv3
Aplikiĝas al
Ĉiuj retejoj

example:

const menu = loadlib("menu")
const z = new menu(
  { test1: { ctrlKey: true, key: "a" } },
  [
    {
      text: "test1",
      type: "key",
      innerstyle: {
        color: "green",
        width: "500px",
      },
      tab: 1,
      outerstyle: {
        color: "red",
      },
      allowmodifiers: true,
      keyreturntype: "object",
    },
    {
      type: "none",
      text: "------------------------------------",
      outerstyle: {
        color: "black",
      },
    },
    {
      type: "button",
      text: "test",
      buttontext: "test2",
      hint: `test hint
  test hint
  test hint
  test hint
  test hint
  test hint
  test hint<b>asdasd</b>
  test hint
  test hint
  test hint
  test hint
  test hint
  `,
      hinttype: "text",
      onclick(e) {
        log(e)
      },
      oncontextmenu(e) {
        log(e)
      },
    },
    { type: "select", text: "ttt", options: [1, 2, 3] },
    { type: "range", text: "213", min: 0, max: 10 },
    { type: "select", text: "333", options: [1, 2, 3] },
    { type: "select", text: "ttt", options: [1, 2, 3] },
  ],
  log
)
z.show()