#JSON-UI General

1 messages · Page 37 of 1

opal aurora
#

seems worthless although it is possible

#

since you still can press tab to autocomplete name

formal ember
#

can someone tell me how i open a custom ui

untold dawn
#

to make a UI for the hud_screen that will be changed/updated based on current events, i can do that using titles/chatmessages only right?

outer stag
#

Cool af, and I'm extremely excited to see just how many more addons are made thanks to this tool.

#

🫡

untold dawn
#

this... will save me days of making UI's for my upcoming blocks and features in my exe addon

oak verge
#

Glad to hear that

oak shoal
#

for example, I want a double trunk

#

@oak verge

untold dawn
# mental crystal Yeah.

well, chatmessages will be a bad idea bec of the spam will happen and i dont think it is possible to make it not visible, so the only one i should use is the titles,,

mental crystal
#

Uhh you can.

untold dawn
mental crystal
oak verge
untold dawn
mental crystal
#

I can send you a sample wait.

untold dawn
#

sure, cuz i will make 2 separate addons ( a thirst addon - a temperature addon ) both of them will have their own UI so i need to make them work fine together,

mental crystal
#

// chat_screen.json

{
  "messages_text": {
    "type": "panel",
    "size": [
      "100%",
      "100%cm"
    ],
    "modifications": [
      {
        "array_name": "bindings",
        "operation": "remove",
        "where": {
          "binding_name": "#chat_visible",
          "binding_name_override": "#visible"
        }
      },
      {
        "array_name": "bindings",
        "operation": "insert_front",
        "value": [
          {
            "binding_type": "global",
            "binding_name": "#chat_visible"
          },
          {
            "binding_type": "global",
            "binding_name": "#text"
          },
          {
            "binding_type": "view",
            "source_property_name": "(#chat_visible and not (('%.6s' * #text) = 'coddy.') and not (('%.5s' * #text) = 'bruh.'))",
            "target_property_name": "#visible"
          }
        ]
      }
    ]
  }
}```
oak shoal
mental crystal
#

Hide the text if it starts with coddy. or bruh.

mental crystal
untold dawn
oak shoal
#

? @mental crystal

untold dawn
oak verge
#

check "im_the_real_king_of_clouds" chest addon

oak shoal
oak shoal
oak verge
oak shoal
#

thanks

oak verge
#

this go without saying, but do get permission if you are planning to use it

oak shoal
#

Do you know how that icon works, when you put the mouse over it, text appears on the side?

mental crystal
# untold dawn but, will it show empty on the chat? ( like it has an empty bar showing up )

// chat_screen.json

{
  "messages_text": {
    "modifications": [
      {
        "array_name": "bindings",
        "operation": "remove",
        "where": {
          "binding_name": "#chat_visible",
          "binding_name_override": "#visible"
        }
      },
      {
        "array_name": "bindings",
        "operation": "insert_front",
        "value": [
          {
            "binding_type": "global",
            "binding_name": "#chat_visible"
          },
          {
            "binding_type": "global",
            "binding_name": "#text"
          },
          {
            "binding_type": "view",
            "source_property_name": "(§z + #text)",
            "target_property_name": "#new_text"
          }
          {
            "binding_type": "view",
            "source_property_name": "(#chat_visible and (not ((#new_text - 'coddy.') = #new_text)))",
            "target_property_name": "#visible"
          }
        ]
      }
    ]
  }
}```

// hud_screen.json
```js
{
  "chat_grid_item/chat_background": {
    "bindings": [
      {
        "binding_type": "collection",
        "binding_name": "#chat_text",
        "binding_name_override": "#text",
        "binding_collection_name": "chat_text_grid"
      }
      {
        "binding_type": "view",
        "source_property_name": "(§z + #text)",
        "target_property_name": "#new_text"
      }
      {
        "binding_type": "view",
        "source_property_name": "((#text = '') or (not ((#new_text - 'coddy.') = #new_text)))",
        "target_property_name": "#visible"
      }
    ]
  }
}```
oak shoal
#

It's like a non-clickable button, but it shows a message when you interact with it, or put the mouse over it.

mental crystal
oak shoal
#

lol

oak shoal
mental crystal
# oak shoal yess

y'know the basics of json ui? And also, usejs "<any name>.common.hover_text": { "property_bag": { "#hover_text": "TEST" } }

oak shoal
mental crystal
# oak shoal just that?

Yeah, put it in the controls of your hover of your buttons, then add that in the controls of it.

oak shoal
#

If I want to use this, do I just need to set an offset to position and place it inside the controls of my custom form?

mental crystal
#

Or whatever.

mental crystal
untold dawn
dapper berry
#

I have a problem with Progress Bar

#

The custom Progress Bar just wont appear

#

Fixed it

lethal wind
#

how would I make an image that covers the entire screen

hollow needle
#

Does someone know why this doesn't work?```json
{
"paperdoll": {
"type": "custom",
"renderer": "live_horse_renderer",
"property_bag": {
"#entity_id": "#entity_id"
},

      "anchor_from": "center",
      "anchor_to": "center",
      "size": [ "50%", "50%" ],
      "offset": [ 0, -10 ],
  
      "bindings": [
        {
          "binding_type": "collection_details",
          "binding_collection_name": "form_buttons"
        },
        {
          "binding_name": "#form_button_text",
          "binding_collection_name": "form_buttons",
          "binding_type": "collection"
        },
        {
          "binding_type": "view",
          "source_property_name": "(#form_button_text - '.paperdoll')",
          "target_property_name": "#entity_id"
        },
        {
          "binding_type": "view",
          "source_property_name": "(not ((#form_button_text - '.paperdoll') = #form_button_text))",
          "target_property_name": "#visible"
        }
      ]
    }
  }
#

I'm doing form.button(entity.id + '.paperdoll') from the script

#

For some reason it only does work when I only pass the entity id without .paperdoll as the button text and replace (#form_button_text - '.paperdoll') to just #form_button_text

mental crystal
#

not so sure about that you can maybe try to multiply it by 1

placid geode
mental crystal
placid geode
#

yeah

#

"#entity_id": "-123456" works

#

"#entity_id": -123456 doesnt works

mental crystal
#

Ohh so he should do §z thingy then.

placid geode
#

nope

#

the only possible way afaik is passing the ID directly

placid geode
#

you can use #form_button_texture for that lol

mental crystal
#

Ohh btw, I used grids in 1.21.70 and it's broken asf

#

and I just discovered that divider is counted as buttons too

placid geode
#

bro, mojang uses the same #form_button_text binding for that ☠️

#

"mojang doing hacky things" lol

#

at least I think it will help in terms of performance

mental crystal
mental crystal
#

Especially the hud screen locator bar

placid geode
#

json ui 🔛🔝

mental crystal
#

Ngl it kinda a look goofy when I tried it.

placid geode
mental crystal
#

Since if I activate 2 the original cursor is invisible

mental crystal
placid geode
#

well, the cursor is also a renderer

#

So I don't think it's possible, maybe it would be best to create another cursor using titles

mental crystal
#

sigh chat screen, here I come

dusky jacinth
#

Can I get this UI?

left yew
hollow needle
hollow needle
#

I did work, thanks

formal ember
#

how do i make a custom ui visible on screen

sinful crypt
#

How do i make a slot like where i cant place items

mental crystal
sinful crypt
#

a slot where you cannot put items by hand.

mental crystal
#

just wanna clarify you wanna be able to hold the items tho you can't put items in the hotbar if the inventory is opened?

#

ahh just edit the hotbar grid of the inventory screen.

#

I actually forgot how to remove the rest but this one removes one slot of hotbar in the inventory from the right.

// inventory_screen_pocket.json

"hotbar_panel/hotbar_grid": {
  "size": [ 224, 28 ],
  "grid_dimensions": [ 8, 1 ]
}```

// ui_common.json
```js
"hotbar_grid_template": {
  "size": [ 144, 18 ],
  "offset": [ -9, -5 ],
  "grid_dimensions": [ 8, 1 ]
}```
#

just experiment a bit.

mental crystal
#

For the ui common the default size is 162, 18 and for grid dimension it's 9, 1 same case just subtract 1 in dimension and subtract 18 in size. Per slot.

hollow needle
#

Does min_size not work?

#

Or is it for a specific element type?

formal ember
#

i was trying to make a simple panel like the effects screen, but dont know how to enable/make it visible on screen. Can someone help? Code:

  "namespace": "test",

  //---------------------------
  // Controls
  //---------------------------

  "test_background": {
    "type": "image",
    "size": 10,
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "offset": [ 4, 4 ],
    "texture": "textures/ui/mob_effect_background"
  },

  //---------------------------
  // CONTENT
  //---------------------------

  "test_content": {
    "type": "panel",
    "controls": [
      { "[email protected]_background": {} }
    ]
  },

  //---------------------------
  // Screen
  //---------------------------
  
  "main_screen": {
    "type": "panel",
    "controls": [
      { "[email protected]_content": {} }
    ]
  },
  
  "[email protected]_screen": {
      "close_on_player_hurt": true,
      "$screen_content": "test.main_screen",
      "$screen_bg_content": "common.screen_background",
      "$screen_background_alpha": 0.4
  }
}```
sick shell
sick shell
#

You are only able to build onto the already existing screens.

formal ember
#

but how do i do that

sick shell
formal ember
# sick shell https://wiki.bedrock.dev/json-ui/add-hud-elements

so replacing the previous code like this should work, right?

  "namespace": "test",
  
  "hud_square": {
      "type": "image",
      "texture": "textures/ui/Black",   // vanilla texture
      "anchor_from": "top_middle",
      "anchor_to": "top_middle",
      "size": [ 64, 64 ],
      "offset": [ 0, 4 ]
  },

  "hud_text": {
      "type": "label",
      "text": "hud text",
      "anchor_from": "top_right",
      "anchor_to": "top_right",
      "offset": [ -4, 4 ]
  },

  "root_panel": {
      "modifications": [
          {
              "array_name": "controls",
              "operation": "insert_front",
              "value": [
                  { "[email protected]_square": {} },
                  { "[email protected]_text": {} }
              ]
          }
      ]
  },
}```
#

and adding a texture called Black

sick shell
#

No remove the namespace since you are modifying an already existing screen.

formal ember
#

ok

#

do i have to remove the outer pair of curly brackets too

#

?

#

i still have to put it in _ui_defs.json ,right?

formal ember
#

@sick shell

oak verge
#

if it is not a vanilla name file, yes

formal ember
#

i think

#

how do i activate/display it on screen though

hollow needle
#

Why does this not work? "size": [ "100%", "100% - 100%sm" ],

#

Wait, wrong line

#

Now its correct

#

The element just dissapears

sinful crypt
#

since I know nothing about JSON UI bb_smile

#

And I just want to make a slot where I can't put anything

oak verge
sinful crypt
#

Ohh

sinful crypt
#

It's a crafting result slot

#

I shouldn't be able to place items there

oak verge
#

but you can shift click item there
So be careful

sinful crypt
#

i cant take thee item from the slot

#

since its a crafting result slot, i should be only not able to place items

#

it is indeed not interactable

#

cant even take the item from the crafting result slot

untold dawn
#

lets start making my hydration addon UI,
this is necessary right? bao_act_downvote

  "thirst_renderer":{
    "type":"custom",
    "size":[1,1],
    "renderer":"thirst_renderer",
    "layer":1,
    "bindings":[{"binding_name":"#show_survival_ui","binding_name_override":"#visible"}]
  },```
#

{ trying to make the thirst bar render like the vanilla hunger bar }

cloud kite
#

This UI is getting too complex 😭

So im trying to basically do what was done before with Text-sidebar_0 (and 1, 2, etc...)

Where a variable is detected "Text-hotbar" and the title is shown exactly in the position of where the hunger bar would be (hunger bar removed)

I tried duplicating it and replicating the workflow but I can't get it to work, it just makes the entire UI break and become invisible.

mental crystal
untold dawn
mental crystal
#

huh? Never seen that even in preview.

untold dawn
#

nanana its a custom UI

hybrid aurora
#

hello, is there a way to center elements in a scrolling panel ?
here is my code :

"buttons_grid": {
  "type": "stack_panel",
  "size": [400, 130],
  "orientation": "horizontal",
  "anchor_to": "center",
  "anchor_from": "center",
  "controls": [
      {
                                                                                  "[email protected]_panel": {
      "$show_background": true,
      "size": ["100%", "100%"],
      "$scrolling_content": "selector.bt_panel",
      "$scroll_size": [5, "100%"],
      "$scrolling_pane_size": ["100%", "100%"],
      "$scrolling_pane_offset": [0, 0],
                                                                                      "$scroll_bar_right_padding_size": [0, 0]
              }
        }
    ]
}
untold dawn
mental crystal
mental crystal
#

It's not as simple as 123

untold dawn
mental crystal
#

Nahh I find it interesting and somewhat "easy"

untold dawn
#

anyways,

#

this is a valid texture UI element, thing

  "thirst_image":{
    "type":"image",
    "texture":"textures/ui/thirst_background",
    "size":[9,9],
    "layer":1,
    "alpha":0.65
  },```right?
untold dawn
# mental crystal Yes.

alright, next: making the UI element appear only on survival and the offset will be changed depending on the game UI ( pocket/desktop )

mental crystal
untold dawn
# mental crystal Yes.

overall, this shit will not work at all right?

{
  "namespace":"hud",
  "thirst_renderer":{
    "type":"custom",
    "size":[1,1],
    "renderer":"thirst_renderer",
    "layer":1,
    "bindings":[{"binding_name":"#show_survival_ui","binding_name_override":"#visible"}]
  },
  "thirst_image":{
    "type":"image",
    "texture":"textures/ui/thirst_background",
    "size":[9,9],
    "layer":1,
    "alpha":0.65
  },
  "centered_gui_elements_at_bottom_middle":{
    "type":"panel",
    "anchor_from":"bottom_middle",
    "anchor_to":"bottom_middle",
    "size":[ 180,50 ],
    "controls":[
      {
        "thirst_rend@thirst_renderer":{
          "offset":[ -1,-40 ],
          "anchor_from":"bottom_left",
          "anchor_to":"bottom_left"
        }
      }
    ],
    "bindings":[
      {
        "binding_name":"#hud_visible_centered",
        "binding_name_override":"#visible",
        "binding_type":"global"
      }
    ]
  },
  "centered_gui_elements_at_bottom_middle_touch":{
    "type":"panel",
    "anchor_from":"bottom_middle",
    "anchor_to":"bottom_middle",
    "size":[ 200,50 ],
    "controls":[
      {
        "thirst_rend@thirst_renderer":{
          "offset":[ -1,-40 ],
          "anchor_from":"bottom_left",
          "anchor_to":"bottom_left"
        }
      }
    ],
    "bindings":[
      {
        "binding_name":"#hud_visible_centered_touch",
        "binding_name_override":"#visible",
        "binding_type":"global"
      }
    ]
  },
  "not_centered_gui_elements":{
    "type":"panel",
    "controls":[
      {
        "thirst_rend@thirst_renderer":{
          "offset":[ 2,2 ],
          "anchor_from":"top_left",
          "anchor_to":"top_left"
        }
      }
    ],
    "bindings":[
      {
        "binding_name":"#hud_visible_not_centered",
        "binding_name_override":"#visible",
        "binding_type":"global"
      }
    ]
  }
}```
mental crystal
hybrid aurora
#

it doesn't work

    "buttons_panel": {
        "type": "panel",
        "size": [
            "100%",
            "100%c"
        ],
        "anchor_to": "center",
        "anchor_from": "center",

        "controls": [
            {
                "buttons_grid": {
                    "type": "grid",
                    "grid_item_template": "server_selector_form.custom_button_panel",
                    "grid_fill_direction":"horizontal",
                    "grid_rescaling_type":"horizontal",
                    "size": [
                        "100%",
                        "100%c"
                    ],
                    "anchor_to": "center",
                    "anchor_from": "center",

                    "factory": {
                        "name": "buttons",
                        "control_name": "server_selector_form.custom_button_panel"
                    },
                    "collection_name": "form_buttons",
                    "bindings": [
                        {
                            "binding_name": "#form_button_length",
                            "binding_name_override": "#maximum_grid_items"
                        }
                    ]
                }
            }
        ]
    }
#

sorry for flooding

mental crystal
#
"centered_gui_elements_at_middle_touch": {
  "modifications": [
    {
      "array_name": "controls",
      "operation": "insert_back",
      "value": [
        {
          "[email protected]_renderer": {}
        }
      ]
    }
  }
}```
#

@untold dawn

untold dawn
formal ember
#

can someone tell me how to make a custom ui appear on the screen please?

mental crystal
mental crystal
formal ember
#

i did that

#

and meant that

#

sorry for not specifically saying that

untold dawn
#

or adjust it a little bit,

mental crystal
formal ember
#

my code looks like that :P

#
  "hud_square": {
      "type": "image",
      "texture": "textures/ui/Black",   // vanilla texture
      "anchor_from": "top_middle",
      "anchor_to": "top_middle",
      "size": [ 64, 64 ],
      "offset": [ 0, 4 ]
  },

  "hud_text": {
      "type": "label",
      "text": "hud text",
      "anchor_from": "top_right",
      "anchor_to": "top_right",
      "offset": [ -4, 4 ]
  },

  "root_panel": {
      "modifications": [
          {
              "array_name": "controls",
              "operation": "insert_front",
              "value": [
                  { "[email protected]_square": {} },
                  { "[email protected]_text": {} }
              ]
          }
      ]
  }
}```
untold dawn
formal ember
#

basically the example inside the documentation

mental crystal
#

That works for me tho.

formal ember
#

uh i had to name the file like that?

mental crystal
formal ember
#

:P

#

thanks for telling me that

#

oh wait im dumb

#

i forgor the texture -_-

untold dawn
# mental crystal Yeahhh

uh, this is fine or fucked up?

{
  "namespace": "hud",
  "thirst_renderer": {
    "type": "panel",
    "size": [1,1],
    "layer": 1,
    "bindings": [
      {
        "binding_name": "#show_survival_ui",
        "binding_name_override": "#visible"
      }
    ]
  },
  "thirst_image": {
    "type": "image",
    "texture": "textures/ui/thirst_background",
    "size": [
      9,
      9
    ],
    "layer": 1,
    "alpha": 0.65
  },
  "centered_gui_elements_at_middle_touch": {
    "modifications": [
      {
        "array_name": "controls",
        "operation": "insert_back",
        "value": [
          {
            "[email protected]_renderer": {}
          }
        ]
      }
    ]
  }
}```
formal ember
#

uh it now replaces the background of the log output gui

#

this should happen right?

hybrid aurora
#
"$custom_size": [
    440,
    135
],

"variables": [
    {
        "requires": "(#form_text = 1)",
        "$custom_size": [110, 135]
    },
    {
        "requires": "(#form_text = 2)",
        "$custom_size": [220, 135]
    },
    {
        "requires": "(#form_text = 3)",
        "$custom_size": [330, 135]
    },
    {
        "requires": "(#form_text = 4)",
        "$custom_size": [440, 135]
    }
]

how can i modify custom size value depending on the form text value (it doesn't work for the moment)

#

even with "1" in the form body, the custom size remains the same

mental crystal
#

It's kinda hard to del with nunber

#

Also you can't use binding in variables

mental crystal
hybrid aurora
untold dawn
untold dawn
#

in the hud screen,

untold dawn
untold dawn
hollow needle
#

How can I make it so the second child element from an stack panel adjusts its size depending on how big the first element is?

#

The stack panel has a static size but the first child element depends on its content

#

I want the second child element to have a different size depending on that

#

But 100% - 100%sm doesn't work

sick shell
tawny gale
#

Quick Question, how would i check the value of a #text field and if its one value, lets say 50 i display "Yes" and if its 100 i display "No"

pliant dagger
#

is it possible to get rid of the space in chat im trying to make a dynamic chat rank system but im not good at json ui

hardy lily
#

anyone know how to reduce a lag in serverform?

#

because I have plenty server form ui and component inside

hollow needle
hollow needle
#

Like (#text = '50')

valid ridge
#

whats the ui file name of common_buttons ?

placid geode
hollow needle
#

Does anybody know how to fix it when a button that is supposed to not be visible in a grid is still pushing the other buttons?

#

It doesn't happen with stack panel

sick shell
lean estuary
#

is it possible to change the offset of the "X" or exit button on a small chest? in the image i want to lower the button down to the corner or smth

hollow needle
#

Like making them have 2 controls and only the one with size 0, 0 will be visible

mental crystal
#

"$show_close_button": false

lean estuary
chilly yacht
hollow needle
hollow needle
weary wind
#

Does anyone have the link to the JSON UI create?

#

Not the wiki

sinful crypt
#

does anyone know why does this show that error

#

@placid geode can u help

hollow needle
# sinful crypt

I think that's because small_chest_panel does not exist in that file

normal moat
hardy lily
#

well, efficiency is the key

sick shell
#

Well loaded not rendered

#

It should affect loading time not performance

hardy lily
#

it freezes the game for about milliseconds

hexed briar
#

I don't wanna be that person but.

untold dawn
#

its just a self promotion

hexed briar
untold dawn
hexed briar
#

just little reminder that if nobody able to help, you'll have to figure it yourself

#

not just doing that

untold dawn
hexed briar
untold dawn
#

try/failed?

hexed briar
#

it's not documented officially, even mojang themselves don't want anyone to do anything with it

#

they don't really support people doing json-ui stuff

untold dawn
chilly yacht
#

theres another method of rendering forms 1 at a time so the ones in the background arent loaded at all

gaunt apex
normal moat
sinful crypt
untold dawn
#

why is this happening? the image size is not correct for some reason

#

its fine with the tb:20.0, but anything below 20.0 will make it large

normal moat
untold dawn
#

I'll try to fix it,

normal moat
untold dawn
#

ye

untold dawn
#

its a progress bar,

normal moat
untold dawn
normal moat
#

then it should not have any problem. ig you messed up some other stuff

#

maybe check your panels and image sizes and your bindings if they're working correctly

untold dawn
# normal moat then it should not have any problem. ig you messed up some other stuff

check it out:

"custom_progress_bar": {
        "$update_string": "tb:",
        "type": "image",
        "texture": "textures/ui/thirst_background",
        "size": ["11.75%","11.75%"],
        "anchor_from":"center",
        "anchor_to":"center",
        "offset":[59.5,105],
        "controls": [
            {
                "progress": {
                    "type": "image",
                    "texture": "textures/ui/thirst_bar",
                    "size": ["100%","100%"],
                    "layer": 1,
                    "$one": 1,
                    "$max_health": 20.0,
                    "clip_direction": "right",
                    "clip_pixelperfect": false,
                    "bindings": [
                        {
                            "binding_type": "view",
                            "source_control_name": "data_control",
                            "source_property_name": "((#preserved_text - $update_string) * $one)",
                            "target_property_name": "#health"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(($max_health - #health) / $max_health)",
                            "target_property_name": "#clip_ratio"
                        }
                    ],```
normal moat
#

and you should use pixels instead of percentages for the bar

untold dawn
normal moat
#

what's your textures look like?

normal moat
#

it's a full texture?

untold dawn
#

yes

normal moat
#

uhm I don't recommend using clip ratio for 'icon bars'

normal moat
untold dawn
#

afaik that what the clip ratio uses

#

the texture looks like this, its a line of bars,

normal moat
# untold dawn the texture looks like this, its a line of bars,

since its just the same texture repeated, you can just use one texture for empty, half and full to create a stack of 10 icons controlled by bindings.

If you only want to use clip ratio then check your data control and bindings. also you can do tb:20, tb:19 etc, instead of tb:19.0

untold dawn
normal moat
untold dawn
#

so i have to use 20.0 for it to work, ig

normal moat
untold dawn
normal moat
#

this -> tb:20 instead of tb:20.0

untold dawn
#

without the : or something?

normal moat
untold dawn
normal moat
untold dawn
normal moat
untold dawn
#

ah,

normal moat
#

well I can't really tell because I cannot test it rn. If you send the code maybe I can check it

normal moat
untold dawn
#

then, why it doesn't work properlybao_foxxo_blank

normal moat
untold dawn
#

both has the same issue

normal moat
#

im guessing that % is messing up your texture size

untold dawn
#

lets see,

untold dawn
#

still, the same issue

normal moat
#

what does it look like ?

untold dawn
#

the same bugged thing

normal moat
#

why are you setting size 100, 100 if your image's size is 125, 14

untold dawn
#

just for testing, ig

normal moat
#

that is why it's stretched and not correct...

untold dawn
normal moat
#

yeah

untold dawn
normal moat
untold dawn
#

i see how it works now,

untold dawn
#

ty for helping, i appreciate itbao_doggo_happy

normal moat
#

Nice, no prob

untold dawn
#

hmm,

#

where should i use this variable "requires":"($desktop_screen)" to make the image showing only on desktop screen? ( classic/pocket )

#

inside of the "root_panel"?

trim harbor
untold dawn
#

import {ActionFormData} from '@minecraft/server-ui';

trim harbor
untold dawn
mental crystal
untold dawn
mental crystal
untold dawn
#

so i have to make a new panel that will have a controls of the image,

#

alright let's try that

sick shell
untold dawn
#

tt = double test

    "tt": {
    "type":"panel",
    "ignored":"($desktop_screen)",
    "controls":[{"custom_progress_bar@custom_progress_bar":{}}]
    },```
untold dawn
mental crystal
placid geode
#

try with "ignored": "$pocket_screen"

untold dawn
placid geode
#

you can use ignore on anything

untold dawn
# placid geode you can use ignore on anything

with that being said,
this should work right?

"custom_progress_bar": {
        "$update_string": "tb:",
        "type": "image",
        "texture": "textures/ui/thirst_background",
        "size": [79,9],
        "anchor_from":"bottom_middle",
        "anchor_to":"bottom_middle",
        "offset":[59.5,-42.5],
        "ignored":"($pocket_screen)",←```
placid geode
#

yes

untold dawn
#

lets see,

mental crystal
untold dawn
#

should i use bindings?

placid geode
#

remove ()

untold dawn
placid geode
#

hmmm

untold dawn
mental crystal
#

Send the binding

untold dawn
#

"bindings": [{"binding_name": "#show_survival_ui","binding_name_override": "#visible"}],

#

this thing make it visible only in survival mode,

#

which is needed in my addon,

placid geode
#

use #hud_visible_not_centered

mental crystal
#

Can't you just put that in modifications of the centered gui touch and not not centered gui?

untold dawn
#

i prefer making the anchor and the offset separated

untold dawn
# placid geode use #hud_visible_not_centered

uh, this should work

"tt": {
    "type": "panel",
    "$ignore_desktop": true,
    "$ignore_pocket": false,
    "variables": [
      {
        "requires": "$desktop_screen",
        "$ignore_desktop": false,
        "$ignore_pocket": true
      }
    ],
    "controls": [
      {
        "desktop_hud@custom_progress_bar": {
          "ignored": "$ignore_desktop",
          "anchor_from": "bottom_middle",
          "anchor_to": "bottom_middle",
          "offset": [59.5,-42.5]
        }
      },
      {
        "pocket_hud@custom_progress_bar": {
          "ignored": "$ignore_pocket",
          "anchor_from": "top_left",
          "anchor_to": "top_left"
        }
      }
    ]
  },```
untold dawn
#

but each time u change it from pocket to desktop or from desktop to pocket it will not be changed instantly, u have to reload the world in order to get the right offset.

sick shell
untold dawn
#

like who will change the screen display from desktop to pocket ingame?

#

anyways,

#

how am i going to change the offset of the oxygen bar? without adding the full vanilla code*

mental crystal
untold dawn
mental crystal
#

or middle_touch

untold dawn
mental crystal
#

that's why modifications exists.

untold dawn
untold dawn
#

ah wait, right

#

i see,

mental crystal
#

change <0/1> with actual number to 0 or 1

untold dawn
untold dawn
untold dawn
#

f

#

anyways,

mental crystal
#

the parent then the children's

untold dawn
#

ya i see how it works now,

mental crystal
#

I made the thirst bar background as small as this.

untold dawn
#

nvm*

gaunt apex
#

why the right label not showed?, but the icon/image showed, how to fix this?,

rocky quail
untold dawn
#

how am i going to add 2 different titles there?
"((#text - 'tb:') = #text)",
it should hide both tb: and ob: so how am i going to add the ob: one?

untold dawn
sick shell
# untold dawn uh, how exactly?

how am i going to add 2 different titles there?
"((#text - 'tb:' - 'ob:') = #text)",
it should hide both tb: and ob: so how am i going to add the ob: one?

untold dawn
#

lets try it,

untold dawn
#

which is in here #1351896422370508930 ( not self promotion or forcing anybody for help )

hollow needle
#

How to hide buttons in a grid?

#

I tried just making them not visible but they still keep pushing the other buttons

#

I also tried setting a dynamic size but it didn't work either

#

This is what I have rn

oak verge
hollow needle
oak verge
#

Use multiple

hollow needle
#

It wont be dynamic then

#

The amount of buttons is not static

oak verge
#

I guess

hollow needle
#

I just added more buttons at the start so it has an entire empty row

#

And then reduced the grid size by the button's height

#

Actually it required double the button's height for some reason

untold dawn
#

uh, my ui system is kinda bugged

#

sneaking = title tb:19.0 which fill the thirst bar

untold dawn
# untold dawn sneaking = title tb:19.0 which fill the thirst bar

the issue is inside of this section

                    "bindings": [
                        {
                            "binding_type": "view",
                            "source_control_name": "data_control",
                            "source_property_name": "((#preserved_text - $update_string) * $one)",
                            "target_property_name": "#health"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(($max_health - #health) / $max_health)",
                            "target_property_name": "#clip_ratio"
                        }
                    ],
                    "controls": [
                        {
                            "data_control": {
                                "type": "panel",
                                "size": [0, 0],
                                "bindings": [
                                    {
                                        "binding_name": "#hud_title_text_string"
                                    },
                                    {
                                        "binding_name": "#hud_title_text_string",
                                        "binding_name_override": "#preserved_text",
                                        "binding_condition": "visibility_changed"
                                    },
                                    {
                                        "binding_type": "view",
                                        "source_property_name": "(not (#hud_title_text_string = #preserved_text) and not ((#hud_title_text_string - $update_string) = #hud_title_text_string))",
                                        "target_property_name": "#visible"```
#

it should detect numbers in the title tb:0.0/1.0/2.0 etc, but when i try to type a number without the tb: it will fill up the thirst bar

untold dawn
stone coyote
#

is it possible to get the current size of the element?

normal moat
stone coyote
#

Don't those bindings only control the size?

nova bay
#

how can i delete the player list part

#

and what is the png of the background and button of the forms

#

?

mental crystal
nova bay
#

alr did

mental crystal
#

you put in that exact file name?

nova bay
#

yh

mental crystal
#

then I dunno, it works with me.

nova bay
nova bay
rough drum
#

Is there anyone who knows a way I can test the resource pack without having to re-enter and exit the world every time?

restive lance
#

/reload all

#

it reloads behavior and resource packs

rough drum
hexed briar
delicate lotus
trim harbor
#

Hello everyone, is there anyone offering a custom UI design service for a set price? If you're interested, please send me samples of your previous work and your pricing in private messages.
Like that

frigid drift
#

Can I have a list of json label font type? and also is MinecraftFive a font type? I cant see it working.

sick shell
untold dawn
#

@mental crystal i need ur help here #1351975164929249322

chilly yacht
#

or MinecraftSeven

#

but thats just default i think

gaunt apex
#

how to make the color symbol work for bindings?

hexed briar
#

hehehe memory leak with bindings go brrrr

rocky quail
delicate lotus
nova bay
delicate lotus
#

No i mean the one in dev resources

#

Gg if u did

hexed briar
#

performance gets absolutely eradicated and chunk loads very slow too

#

no idea how did i do it but yeah

#

bindings does indeed can cause memory leak

untold dawn
#

this

"thirstbar_effect_background": {
        "$update_string": "xHydTB:",
        "$update_text": "xEhydTB:",
        "type": "image",
        "texture": "textures/ui/thirst_background_effect",
        "size": [79, 9],
        "bindings": [
            {"binding_name": "#show_survival_ui"},
            {
                "binding_type": "view",
                "source_control_name": "thirstbar_effect_control",
                "source_property_name": "(#preserved_text - $update_text)",
                "target_property_name": "#visible"
            },
            {
                "binding_type": "view",
                "source_property_name": "(#show_survival_ui and #is_visible)",
                "target_property_name": "#visible"
            }
        ],
        "controls": [
            {"thirstbar_effect_progress@thirstbar_effect_progress": {}},
            {
                "thirstbar_effect_control": {
                    "type": "panel",
                    "size": [0, 0],
                    "bindings": [
                        {"binding_name": "#hud_title_text_string"},
                        {
                            "binding_name": "#hud_title_text_string",
                            "binding_name_override": "#preserved_text",
                            "binding_condition": "visibility_changed"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(not ('@' + #hud_title_text_string = '@' + #preserved_text) and not (('@' + #hud_title_text_string - $update_text) = '@' + #hud_title_text_string))",
                            "target_property_name": "#visible"
                        }
                    ]
                }
            }
        ]
    },```is showing and hiding, but when i hide it, it will no longer visible again
untold dawn
normal moat
#

I have no idea ngl

untold dawn
#

i will be working on the system of the thirst while waiting for someone to fix itbao_foxxo_blank

jovial hemlock
slim oyster
hexed briar
slim oyster
#

Oh wow

oak shoal
#

Guys, does anyone know how to hide the message that a player entered the world and left, via json UI?

#

multiplayer.player.joined=§c
multiplayer.player.left=§c
I want to hide the black background of the players message when they enter and exit the world

cloud kite
#

You could just have JSON UI Detect the text and not pass it to the UI

#
  "chat_grid_item/chat_background": {
    "bindings": [
      {
        "binding_type": "view",
        "source_property_name": "(('§␛' + #text + '§r') - ('§␛' + $notification_flag_0e34fd) = ('§␛' + #text + '§r'))",
        "target_property_name": "#visible"
      }
    ]
  }```
heady falcon
#

Where can I find documentation on the dialogue json?

valid swan
#

;^; potato 🥔

tall sand
#

hey i have some questions

#

is there a way to set a stack panel to go from bottom -> top

#

instead of its default going from top -> bottom

valid swan
tall sand
#

that kinda screws my java chat thing up

#

because then on update my messages get pushed up

sick shell
restive lance
sick shell
#

also add resolve_sibling_scope if thats needed

frigid drift
#

i found a button mapping somewhere where it uses tab key to toggle the button. my problem is it doesnt work well with toggle view binding. how can i make this work?

    "$toggle_view_binding_name": "toggle",
    "$button_mappings": [
            {
              "from_button_id": "button.scoreboard",
              "to_button_id": "button.menu_select",
              "mapping_type": "global"
            }
       ],
    "size": [20,20]
  }, 
tawny gale
#

Is there a way to conditionally display a ✓ if the #form_button_text is equal to a certain value?? I'm using HeroBrians & LeGend's chest UI and i want to show a ✓ if the stack size = 64 and not the number 64

oak shoal
#

Is it possible to remove the @ in the chat when tagging a player? I want to remove the @

pseudo garden
#

does anyone have a simple pack that adds a custom form i can look at?

west dawn
hexed briar
#

make a Acode port and my life will be yours

west dawn
#

of my extension xd? I would have to look into their api

hexed briar
#

yeah if you're working with Ace editor before, i think this might be feasible.

#

Acode uses ace editor and slams a big plugins support for it, kinda like VScode.

viral oxide
#

Anyone know how to convert an int value to a float?

#

I'm trying to mult a number by 1.5 but its flooring the multiplicative before

#

i.e 85 * 1.5 = 85

mental crystal
#

I don't think there is?

viral oxide
#

so not possible?

stone coyote
#

can anyone explain what's happening here?

#

sorry wrong channel

crystal cloud
#

Is someone know what button is this? I need the pressed button name

sick shell
placid geode
#

"$float": 1.5,
85 * $float

crystal cloud
terse breach
#

how can i change the texture of an inventory slot in a ui

#

ive been desperately searching for like 3 days but i geniunely cant find anything 😭

#

its probably really simple but im failing miserably so end my suffering

#

i tried overlaying it with an image panel but it didnt render

terse breach
#

for a custom inventory

#

im not trying to change the texture of every slot i just want a slot of a different color for my particular ui

sick shell
#

this was added on preview, not used tho?

#

No way they added #is_spectator_mode binding

jovial hemlock
#

is there a way to get a MalformedResponse from a modal in the "@minecraft/server-ui" 2.0.0 beta?

#

in the past i used to add a normal button in the modal to get that response

#

but they remove it

hollow needle
#

Is it possible to rotate an element with animations?

viral oxide
#

I don’t think it’s possible to rotate an element at all(?) if it is someone pls fact check me

#

Wait actually no, it must be, the yellow splash text rotates

jovial hemlock
#

I tried with normal buttons but didn’t worked

#

Still I found out another better way to do what I was trying to achieve with this

hexed briar
#

though making text rotated is kinda possible back then but now it's just no.

#

they removed or make it unfunctional at some point.

patent bramble
#

Is it possible to create a sort of custom autocorrect for the chat menu?

neat sequoia
#
"show_hair_option_anim": {
        "anim_type": "offset",
        "from": [0, 0],
        "to": ["-5%", "18%"],
        "easing": "in_quart",
        "duration": 0.25
    }

I have three animations, and they are the same, they move the item down with the next item, is it possible to make the “from” of the animation take the current position of the item?

#

if I click on “Eye” now, it pulls from its initial position, and it should pull from the position it is in now

sharp zinc
#

how does one use clip ratio?

#

i'm having issues with it where it just doesn't do anything, i've changed it so many times 😭

sick shell
normal moat
#

and they are somehow inverted

sick shell
#

it makes sense cus 1 represents fully clipped/cut

turbid nimbus
#

this malformed response is caused by search bar in the GrimUI which requires you to manually catch (malformed for forms, but still valid) packets with custom server software in order to retrieve its value

neat sequoia
#

they re all buttons:

  • Cabelo
  • Olho
  • Tom de Pele
#

and i want:

  • Offset Animation start from the current item position
crystal cloud
#

Anyone know what's this panel or control name? The exit game confirmation

oak verge
#

it is used for server forms too and some other places, so keep that in mind

patent bramble
#

Does json UI support conditional text replacement?

patent bramble
#

Does this work for chat

oak verge
#

-# he is referring to the input section

normal moat
#

hmm.. input section, generally- no.

#

text replacement is possible but not conditional

patent bramble
#

Damnit

#

I wanted to create resource sided shorthands for some commands

#

Like /gms would translate to /gamemode survival

#

Is there no way to do it, for example a custom localized lang file?

normal moat
patent bramble
#

So what im seeing here is there is no way to read player chat input via only resources?

normal moat
#

Yeah, afaik.

patent bramble
#

Man that sucks

#

I didnt wanna use a menu cause it felt clunky

normal moat
#

you can use bps and scripts, that would be easy if you can

patent bramble
#

I know but then I wouldn't be able to use it in the pack I'm making

normal moat
patent bramble
#

Output in input to an unused binding and compare that?

normal moat
#

you can try different stuff, i don't really know what would be the outcome

patent bramble
#

Appreciate the info regardless

mental crystal
#

Tbh, I dunno how to read but to forcefully put values in chat is what I know lol

patent bramble
#

Yeah the read part was the important part tho

#

Is there no element in the chat window that holds player input?

#

Like surely the UI must reference it somewhere

normal moat
#

basically, every textbox has a binding called #item_name (property_field) which returns the current text inside it

patent bramble
#

Could I not compare #item_name to a value then?

normal moat
#

you can.. thats how search bars work

patent bramble
#

Then return a different value from the factory if both match?

normal moat
#

Putting a value after comparing it is what I have no idea about.

patent bramble
#

All I should need then is the method to forcefully put stuff in the chat

#

@mental crystal

#

You said you knew this part right?

#

It seems like all the components are here

mental crystal
#

if I can still find the file.

patent bramble
#

In theory this could work no?

mental crystal
#

So it's a bit janky, so when I was trying to plan making the clickable chat text and it work, I cna display texts when hovered, for the chat, I made a new element, a chat panel, since in chat theres a property bag where its where the valeus are put in the chatbox.

patent bramble
#

So we can read chat is what you're saying?? (IDC if it's a little scuffed as long as it works)

#

Read and write

#

That's what we need

#

so.
IF #item_name = value then
Factory: value to #item_name
End

I'm para coding to make sure I understand the logic.

clear lantern
#

Hello, I need help with bindings - I have couple custom json ui's form server forms. Like here:

              "binding_type": "view",
              "source_property_name": "(#title_text = '§l§uMenu Timer')",
              "target_property_name": "#visible"
            }

But I would like make that if there is no custom title - it will display default server form. Is there any way to achieve that?

normal moat
patent bramble
#

I just need help to test the concept as I can't currently get MC on the device I'm on

#

That and I'm extremely rusty

normal moat
patent bramble
#

cause couldn't something like this be useful to developers of those techy resources packs?

#

You'd essentially have custom /commands for ui

clear lantern
#

And if I would like to add multiple bindings, so like this: "(not (#title_text = '§l§uMenu Timer') and (not (#title_text = '§l§uTimer')"

normal moat
#

yeah

#

check the bracket in the last one thou

mental crystal
patent bramble
#

I know they exist

#

In beta rn

#

But I'm talking completely resource pack sided

mental crystal
#

and what's the purpose?

patent bramble
#

Shorthands for commonly used commands

#

This is gonna be a global resource pack usable anywhere

mental crystal
#

eh?? what's the purpose of commands if the commands can't run anything?

#

It's resource packs what'd I expect?

patent bramble
#

instead of /gamemode C just type /gmc

#

It'll autocorrect itself to the right command and save time in the long run

mental crystal
#

Soo just like tab?

patent bramble
#

A bit like tab but for many different commands

#

there's a reason some servers do the same with plugins

#

It's convenient

#

Plus I could also use these commands to bring up different UIs if that's ever needed

#

/compass could render a compass on the hud

#

I just like the idea of being able toggle stuff in chat

#

That's if it works tho

#

And I haven't got the tools to code or test it atm

clear lantern
# normal moat yeah

"source_property_name": "(not (#title_text = 'menu1')) and (not (#title_text = 'menu2')) and (not (#title_text = 'menu3')) and (not (#title_text = '§l§uMenu Timer'))",

It's not working. It's only shows properly the first menu ('§l§uMenu Timer'), but if I click another button in form which should go to menu2, the menu2 form is broken like both custom and default form are layered

placid geode
#

add one ( at the beginning

oak verge
patent bramble
#

Can't UI's share data with other UI's?

#

I could just export a var / state?

clear lantern
#

Thanks!

placid geode
#

not possible

normal moat
patent bramble
normal moat
#

no.

arctic crypt
#

How do I remove the inventory name?

patent bramble
normal moat
#

most probably, not possible.

normal moat
oak verge
#

or just use § in naming the entity

arctic crypt
frigid drift
#

try using image ig

neat sequoia
neat sequoia
#

But now I have another problem: why does the animation run only once and when I click on the button again nothing happens?

neat sequoia
#

how??

#
"show_hair_options": { // Show the Options like: Modelo and Cor
        "anim_type": "size",
        "from": ["100%", "15%"],
        "to": ["100%", "36%"],
        "easing": "in_quart",
        "duration": 1.5,
        "play_event": "button.show_hair_button",
        "end_event": "button.hide_hair_button"
    },
    "hide_hair_options": { // Hide these options
        "anim_type": "size",
        "from": ["100%", "36%"],
        "to": ["100%", "15%"],
        "easing": "in_quart",
        "duration": 1.5,
        "play_event": "button.hide_hair_button",
        "end_event": "button.show_hair_button"
    },
    "hair_hide_button": { // I have 2 buttons in my panel, one will hide when the other one is shown
        "anim_type": "offset",
        "from": ["1000%", "0%"],
        "to": ["0%", "0%"],
        "easing": "in_quart",
        "duration": 0.1,
        "play_event": "button.show_hair_button",
        "end_event": "button.hide_hair_button"
    },
    "hair_show_button": { // I have 2 buttons in my panel, one will hide when the other one is shown
        "anim_type": "offset",
        "from": ["1000%", "0%"],
        "to": ["1000%", "0%"],
        "easing": "in_quart",
        "duration": 0.1,
        "play_event": "button.hide_hair_button",
        "end_event": "button.show_hair_button"
    },

these last two animations are for the buttons, since one has to disappear for the other to appear, but I think this animation needs to be reset as well

frigid drift
#

anyways

#

animation_reset_name does the thing

#

play_event only run once

frigid drift
neat sequoia
neat sequoia
frigid drift
#

same thing u did on play event

#

and also

#

its for the button not on animation itself

#

for example

#
   "preview": {
    ...,
    "offset": "@namespace.in_preview",
    "animation_reset_name": "preview.back",
...
...button {
  "pressed_button_name": "preview.back"
}
#

i forgot if theres $ on pressed button name or not but i believe theres no dollar sign

neat sequoia
frigid drift
#

afaik animation_reset_name can be used in panels text or some

#
   "animtext": {
    "type": "text",
   "label": "test",
    "offset": "@namespace.animation",
    "animation_reset_name": "anims.show",
...

for panel

#

anims.show is button name

#

once the button is pressed, it runs @namespace.animation

#
...namespace

"animation": {
        "anim_type": "offset",
        "from": [0, 0],
        "to": [15, 0],
        "easing": "in_quart",
        "duration": 1.5
    },
neat sequoia
#

ohh ok

#

i will try

sharp zinc
#

How does one make a stack panel go from the bottom to the top instead of the normal vertical way?

#

nvm

#

now i'm having another issue

sharp zinc
#

nvm i got it done

hexed briar
#

did color anims on label just broke?

#

mine stopped working for some reason.

sick shell
final matrix
#

how to use dynamic property in json

dapper berry
#

What do i change to get the offset for the buttons to be more on screen

#

I need it in the top left btw

cloud kite
#

I can tell that’s tenpenny tower and the revere satellite dish array

earnest wind
#

How can I add an image to a server form?

dapper berry
#

I had gotten the pack just to use its textures for my fallout addon

mental crystal
#

You asked this multiple of time and I answered you multiple times too

#

just get the value stored in the damn dynamic property and transfer to readable by json ui.

placid geode
#

:v

mental crystal
sick shell
#

theres this too but idk where to put them

earnest wind
#
                "0@server_form.crafters_button": {
                    "$icon_size": [8, 8],
                    "$button_size": [16, 16],
                    "$offset": [0, -50],
                    "collection_index": 0
                }},
                {
                "1@server_form.crafters_button": {
                    "$icon_size": [8, 8],
                    "$button_size": [16, 16],
                    "$offset": [100, 100],
                    "collection_index": 1
                }
            }
#

Why is the id of button 2 "0"?

normal moat
earnest wind
earnest wind
#

But the id of the buttons is "0"

#

I want the 1st button to be "0" and the 2nd button to be "1"

unique swan
#

Bro bunun buttonlarin offsetle kac saata yaparsin ayni hizaya getirmek icin

earnest wind
normal moat
unique swan
#

Senden collection_panel kullanmani istiyor type

unique swan
#

Aga ingilisce konuş ben oylesine yazdim abi

#

Yaptigim harita uide bunun gibiydi ben sadece collection panel kullanmadan yaptim

unique swan
earnest wind
earnest wind
hexed briar
unique swan
sick shell
#

Super Circle-ly

dapper berry
#

Or custom?

#

Looks super nice

#

Gives me like a consele type vibe

#

you should also change the panorama or maybe add a static image?

hexed briar
dapper berry
hexed briar
#

though this is in-development version.

#

not exactly out yet

dapper berry
#

Havent seen it in so long and didnt bother to look there

dapper berry
hexed briar
dapper berry
#

Looks more like other games ones now

#

I love static look

#

Since panorama requires you to have a full 360 view of a location and I felt like it doesnt much good for my fallout addon

#

so I used static image

hexed briar
#

I don't exactly like custom image in the background because of performance reasons.

dapper berry
#

I dont have any performance issue with this one

hexed briar
#

Minecraft itself doesn't really like a large images even just a simple texture pack

dapper berry
#

The only issue is from vanilla minecrafts new ui for play

#

That gives intense lag for me every since it came out

#

in the new version there is less but still bad

hexed briar
#

i don't really have any lags on it tbh

#

just little 50ms longer loading time

#

doesn't lag whatsoever, works fine on my phone so i don't really care that much.

dapper berry
#

and on a godang fridge it worked fine

#

That was a joke btw, I dont think there is a fridge edition yet

clear lantern
#

My first, fully made by me custom script form with changed texture and positioned text label and buttons! I must tell it here 😄

#

(It's not pretty, but still I did it myself)

frigid drift
#

is it possible to have progress bars on server forms

hexed briar
#

evil gmail icon

clear lantern
frigid drift
#

do yall have samples on using progress bar on server forms?

frigid drift
#

or can i just use preserve title text bindings on server forms

normal moat
frigid drift
#

so what will be the way for it to use progress bars in server forms?

normal moat
#

You can create a progress bar in server form but it will not update on the same form screen (execpt animation)

frigid drift
#

yup i just want to show provided progress number per form

#

like for example i will open one form only with specific number provided inteded for that bar

normal moat
#

basically create a progress bar and bind clip_ratio property of image to any binding

frigid drift
#

how about the text or the data of it? is that possible?

normal moat
#

you can use a dummy button to get data using #form_button_text

#

or just use body text

frigid drift
#

oh so i can use #form_button_text as a data for my bar?

#

and also do i need to pass #form_button_text on my bindings areay first before putting it into the data control of the bar?

#

like for example binding_***: "#form_button_text"

normal moat
#

you don't need data control

frigid drift
#

oh got it

normal moat
# frigid drift oh got it
 "type": "image",
                    "size": [70, 6],
                    "layer": 1,
                    "clip_direction": "left",
                    "clip_pixelperfect": false,
                    "texture": "textures/ui/experiencebarfull",
                    "bindings": [
                        {
                            // get button binding
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "#form_button_text",
                            "target_property_name": "#clip_ratio"
                        }
                    ]
#

just make sure that clip ratio is a value from 0-1 so you have to use floats

frigid drift
#

okay okay tysm

frigid drift
#

the bindings of the custom button of server form?

normal moat
#

which is form.body('hello')

frigid drift
#

can i use form.label instead? cus i think thats a new one and also i have to use form.body for info things

normal moat
#

you can but that's same as using buttons.. you still have to get its specific collection index

frigid drift
#

oh okok so whats the binding for form_text

#

came up with this code

normal moat
#

#form_text

frigid drift
#
  "progress": {
    "$max": 100.0,
    "type": "image",
    "texture": "textures/ui/experiencebarempty",
    "size": [70,6],
    "controls": [
      {
       "pf": {
                "type": "image",
                    "size": ["100%", "100%"],
                    "layer": 1,
                    "clip_direction": "left",
                    "clip_pixelperfect": false,
                    "texture": "textures/ui/experiencebarfull",
                    "bindings": [
                        {
                            // get button binding
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(($max - #form_button_text) / $max)",
                            "target_property_name": "#clip_ratio"
                        }
                    ]
           }
      }
      ]
  }```
normal moat
#
{
  "binding_name": "#form_text"
}
frigid drift
#

okay thanks

tawny gale
#

Hey folks, if I wanted to have a panel with dynamically placed buttons on (I would pass in an X,Y coord) do I need a button factory??

weak cape
#

it was ass so i changed it to this after taking actual refrence

west dawn
#

uhm

#

these textures

#

where did you got them from?

#

not the graphic in the middle

clear lantern
#

Tekstures from second are sooo nice. Thank you guys, that you are in this community 😅

weak cape
west dawn
#

Ah well that makes a little more sense

#

probably was the same guy then

weak cape
#

I think i shouldnt say this but ehh 🤷

clear lantern
#

How I can make custom progress bar inside server form? And best way would be to use scoreboards. But I'm having troubles with the code from LeGend tutorial about custom progress bar

normal moat
clear lantern
#

But when I'm using body for info. Can I set this up for button name? Like if there is button 65 it will make progress bar to 65% value?

normal moat
unique swan
#

Hello

normal moat
# clear lantern But when I'm using body for info. Can I set this up for button name? Like if the...
"collection_panel": {
  "type": "collection_panel",
  "size": [],
  "collection_name": "form_buttons",
  "controls": [{
      "button@server_form.dynamic_button": {
        "collection_index": 0 // buttons index that you have sent info from
        "bindings": [
          {
                "binding_name": "#form_button_text", // now you can get this binding to use it anywhere
                "binding_type": "collection",
                "binding_collection_name": "form_buttons"
            },
          {
                "binding_type": "collection_details",
                "binding_collection_name": "form_buttons"
          }
      ]
    }
  }]
}

should work ig

pine furnace
#

One message removed from a suspended account.

normal moat
pine furnace
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

normal moat
pine furnace
#

One message removed from a suspended account.

clear lantern
# normal moat ```json "collection_panel": { "type": "collection_panel", "size": [], "col...
    "$max_value": 100.0,
    "type": "image",
    "texture": "textures/ui/experiencebarempty",
    "size": [70, 6],
    "offset": [0, 20],
    "controls": [
      {
        "progress": {
          "type": "image",
          "size": ["100%", "100%"],
          "layer": 1,
          "clip_direction": "left",
          "clip_pixelperfect": false,
          "texture": "textures/ui/experiencebarfull",
          "bindings": [
            {
              "binding_type": "collection",
              "binding_collection_name": "form_buttons",
              "binding_name": "#form_button_text",
              "binding_name_override": "#progress_value",
              "binding_condition": "(collection_index = 2)"
            },
            {
              "binding_type": "view",
              "source_property_name": "(($max_value - #progress_value) / $max_value)",
              "target_property_name": "#clip_ratio"
            }
          ]
        }
      }
    ]
  }
                          "custom_progress_bar@server_form.custom_progress_bar": {
                            "collection_index": 2
                          }
                        }

I have something like this, it shows progress bar, but it's not working. Can you help me more with that?
It's combination of your hud progress bar and your current idea, but still it doesn't work

normal moat
#

welp

#

I would say use #form_text

#

just set its first 2 characters as your progress bars data and then get its first two characters. in your body, subtract the first two chracters so they dont show up in body text

#

@clear lantern like this

"custom_progress_bar": {
    "$max_value": 100.0,
    "$one": 1.0,
    "type": "image",
    "texture": "textures/ui/experiencebarempty",
    "size": [70, 6],
    "offset": [0, 20],
    "controls": [
      {
        "progress": {
          "type": "image",
          "size": ["100%", "100%"],
          "layer": 1,
          "clip_direction": "left",
          "clip_pixelperfect": false,
          "texture": "textures/ui/experiencebarfull",
          "bindings": [
            {
              "binding_name": "#form_text"
            },
            {
              "binding_type": "view",
              "source_property_name": "(($max_value - (('%.2s' * #form_text) * $one)) / $max_value)",
              "target_property_name": "#clip_ratio"
            }
          ]
        }
      }
    ]
  }
clear lantern
# normal moat <@500047624012038147> like this ```json "custom_progress_bar": { "$max_value...

I have this now,

{
                    "form_text": {
                      "type": "label",
                      "text": "#form_text",
                      "anchor_from": "top_left",
                      "anchor_to": "top_left",
                      "color": "black",
                      "offset": [8, 8],
                      "size": ["100% - 16px", "default"],
                      "controls": [
                        {
                          "custom_progress_bar": {
                            "$max_value": 100.0,
                            "$one": 1.0,
                            "type": "image",
                            "texture": "textures/ui/experiencebarempty",
                            "size": [70, 6],
                            "offset": [0, 20],
                            "controls": [
                              {
                                "progress": {
                                  "type": "image",
                                  "size": ["100%", "100%"],
                                  "layer": 1,
                                  "clip_direction": "left",
                                  "clip_pixelperfect": false,
                                  "texture": "textures/ui/experiencebarfull",
                                  "bindings": [
                                    {
                                      "binding_name": "#form_text"
                                    },
                                    {
                                      "binding_type": "view",
                                      "source_property_name": "(($max_value - (('%.2s' * #form_text) * $one)) / $max_value)",
                                      "target_property_name": "#clip_ratio"
                                    }
                                  ]
                                }
                              }
                            ]
                          }
                        }
                      ]
                    }
                  },

Under I have buttons. But it's still not working. This is only place, in this server form, where #form_text is used twice

normal moat
#

tbh cannot say anything right now because I cannot test stuff

clear lantern
normal moat
normal moat
#

nvm lmao

valid swan
#

Does anyone have sprites of the ore ui textures?

clear lantern
normal moat
#

amazing. to remove the 65, do this:

{
    "form_text": {
        "type": "label",
        "text": "#text",
        "anchor_from": "top_left",
        "anchor_to": "top_left",
        "color": "black",
        "offset": [
            8,
            8
        ],
        "size": [
            "100% - 16px",
            "default"
        ],
        "bindings": [
            {
                "binding_name": "#form_text"
            },
            {
                "binding_type": "view",
                "source_property_name": "(#form_text - ('%.2s' * #form_text))",
                "target_property_name": "#text"
            }
        ],
        "controls": [ ... ]
    }
}
clear lantern
#

Sooo, after I've changed to your code to delete 65 number, it deleted also my full text. 🥲

normal moat
clear lantern
frigid drift
#

any sample of progress bar inside server form? cant manage to make it work lol

#

or at least server_form.js lol

delicate lotus
#

Someone please help me make a custom start screen

frigid drift
#

anyways

dapper berry
#

What are the texture file names for the buttons in start screen?

#

Like the Settings, Play, and Realm

flat mortar
#
(#form_text - ('%.10s' * #form_text))

Why not working this code ?

flat mortar
#
('%.10s' * #form_text)

this code work

placid geode
#

Make sure your #form_text doesn't start with a number

clear lantern
#

How I can scale server form with all things inside of it at once? I made texture for background, set up size etc. but after some checks it can't be good visible. I don't want to again do all things

turbid nimbus
turbid nimbus
hexed briar
#

secret.

turbid nimbus
#

Ok

normal moat
#

json ui creator gatekeeping

hexed briar
#

although it's apart of my update so it'll be out on github open-sourced as usual.

#

probably next few hours

#

actually i might gatekeep it tbh

normal moat
turbid nimbus
frigid drift
#

how to use or get button text from a dummy button in server_form.js? i dont want to use form_text since its an important element for me to use

#

i want to have a dummy button wherein number is written on that button for progress bar purposes

hexed briar
#

though, still. ill release that as an update

#

not gatekeeping it though

hexed briar
#

but yeah, it'll be part of the update

#

i still need some fixing and there. unfortunately the color anim doesn't work for some reason so I'll have to use a duplicated hack.

#

it's just only label.

frigid drift
#

or just where can i read about binding operators? like *, -, and, or, and more

rocky quail
#

i guess

earnest wind
#

How can I add a hover_control to a button?

hexed briar
#

Button mappings somehow able to "run" the said string, so with that. you're able to use that on animation reset property.

#

While that looks like simple, animation part isn't really. since variables just doesn't exactly work well and had to result making my own button from scratch.

rocky quail
#

i think thats the method i used on my animated hover text thing

#

its a little buggy and sometimes does not reset the anim for whatever reason

frigid drift
#

how to use preserve title text on images? cant manage to bind one it still shows up even tho im not running any titles

frigid drift
#
  "main_panel": {
    "type": "image",
    "$qbg": "qbg:",
    "size": [140, 60],
   "texture": "textures/ui/hud_tip_text_background",
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "offset": [-5, 5],
    "alpha": 0.5,
    "controls": [
      {
        "qbg_data": {
        "type": "label",
        "bindings": [
      {
        "binding_name": "#hud_title_text_string"
      },
      {
        "binding_name": "#hud_title_text_string",
        "binding_name_override": "#preserved_text",
        "binding_condition": "visibility_changed"
      },
      {
        "binding_type": "view",
        "source_property_name": "(not (#hud_title_text_string = #preserved_text) and not ((#hud_title_text_string - $qbg) = #hud_title_text_string))",
        "target_property_name": "#visible"
      }
    ]
        }
      }
      ],
    "bindings": [
      {
        "binding_type": "view",
        "source_control_name": "qbg_data",
        "source_property_name": "(#preserved_text - $qbg)",
        "target_property_name": "#visible"
      }
    ]
  }

i am NOT doing this right

#

i wanna show image but its not working

placid geode
#

dont put your data control inside the controls of an element that can become not visible

frigid drift
# placid geode dont put your data control inside the controls of an element that can become not...

so

  "qbg_data": {
        "type": "label",
        "bindings": [
      {
        "binding_name": "#hud_title_text_string"
      },
      {
        "binding_name": "#hud_title_text_string",
        "binding_name_override": "#preserved_text",
        "binding_condition": "visibility_changed"
      },
      {
        "binding_type": "view",
        "source_property_name": "(not (#hud_title_text_string = #preserved_text) and not ((#hud_title_text_string - $qbg) = #hud_title_text_string))",
        "target_property_name": "#visible"
      }
    ]
        },
  
  "root_panel": {
    "type": "image",
    "$qbg": "qbg:",
    "size": [140, 60],
   "texture": "textures/ui/hud_tip_text_background",
    "anchor_from": "top_right",
    "anchor_to": "top_right",
    "offset": [-5, 5],
    "alpha": 0.5,
    "bindings": [
      {
        "binding_type": "view",
        "source_control_name": "qbg_data",
        "source_property_name": "(#preserved_text - $qbg)",
        "target_property_name": "#visible"
      }
    ]
  }```
#

still visible even tho title not activated

hexed briar
#

-# Mine does work prefectly, haven't seen any issues so far.

rocky quail
#

where you goin

#

negative durability goes brrrr

earnest wind
#
"source_property_name": "(#form_button_text - ('%.8s' * #form_button_text))",

How can I set this to take after line 1?

#

So 2. 3. 4. .... Lines

turbid nimbus
earnest wind
normal moat
earnest wind
normal moat
#

give example of what are you trying to do

earnest wind
unique swan
#

How are you Legend?

normal moat
normal moat
#

just subtract the first part

earnest wind
#

How?

#

Is there any sample about this?

normal moat
#

(#form_button_text - ('%.8s' * #form_button_text))

#

change 8 to whatevere you want

earnest wind
#

But I'm gonna make a lot of buttons

#

I will do this differently for each button

normal moat
earnest wind
#

Is it possible to set it to take everything after the "\n"?

earnest wind
normal moat
#

hmm if the position of \n is changing then no.

frigid drift
#

where can i read about bindings operators stuff like *-+% smth like that

lean estuary
#

can we change a inventories texture while it’s open?

clear lantern
#

What I can do with the Ghost button? I have 3 server_forms -> 2x custom and one for default long_form_panel. Custom ones are visible after type title and it works just fine. The issue is, that in one of the custom form I've used image from button collection index 2, which is not used anywhere. BUT when I tried using basic form it shows me ghost button. How I can get rid of it?

Here is my code for image taken from button:

                          "apps_icon_3_display": {
                            "type": "stack_panel",
                            "size": [64, 64],
                            "offset": [-101, -61],
                            "anchor_from": "center",
                            "anchor_to": "center",
                            "collection_name": "form_buttons",
                            "controls": [
                              {
                                "apps_icon_image": {
                                  "type": "image",
                                  "size": [60, 60],
                                  "bindings": [
                                    {
                                      "binding_name": "#form_button_texture",
                                      "binding_name_override": "#texture",
                                      "binding_type": "collection",
                                      "binding_collection_name": "form_buttons"
                                    },
                                    {
                                      "binding_name": "#form_button_texture_file_system",
                                      "binding_name_override": "#texture_file_system",
                                      "binding_type": "collection",
                                      "binding_collection_name": "form_buttons"
                                    },
                                    {
                                      "binding_type": "view",
                                      "source_property_name": "(not ((#texture = '') or (#texture = 'loading')))",
                                      "target_property_name": "#visible"
                                    }
                                  ],
                                  "collection_index": 2
                                }
                              }
                            ]
                          }
sick shell
frigid drift
#

onggah

hardy lily
#

how to get that complex ui?

rocky quail
turbid nimbus
rocky quail
turbid nimbus
# rocky quail button

but how you managed to track hover state? hover_control is preinitialized, so we need some property_bag value to track it

oak shoal
#

How can I hide this?

untold dawn
#

o touch screen, it is correct, but that isn't the case for the pc screen

twilit vessel
#

How to add custom hud elements? Any tutorial?

tawny gale
#

Whats going on with my anchord_offset_value, it works with a hardcoded value but fails on the substringed text value

placid geode
#

you have this

#

i think it should be like this

tawny gale
#

I'll give it a go, pretty sure it was one the plethora of things I've tweaked, but my brain is fried today. Much appreciated

tawny gale
#

well slap my thigh and call me Susan!! turns out it wasnt one of those things i tweaked!! some seriously odd results though!!

#

the cross and box are as expected! not sure why the tick and diamond ahve shifted down that far, i was excepted them to be offest from the top left alex_confused

placid geode
#

are you using stack panel?

tawny gale
#

There are all normal panels, but it does use a button factory, if that makes a difference

untold dawn
# placid geode are you using stack panel?

yao, im getting some issues with the vanilla hud screen elements, more specifically the bubbles renderer, im trying to use the vanilla anchor_from&to and offset, but its simple not rendering correctly at all, so am i have to make it manually or something?

#

vanilla bubbles renderer:

        "bubbles_rend_0@bubbles_renderer": {
          "offset": [ 180, -50 ],
          "anchor_from": "bottom_left",
          "anchor_to": "bottom_left",
}```
#

and i try to use its anchor and offset, it doesn't work correctly.

placid geode
#

there are like 6 bubble renderer on all the screen lol

untold dawn
placid geode
#

2 for centered_gui_elements_at_bottom_middle, 2 for centered_gui_elements_at_bottom_middle_touch, and 2 for not_centered_gui_elements

placid geode
untold dawn
#

for example, this one right here

        "heart_rend@heart_renderer": {
          "offset": [ -1, -40 ],
          "anchor_from": "bottom_left",
          "anchor_to": "bottom_left"
        }```will make the hearts appear on the bottom left, but quite higher
untold dawn
untold dawn
#

see,

        "armor_rend@armor_renderer": {
          "offset": [ -1, -40 ],
          "anchor_from": "bottom_left",
          "anchor_to": "bottom_left"
        }
//
        "heart_rend@heart_renderer": {
          "offset": [ -1, -40 ],
          "anchor_from": "bottom_left",
          "anchor_to": "bottom_left"
        }```both has the same anchor and offset
placid geode
#

armor_rend has hardcoded offset

#

it will offset based on how many hearts you have

untold dawn
#

every hud UI is hardcoded ig

placid geode
#

just renderers

placid geode
untold dawn
#

anyways im trying to fix this issue

#

which i probably did fix it

untold dawn
# placid geode yeah lol

is it correct tho? like is there a better way to do it or something?

  "centered_gui_elements_at_bottom_middle":{"modifications":[{"array_name":"controls","operation":"insert_front","value":[{"[email protected]_renderer":{"anchor_from":"bottom_middle","anchor_to": "bottom_left","offset":[40,-42.5]}}]}]},
  "centered_gui_elements_at_bottom_middle_touch":{"modifications":[{"array_name":"controls","operation":"insert_front","value":[{"[email protected]_renderer":{"anchor_from":"bottom_middle","anchor_to": "bottom_left","offset":[60,-42.5]}}]}]},
  "not_centered_gui_elements":{"modifications":[{"array_name":"controls","operation":"insert_front","value":[{"[email protected]_renderer":{"anchor_from":"top_right","anchor_to": "top_right","offset":[-3,12.5]}}]}]},```
placid geode
#

i think its the best way

#

just make sure it doesnt overlap with other renderers

untold dawn
#

i did,

tawny gale
untold dawn
#

i have moved up the bubbles and the horse hearts

untold dawn
# placid geode just make sure it doesnt overlap with other renderers
  "centered_gui_elements_at_bottom_middle/bubbles_rend_0":{"offset":[180,-61]},
  "centered_gui_elements_at_bottom_middle/bubbles_rend_1":{"offset":[180,-61]},
  "centered_gui_elements_at_bottom_middle_touch/bubbles_rend_0":{"offset":[200,-61]},
  "centered_gui_elements_at_bottom_middle_touch/bubbles_rend_1":{"offset":[200,-61]},
  "not_centered_gui_elements/bubbles_rend_0":{"offset":[-2,23]},
  "not_centered_gui_elements/bubbles_rend_1":{"offset":[-2,23]},```![bao_icon_entities](https://cdn.discordapp.com/emojis/937567566442922084.webp?size=128 "bao_icon_entities")
untold dawn
untold dawn
#

it should set the element to top_right, not center

untold dawn
#

the offset is working, but not the anchor, im wondering why?

tawny gale
#

Certainly getting closer!! i'm guessiing its my arrangement of Stack_panels, grids and panels

untold dawn
#

but it still has some parts that isn't working correctly for some reason

untold dawn
#

@placid geode sorry for the ping but, i need help fixing this unnecessary bug