#Help with json ui

1 messages · Page 1 of 1 (latest)

obtuse tartan
#

Hello there I was working on a hud for a npc and for some reason i am not able to display my two huds seperately (text box and the quest thingy) i am using action form script to display them and they are pretty much opening for any action form gui and not a specific one

#

I'll drop my code here as well:

  • Server form:
{
  "namespace": "server_form",
  "[email protected]_screen": {
    "$screen_content": "server_form.main_screen_content"
  },
  "main_screen_content": {
    "type": "panel",
    "controls": [
      { "custom_textbox_hud@cb_textbox.main_panel": { "layer": 10 } },
      { "custom_guild_menu@cb_guildmenu.main_panel": { "layer": 10 } },
      {
        "hidden_vanilla_factory": {
          "type": "factory",
          "control_ids": { "long_form": "server_form.empty_panel" }
        }
      }
    ]
  },
  "empty_panel": { "type": "panel", "size": [ 0, 0 ], "visible": false }
}
#
  • Textbox:
{
  "namespace": "cb_textbox",
  "main_panel": {
    "type": "panel",
    "size": [ 256, 256 ],
    "anchor_from": "center",
    "anchor_to": "center",
    "offset": [ 0, -20 ],
    "controls": [
      {
        "background": {
          "type": "image",
          "texture": "textures/ui/cb_fm_guild_textbox_hud_screen",
          "size": [ 256, 256 ],
          "anchor_from": "center",
          "anchor_to": "center",
          "layer": 1
        }
      },
      {
        "invisible_yes_btn": {
          "type": "button",
          "size": [ 46, 16 ],
          "anchor_from": "bottom_right",
          "anchor_to": "bottom_right",
          "offset": [ -12, -26 ],
          "layer": 2,
          "$pressed_button_name": "button.form_button_0",
          "button_mappings": [
            {
              "from_button_id": "button.menu_select",
              "to_button_id": "$pressed_button_name",
              "mapping_type": "focused"
            }
          ],
          "controls": [
            { "default": { "type": "panel" } },
            { "hover": { "type": "panel" } },
            { "pressed": { "type": "panel" } }
          ]
        }
      },
      {
        "invisible_no_btn": {
          "type": "button",
          "size": [ 46, 16 ],
          "anchor_from": "bottom_right",
          "anchor_to": "bottom_right",
          "offset": [ -12, -8 ],
          "layer": 2,
          "$pressed_button_name": "button.form_button_1",
          "button_mappings": [
            {
              "from_button_id": "button.menu_select",
              "to_button_id": "$pressed_button_name",
              "mapping_type": "focused"
            }
          ],
          "controls": [
            { "default": { "type": "panel" } },
            { "hover": { "type": "panel" } },
            { "pressed": { "type": "panel" } }
          ]
        }
      }
    ]
  }
}