#JSON-UI General

1 messages ¡ Page 10 of 1

wind briar
#

quick question: how to prevent playersfrom switching dimensions?

#

whats the event called*

#

wrong channel i apologise

nimble jungle
#

does anything inside of controls: [...] get placed on top the the element
not sure how to phrase it but
{
stuffHere,
controls: [more stuff]
}
would more stuff go on top of stuffHere

torpid nymph
#

the controls are the children of the element

nimble jungle
#

ok thought so, thanks!

hard patrol
#

Anyone know why my chest_screen.json stopped working in 1.20.30? It was working fine before this update and I get no error logs. I check the repository and there were no changes made so what's up with that? Did they break something?

torpid nymph
hard patrol
#

Really?

torpid nymph
hard patrol
#

They mention a fix in the comments

#

I could try that

stable grove
#

can i use json ui for marketplace packs?

torpid nymph
#

Just don't mess with things like the player inventory

#

Hud screen changes, npc ui, server forms are all fine

stable grove
torpid nymph
#

ask your project manager though,they might know

hard patrol
sturdy pewter
#

There exist 3 button states
Default, hover, pressed.
Why does the hover state show the whole time? I made the hover button a little bigger, however if i open the ui with the default buttons, i can already see the frame of the hover button. What can i do?

hexed briar
#

there's 4 states, not 3.

#

default, hover, pressed and locked.

sturdy pewter
#

But i used these 3, but still how to fix this problem?

violet light
#

how do I specify the path?

grim wagon
#

icon/apple.png

#

but not sure i havent tested for over a year

normal moat
gray shale
#

what is the inventory background file texture?

limber quartzBOT
#
JSON UI vs. HTML UI

Json UI is created using json config files. It is used to edit vanilla UI. The current UI for the game is built using the json UI engine.

Scripting UI, or html UI, is a new, experimental kind of UI that uses HTML and the js scripting engine. Its pretty much completely undocumented, and not considered particularly stable.

gray shale
#

nah nah i dont wanna do JSON ui rn

#

just replacing the global thing

limber quartzBOT
#
Using relative JSON UI properties

The following can be used as valid values on JSON UI properties such as size, offset, and anim type elements:

• % the percent relative to the parent element
• %c the percent relative to the total width/height of the child element
• %cm the the percent relative to the width/height of the minimum size of all the child elements combined
• %sm the percent relative to the total width/height of the sibling element
• %x the percent relative to the total width; and %y for the height
• px can be used to refer the number of pixels inside strings
• + / - can also be used to add or reduce the size accordingly as you want

Example usage:

"size": [ "100%", "100%" ],
"offset": [ "16% + 4px", "100%" ]

Can also be used in anim type elements and animate relative to the position using %.

"to": [ 0, "100%" ],
"from": [ 0, 0 ]
gray shale
#

I might've asked it wrongly

#

I mean just the PNG for all panel

#

or just inventory at least

#

I just want to make a dark mode of it

#

got the cells done just need some more stuffs

#

nvm found it

unique swan
#

How can I make a text split?

blissful pine
#

How to make sure that if there is no image the text is centered in the middle

torpid nymph
#

offset: [0, 50%]
or
"anchor_from": "center", "anchor_to": "center"

#

You can also use a stack panel and have the image and text as siblings so that they auto-adjust when one is gone

broken trail
south shadow
#

Hi

#

Is it possible to place the coordinate in the upper corner of the screen?

torpid nymph
hexed briar
#

center is default anchor.

#

you do not need to use center anchor unless the existing elements are using non-center.

#

secondly, you also do not need percentage in offset because it's literally useless if you're adjusting it into 3-5 more pixels

hard patrol
#

in what file can I change the size of the title cuz custom one is smol :< (on menu/home screen)

hexed briar
#

wot title

hard patrol
#

Minecraft title

#

is it play_screen.json?

hexed briar
#

check out ui_art_assets_common.json

hard patrol
#

would it help to add size in there

hexed briar
#

you could modify the size in there

hard patrol
#

oh wow. I see they have a max size for it

hexed briar
#

It should apply to all screens that has title.

hard patrol
#

now I just need to move the splash text

#

found it

unique swan
#

How can I make a text split?

broken trail
blissful pine
#

I'm French so I didn't understand

nimble jungle
#

I have a label using a server form button text and was wondering how can I make it so it only sets the text as the first 2 characters of the text.
I have attached my label code

meager phoenix
#

Getting Started

  1. Create a folder titled MyUIAddOn
  2. Inside of MyUIAddOn create a manifest.json (for more information on how to create a manifest.json : https://learn.microsoft.com/en-us/minecraft/creator/documents/resourcepack#building-the-resource-pack ) and a folder named ui.
  3. Inside of the ui folder create a file named _ui_defs.json and a file named server_form.json
  4. Using your browser, navigate to https://github.com/Mojang/bedrock-samples/releases and download the Resource Pack for your version anywhere you’d like (not inside of your resource pack or the folders for Minecraft).
  5. Analyze server_form.json from the newly downloaded Vanilla Resource Pack and the documentation here - https://wiki.bedrock.dev/json-ui/json-ui-intro.html - to find which objects and components you wish to modify. Don’t modify those files directly, and remember, only modify what’s needed as per best practices! (https://wiki.bedrock.dev/json-ui/best-practices.html#only-modify-what-is-necessary)
  6. Once you’ve analyzed what you’ve needed, remember to edit the server_form.json you created in your pack to modify the behavior of that UI. The Objects, Components, and Controls you type and define here will override the default ones when the files merge. You may also need to create your own custom UI file within the ui folder of your add-on, and edit that as well following the guidelines as set forth in https://wiki.bedrock.dev/json-ui/json-ui-intro.html
  7. Make sure that you edit _ui_defs.json within your MyUIAddOn/ui folder to point to any added files you may have created in step 6 that weren’t already a part of the UI format. (You won’t need a new reference to server_form.json in there, but you will need one to my_server_form.json as an example.)
  8. Trial, error and documentation. Make sure you utilize the search function here to look for posts that may solve your problem. Look at other examples of UI to get started.

Accurate?

GitHub

Samples and assets for building Minecraft: Bedrock Edition add-ons - Mojang/bedrock-samples

An introduction to Resource Packs and a tutorial on adding a custom texture to an in-game block

unique swan
#

@nimble jungle source add below

#

@nimble jungle

 {
                                            "binding_type": "view",
                                            "source_property_name": "('%.2s' * #form_button_text)",
                                            "target_property_name": "#visible"
restive crag
meager phoenix
dark island
#

@broken trail dm excuse me?

broken trail
#

?

dark island
nimble jungle
# unique swan <@435562382777909249> ``` { "bindin...
"text": {
                    "type": "label",
                    "font_type": "MinecraftTen",
                    "localize": false,
                    "color": "white",
                    "text": "#form_button_text",
                    "text_alignment": "center",
                    "font_scale_factor": 1,
                    "size": [30, 20],
                    "offset": [0, 2.3],
                    "layer": 10,
                    "bindings": [
                        {
                            "binding_type": "collection_details",
                            "binding_collection_name": "form_buttons"
                        },
                        {
                            "binding_name": "#form_button_text",
                            "binding_type": "collection",
                            "binding_collection_name": "form_buttons"
                        },
                        {
              "binding_type": "view",
              "source_property_name": "('%.2s' * #form_button_text)",
              "target_property_name": "#visible"
                        }
                    ]
                }

a bit confused on how this works, is it something like this as this is not working

broken trail
#

source_property_name must return true or false to set visiblity to true or false I think thats understandable

#

in you code this just takes first 2 chars and nothing else

#

compare it to something like

#

"(('%.2s' * #form_button_text) = 'te')",

#

if those 2 first chars will be "te", this element will be visible

#

otherwise it wont be visiblie you get it?

nimble jungle
#

yeah that makes sense, im just trying to get the first 2 characters from the #form_button_text and have the text set as those 2 characters

nimble jungle
#

ok so I managed to get it to work so it only returns the first 2 characters and set the text as that, but it only works if they are letters, and my first 2 characters are numbers so it wont work. How can I fix this.
This is my binding and im just setting the text as "text": "#text"

{
              "binding_type": "view",
              "source_property_name": "('%.2s' * #form_button_text)",
              "target_property_name": "#text"
                        }
#

Nvm, figured it out

restive crag
#

How do you guys set up your nineslice with form backgrounds? Because I have a layout like this:

⬜⬜
⬜⬜⬜
⬜⬜

And I set up my nineslice size to 1 but the corners are not actually really visible which I really want.

deft veldt
#

does anyone know the name of the bossbar texture?

opal aurora
deft veldt
#

idk much abt json

#

jst cause i was tryna make my bossbar look better a while ago, and now im stuck with this shtty texture, and idk the name to deleteit

opal aurora
deft veldt
opal aurora
deft veldt
#

oh wait

#

dumb quaestion

wind briar
#

does anyone know how to change the font after a line break? like i want the title to be in MinecraftTen but the description should be in default font, just like in Hives Menu

restive crag
#

Where can I find border texture?

restive crag
unique swan
#

@broken trail can you dm me? I asked something

wind briar
#

like menu.button('Only One Text','textures/ui/cancel')

#

how can i add another section to a button

restive crag
#

I'm pretty sure the top one is static and the bottom one is dynamic controlled by scripts

wind briar
#

what is static?

#

how do i add a static label

#

@restive crag do you know :o

dark island
#

@torpid nymph dm

opal aurora
#

and duplicate them into 2 text controls with different fonts

restive crag
wind briar
wind briar
#

with bindings

unique swan
#

@idle anchor Could you please ask me another question?

idle anchor
#

what

restive crag
#

😂

idle anchor
#

what the heck is it with people pinging me out of nowhere this week?

#

i mean, i'm fine with pings, but with no prior context it's so confusing lmao

opal aurora
wind briar
#

inside the script or inside the server_form

wind briar
unique swan
#

@idle anchor I wanted to ask you something via dm

#

I guess you don't check your dm at all

idle anchor
nimble jungle
wind briar
#

@nimble jungle dm please

wicked mountain
#

Uhh can someone help me in making a simple ui?

digital finchBOT
#
a1piolpolars

However JSON UI is complex, it's not very easy. But it's interesting

wind briar
#

what are you guys using to refresh your texture packs? i hate having to close and reopen my world, just to change my button size by 1 pixel

#

like is there smth like /reload but for texture packs?

restive crag
wind briar
#

so like everyone here has to close and reopen their world to refresh their ui?

#

hell nah

stiff urchin
#

Can anyone help me center it and make the buttons work?

unique swan
#

@stiff urchin offset

stiff urchin
#

I've messed with the offset so much, it never centers

wild mason
#

I'm kinda confused how modifications work and where to use them? whenever I add them anywhere it says that it's not present but in the wiki it's definitely listed

wind briar
hard patrol
#

Would it be possible for 1 actionbar text to show 2 UI elements?

restive crag
hard patrol
#

hmm

merry pike
#

How to get bossname in bossbar :()

hard patrol
#

I already have a thing where 1 text shows 1 element

restive crag
# hard patrol example would be great.

Alright

"panel": {
    "type": "panel",
    "size": [] // size here..
    // Do conditional rendering here...

    "controls": [{}, {}] // Put both your elements here..
}
hard patrol
#

ahh briliant!

raven wigeon
#

How can I put a background behind a simple text lable?

restive crag
raven wigeon
#

The text on the label has different lengths

restive crag
# raven wigeon The text on the label has different lengths
"bg": {
   "type": "image",
   "texture": "", // texture here..
   "size": ["100%", "100%c"],

   "controls": [{
       "label": {
           "type": "label",
           "size": ["100% - 7px", "default"], // You should subtract the width until it fit because sometimes the label overlaps the image
          "text": ""
       }
   }]
}
raven wigeon
raven wigeon
#

Nicee

raven wigeon
restive crag
raven wigeon
#

Can I dm you with this?

restive crag
raven wigeon
#

Its that black bar with left heyo

restive crag
raven wigeon
#

Ah I am gonna try this

#

Now it just doesnt show up anymore

restive crag
raven wigeon
#

Ah nvm

#

it works

#

I forgot the default default

raven wigeon
# restive crag Wait

And what if I want the text to have a max length? before it goes to the next line

#

without using \n

restive crag
raven wigeon
#

ah alright Im gonna try this

raven wigeon
raven wigeon
restive crag
faint ocean
#

whats the dressing room screen name in the files?

velvet heath
#

how do i pick the right size for the picture on top of a scorebaord, it always looks to big pr to small and isnt in the center

wild mason
#

anyone that has use modifications care to help me out understand how they actually are used? I tried using them for some elements but it always errors out saying that modifications is not usable

hexed briar
#

modifications are what it does. it only modifies by inserting or getting rid of existing vanilla elements.

#

It's useful for making pack compatible with each other's.

#

aswell able to remove vanilla stuff (well you could just, put ignored on which elements you want to remove it)

wild mason
#

how am I supposed to modify collections in my own forms then if those only work on vanilla elements?

hexed briar
#

you can fetch actual vanilla code from vanilla template and modify from there.

#

I don't think anyone need that modifications property since it was best for compatibility between UI packs

#

another than that, it's useless.

wild mason
#

seems kinda stupid for me to create multiple grids needing to add each element if there is lots of buttons being passed to the form though to then just ignore them, modifications would have made sense in that use case

hexed briar
#

that's how it works honestly

#

If you don't want base vanilla code conflicts with each of your code since, well. it's overriding not actually modifying them, then you might have to rename the element and making sure it does not exist in the base vanilla code

wild mason
#

vanilla conflits are nothing of my worry, it's the servers pack so we manage it ourselves anyway

vocal urchin
limpid quarry
#

i need to make an immitation bar that looks like the boss bar and when lvl will reset at new lvl, i know scripts moslty just not json ui customization

#

mcmmo like in java

unique swan
#

@hexed briar Do you know hover_text?

unique swan
hexed briar
#

@unique swan blocked

#

stop stalking me and asking for help in DMs, Jesus christ

torpid nymph
#

I've blocked like 4 of them

hexed briar
#

DW I have message requests thing on

torpid nymph
#

same, still annoying though

hexed briar
#

It like a mail.

#

you can create ticket here if you want, since something like this are definitely not okay

#

I'm taking that as a last warning, if they did again then yeah some mods here gonna know it.

idle anchor
left yew
past stirrup
#

:O

#

i also get asked in dms about scripting help lol

hexed briar
#

this dude somehow have that dedication just to ask literal everybody

left yew
past stirrup
#

Yeah

last pollen
#

How do I edit the minecraft title screen?

tacit verge
#

whos doing JSON-UI Commissions?

limpid quarry
#

When was the last time Json ui was updated like versions..., or is it not something that gets updated?

plain heath
#

never

torpid nymph
#

they do bug fixed sometimes but they don't update it

wind briar
raven wigeon
#

How do I make a text box fade out like the chat and re appear when #text get updated? And then ot fades out again etc

restive crag
hexed briar
#

factory.

restive crag
#

Use factories, check out hud_screen.json

#

oh nvm

raven wigeon
#

Oh yeah factories are a thing completely forgot about them!!

#

I never tried them with animations so hopefully it works.

hexed briar
#

yeah obviously you will need them to reload your elements.

raven wigeon
#

But how do I add alpha animations to a panel?

#

Or will I add the animation to both the text and the bg and hook the factory to the panel?

raven wigeon
restive crag
#

if u add animation to panel i believe it affects it children

raven wigeon
#

Oh interesting!

#

And I add this animation to "alpha": or just the anims array

hexed briar
#

They'll reload without factories.

#

actually nevermind, hud_title_text still uses factory.

raven wigeon
#

Ah so I need to add a new factory for #text now?

#

Then add a alpha animation to the anims array and im done?

restive crag
#

anims directly to alpha property will do it

hexed briar
raven wigeon
hexed briar
#

you can use anims property on elements to play multiple anim elements

restive crag
hexed briar
#

it can be used on label too.

raven wigeon
#

Oh yeah that too

hexed briar
#

using alpha on panel or parent element may affect all children elements, atleast what seems occur to me before

#

though I believe this no longer does that since 1.19.10

raven wigeon
#

Oh so I have to add it to each element seperatly?

hexed briar
#

yeah.

#

though if you planning to add alpha anims to it, no need for alpha property.

#

since anims will override alpha value so, yeah

raven wigeon
hexed briar
#

No.

#

anims acts like another child element.

restive crag
#

How do i use clip_children to split something then get that 2 value?

hexed briar
#

so no, you don't need extra factories for that

hexed briar
raven wigeon
#

So in summery factories also affect child elements? But animations dont.

hexed briar
#

but the animations part, no.

raven wigeon
#

Ah thanks alot!!

hexed briar
#

using animations in element is essentially the same thing as referencing elements

restive crag
hexed briar
#

that's your answer.

#

the size is your values.

#

clip_children is literally a mask to panel property, so it can only be rendered inside the elements.

restive crag
#

But what about if its in the different position

hexed briar
#

that is depends on the parent element.

restive crag
#

It says clip_children is an unknown property, is this some spelling error?

            "informations": {
                "type": "panel",
                "size": ["65%", "100%"],
                "clip_children": true,
                
                "controls": [{
                    "head@form_bg_no_border": {
                        "type": "image",
                        "size": [120, 120]
                    }
                }]
            }
restive crag
#

Oh alright

restive crag
hexed briar
#

I think check wiki

#

for properties list.

restive crag
#

?json-ui-documentation

limber quartzBOT
restive crag
#

Oh it's clips_children

#

bruv💀

vagrant nova
#

how do i just put a solid color on panaroma screen

raven wigeon
vagrant nova
#

"panorama_view": {
"color":[0,0,0]}

hexed briar
# vagrant nova how do i just put a solid color on panaroma screen
  • Put any image type on your choice
  • Use [ "200%", "200%" ] on image size
  • Use textures/ui/White aas texture since you can change its color via color property
  • Use color property on which color you want to change
  • Apply the element and make sure it loads
  • (Optional) if your background overlaps other elements, use layer property with negative value.
  • Done.
vagrant nova
#

kk

#

i use panaroma screen.json

and

{
  "namespace": "panorama",

  "panorama_view": {
    "type": "image",
    "size": [ "200%", "200%" ],
    "texture": "textures/ui/White"
  }
}
hexed briar
#

wtf

#

did you even read

restive crag
#

~~Guys so I tried to do string formatting which if I have abcd i will expect to get cd but this one just copies the original text, not cut it.

                            "text": {
                                "type": "label",
                                "text": "#text",
                                "size": ["100% - 10px", "100% - 5px"],

                                "bindings": [{
                                    "binding_type": "view",
                                    "source_property_name": "(#form_text - ('.69s' * #form_text))",
                                    "target_property_name": "#text"
                                }]
                            }
```~~

Nvm I figured it out
vagrant nova
#

but i still see the paranoma

hexed briar
#

You can't just put panorama_view and expecting it'll work out of nowhere

#

Check and look for any elements that references that

vagrant nova
#

kk

whole jasper
#

"source_control_name" in binding, is anyone familiar with it?
I only know that it's used to retrieve variables like #toggle_state, #item_name, and #slider_value from a toggle, text edit, and slider.
It's also used to access binding variables from other panels that I often use as storage.
Are there any other uses for it, or what is its main purpose?

normal moat
#

source control name fetches the bindings of the specific element(control).

#

it's main purpose is this ^ I don't think there is any other use

whole jasper
normal moat
mild crow
#

What can I do so that hover_text and button_text do not stay the same?

restive crag
mild crow
normal moat
mild crow
normal moat
#

uh

restive crag
#

😂

mild crow
normal moat
#

i mean idk?

mild crow
#

My English may be bad because I'm Turkish.

digital finchBOT
#
better_peo

How to display offhand items in hud

whole jasper
mild crow
normal moat
#

instead of looking, you have to try

#

You can use string formatting

#

search it up in this discord channel. i discussed it previously

mild crow
mild crow
normal moat
#

what link

mild crow
#

I used string formatting but there are long texts

#

For example, I named 2 buttons, one of them (SkyWars) and the other (Survival Games). Now, which one should I use a string for?

#

('%.8s #form_button_text') If you say this, I tried it before

normal moat
#

#1067870274894172260 message ig

vocal urchin
#

Anyone recommend me a good json ui formatter

mild crow
#

@normal moat Do I need to add this to the hover_text code?

#

because when I added hover_text to the code

mild crow
#

@normal moat can you dm me?

normal moat
#

also stop DMing

#

?json ui is tough

limber quartzBOT
#
JSON UI is tough!

Welcome to JSON UI!

If you are reading this, there is a good chance that you were inspired by The Hive, Galaxite, or some other addon or server. Welcome! This is the right place to learn about these topics.

To get started in learning JSON UI, we recommend you check out the Wiki first: https://wiki.bedrock.dev/json-ui/json-ui-intro.html.

However, please be aware of these things:

  • JSON UI is much tougher than other addon topics.
  • JSON UI is 100% only documented from vanilla reference and reverse engineering. There are no documentation directly from Mojang.
  • We will not give you step-by-step instructions on how to create UI from Hive/Galaxite.

JSON UI is one of the toughest addon topics, so please be patient. Try and attempt small tasks. Ask concrete, answerable questions. We won't spoon-feed you.

merry pike
#

#1156572164078719118

#

💀💀

mild crow
#

@normal moat For example, survival games, future articles will be in hover text, for example.

#

But when I try it in SkyWars, half of the hover_text is written to button_text.

#

('%.14s * #form_button_text')

#

I set it to hover_text after 14 characters

#

But this does not happen with some buttons

normal moat
#

💀 I don't understand what you're saying

mild crow
#

Then let me explain it to you visually in dm. My English is not enough to explain it properly.

mild crow
#

now you can understand

normal moat
#

it is literally the thing I linked above

hexed briar
#

this is the most engrish I ever seen

normal moat
#

yeah lol

hexed briar
mild crow
#

'%.10s * #form_button_text I used this now

#

1 button worked, the other did not work

limpid quarry
#

Legit question

mild crow
#

@limpid quarry looking at the text

limpid quarry
#

Right?

#

I've just been working on some hud_screen stuff

mild crow
# limpid quarry Oh yeah, it adds spaces

Look, for example, the name of one button is (SkyWars) and the other one is (Survival Games). Now, when you add hover_text, it looks the same as the button text.

#

I want there to be hover_text after (Survival Games)

limpid quarry
#

Would putting it to like .14 or
.15 solve the text issue for how many characters. Does that ruin other buttons.

mild crow
#

(Survival Games)button_text (Click) hover_text

limpid quarry
#

Oh

mild crow
#

@limpid quarry That's what I do, it doesn't work on the button named SkyWars.

limpid quarry
#

Interesting

mild crow
mild crow
limpid quarry
#

So your saying if you make the long text work then the short text doesn't. Same the other way, if short works long doesn't?

mild crow
#

So the name of the button (Survival Games) appears as (Games Click) in the hover text.

limpid quarry
#

Oh so the extra words/letters are wrapping into the hover text? Huh

#

Oh I see

#

It's like splitting the text

#

And merging weird

mild crow
#

It splits the text, so let it be a 10-character text, it splits it.

mild crow
limpid quarry
#

Ask chat gpt, sometimes it has a solution

#

And the other 59% is wrong lol

mild crow
#

Chat gpt 4 I want to buy

limpid quarry
#

OpenAi gpt4 costs a whopping 20$ a month and it's so so

mild crow
#

@limpid quarry very expensive

#

I set hover_text to 14 characters

#

I didn't know how many characters to make the button_text.

limpid quarry
limpid quarry
mild crow
#

@limpid quarry Some of the characters are 10 4 8, that's the problem for me.

#

The ones with 14 characters work easily, but the ones with 10 4 8 characters do not work.

limpid quarry
#

Use "creative" mode for coding

#

Or send me the code

#

I can ask

#

But yeah it's weird how so many little things effect each other, will be nice if oreui ever comes out

mild crow
#
                            "item_details": {      
                            "type": "custom",
                            "renderer": "hover_text_renderer",   
                                "allow_clipping": false,
                                "clips_children": true,
                                "layer": 5,
                                "bindings": [
                                    {
                                        "binding_name": "#form_button_text",
                                        "binding_type": "collection",
                                        "binding_collection_name": "form_buttons"
                                    },
                                    {
                                        "binding_type": "view",
                                        "source_property_name": "(#form_button_text - ('%.14s' * #form_button_text))",
                                        "target_property_name": "#hover_text"
                                    },
                                    {
                                        "binding_type": "collection_details",
                                        "binding_collection_name": "form_buttons"```
#

this hover_text

#
                                      "text": {
                                        "type": "label",
                                        "size": ["100%", 20],
                                        "max_size": ["100%", 20],
                                        "offset": [0, 8],
                                        "text": "#visible",
                                        "text_alignment": "center",    
                                    "bindings": [
                                          {
                                            "binding_type": "collection_details",
                                            "binding_collection_name": "form_buttons"
                                          },
                                          {
                                            "binding_name": "#form_button_text",
                                            "binding_type": "collection",
                                            "binding_collection_name": "form_buttons"
                                          },

                                          {
                                            "binding_type": "view",
                                            "source_property_name": "('%.14s' * #form_button_text)",
                                            "target_property_name": "#visible"           ```
here button_text
limpid quarry
#

Ok

mild crow
limpid quarry
#

Yeah it's suppose to be ts and react right?

mild crow
#

Yes

#

.button("Survival Games Click")

#

(Survival Games button) (Click Hover)

#

.button("SkyWars Click")
(SkyWars button) (Click hover)

limpid quarry
#

I'm about to see what that might ne

#

Be*

mild crow
#

My problem is, how can I adjust the hover_text according to the buttons?

limpid quarry
#

I'm waiting for it to generate

mild crow
limpid quarry
# mild crow So what does he mean? What should I do?

Chatgpt 3.5 says

To achieve dynamic sizing based on text length for your button and hover text elements:Set the "size" property for both the button and hover text elements to ["auto", 20], or another suitable height, to keep the height fixed.Adjust the width of both elements to be dynamic based on text length. You can use ["auto", "auto"] or calculate the width based on the text length in your code. The exact implementation may depend on your JSON UI framework.By making these changes, your button and hover text elements will adapt their widths based on the length of the text they contain, preventing overlap or text cutoff issues for both short and long text.

Let me get chatgpt4

#

Could be totally wrong btw

mild crow
limpid quarry
#

Chatgpt4 says it's not possible! Lmao

#

Well ai don't know

#

Try auto

#

And see I guess

mild crow
#

chatgpt4 is crazy

limpid quarry
#

Worth a shot if right, if not at least we tried

#

It really depends on the input

#

For the gpt

mild crow
#

"auto", "auto"

normal moat
#

auto. 💀 bruh
better read the documentation + chat gpt know nothing about minecraft dev

limpid quarry
#

Lol

#

I knew someone would correct it

mild crow
#

The word auto seems ridiculous to me, no one uses auto anywhere.

limpid quarry
#

So whats the solution?

#

Lol fair

#

Gpt3.5 so confident lol

#

Trolls so good

#

Gpt4 is like bruh....

mild crow
#

Doesn't work for short texts

#

@limpid quarry where is gpt 3.5 you ask?

#

on your server?

limpid quarry
mild crow
#

Don't you think 3.5 is old?

limpid quarry
#

Yes it's almost 3 years outdated

mild crow
limpid quarry
#

Let me now make a python script to scrap data from the documentation :p

mild crow
#

There will be no problem xd

limpid quarry
#

I legit have to find solutions to my own problems here, I actually have to think hard, when I do script api, I can play dumb and people will answer when I'm tired of thinking.

#

Json so confusing to learn

mild crow
#

I'm very confused. It accepts the texts after 14 letters, but it does not accept the texts with 6 and 7 letters.

limpid quarry
#

Try different element like button since it has auto wrap features?

#

And tooltip maybe instead of hover text

mild crow
#

.button("Survival Games Click") Here is the name of the Survival games button Click hoverin name

#

@limpid quarry no

limpid quarry
#

Lol

mild crow
#

@limpid quarry It needs to be done in such a way that it works in both short text and long text.

limpid quarry
#

Yeah I have no idea, I'm trying to learn together so next time I can give the correct answer haha. I'm gonna keep trying for a solution.

limpid quarry
# mild crow <@354808180162822144> It needs to be done in such a way that it works in both sh...

Big Buda has spoken chatgpt 4 haha. "I’m sorry, but I don’t think there is a solution without changing the element type for your JSON UI issue. The hover_text_renderer element is not designed to handle different lengths of text dynamically, and the %.14s format specifier is not flexible enough to accommodate both short and long text. You will need to use a different type of element, such as a button or a tooltip, to achieve the desired effect. I apologize for any inconvenience this may cause you."

#

Anyways I've hit a dead-end

mild crow
#

.d

mild crow
mild crow
#

%14.s takes the first 14 letters

#

Now (#form_button_text) - ('%.14s' #form_button_text) I wonder if it will work if I put this in hover_text and try it?

keen marsh
#

Sup could anyone give me a hand with this?
I'm trying to make a Modal Form have a multiline input...
I've actually managed it in the past, but forgot how and lost the code - #old-json-ui message

#
// snippet from server_form.json

  "[email protected]_text_edit_box": {
    "anchor_from": "center",
    "anchor_to": "center",
    "size": [ "100%", 70 ],
    "offset": [ 0, 5 ],
    "$text_alignment": "left",
    "constrain_to_rect": false,
    "selected": true,
    "can_be_deselected": true,
    "focus_enabled": true,
    "max_length": 24000,
    
    "$option_place_holder_text": "#custom_placeholder_text",
    "$text_edit_box_placeholder_content_binding_name": "$option_place_holder_text",
    "$text_edit_box_placeholder_content_binding_type": "collection",
    
    "$text_edit_box_content_binding_type": "collection",
    "$text_edit_box_content_binding_name": "#custom_input_text",
    
    "$option_binding_name": "#custom_input_text",
    "$text_box_enabled_binding_name": "#custom_input_enabled",
    "$text_box_name": "custom_input",
    "$label_bindings": [
      {
        "binding_name": "#custom_text",
        "binding_type": "collection",
        "binding_collection_name": "custom_form"
      }
    ]
  }```
#

I'm very close. It works in-game but doesn't accept a default value like the normal modal text input

#

funnily enough I was stuck at this exact place last time too, until I eventually somehow figured it out

wild mason
#

how is the joining server screen ui called?

unique swan
gentle hemlock
#

who can look at my player.entity.json? For some reason, animations from first person, trident, shield, etc. stopped being rendered.

limpid quarry
#

Rather then the placeholder text that's there in ""

#

Example

"$option_place_holder_text": "Your Default Text Here", // Change this to your desired default text

#

I'm just guessing tbh

keen marsh
#

Ah well that's what it's called directly from the single line input, which should be the same I thought

mild crow
mild crow
#

Survival Games works here, but it doesn't work in others.

#

If you know what the problem is please tell me.

mint phoenix
#

hell o im running into the issue wher i cant get my buttons into a 2x 2grid what i cahing either makes the buttons dissapaire or makes them stacked on top of each other in my custom ui any fix

#

"student_button_custom@npc_interact.student_button": {
"size": [
"102%-10px",
33
]
},
"student_custom_dialog": {
"type": "panel",
"size": [
"100%",
"100%c"
],
"controls": [
{
"student_custom_dialog_stack_panel@npc_interact.student_custom_dialog_stack_panel": {}
}
]
},
"[email protected]_image": {
"type": "image",
"texture": "textures/ui/cartography_table_empty",
"size": [
20,
20
],
"offset": [
32,
32
]
},
"student_custom_dialog_stack_panel": {
"type": "stack_panel",
"texture": "textures/ui/cartography_table_empty",
"orientation": "vertical",
"size": [
"65%",
"90%c"
],
"offset": [
22,
90
],
"controls": [
{
"top_padding": {
"type": "panel",
"size": [
"50%",
2
]
}
},
{
"middle_padding": {
"type": "panel",
"size": [
"100%",
2
]
}
},
{
"buttons": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [
"82%",
"80%cm"
], //buttons scale
"offset": [
32,
80
], //buttons positions
"controls": [
{
"actions": {
"type": "grid",
"size": [
"fill",
"default"
],
"grid_item_template": "npc_interact.student_button_custom",
"grid_dimension_binding": "#student_button_grid_dimensions",
"collection_name": "student_buttons_collection",
"bindings": [
{
"binding_name": "#student_button_grid_dimensions"
}
]
}
}
]
}
},
{
"bottom_padding": {
"type": "panel",
"size": [
"170%",
250
]
}
}
]
},

mild crow
mild crow
tacit verge
#

So I have a problem with displaying inf in strings for json ui. How could I be able to display it

mild crow
turbid sphinx
#

custom crafting table is not compatible with unlockable recipes, right?

soft oar
#

Hi, is it possible to find the size binding, like the element that the size percentage is based on

past stirrup
wise escarp
#

yo

mint phoenix
past stirrup
past stirrup
turbid sphinx
#

Recipes are not showing

past stirrup
turbid sphinx
past stirrup
turbid sphinx
#

If I search in the search bar the item appears, but all the tabs are empty

mint phoenix
restive crag
#

Guys is there a tool for ninescicing that shows like what position I'm editing

#

Really need it bad

past stirrup
restive crag
#

Guys is there a template where i could add icons to buttons?

unique swan
vocal urchin
vestal arrow
#

anyone know how fill blank grid?

mild crow
#

Please tell me a solution to this, I did as you said, I just don't know why the others look like this. @normal moat

hexed briar
#

stop pinging em

#

jesus christ

mild crow
#

I just want to solve this problem. It doesn't say anything in the Survival games article, but it does in others.

restive crag
#

what

mild crow
unique swan
#

Does anyone know the code for the player list panel on the pause screen?

opal aurora
unique swan
#

xbox icon

jolly rock
#

This is correct? The syntax.
"source_property_name": "(('%.4s' * #title_text) = "§c§o")"

unique swan
#

"source_property_name": "('%.4s' * #title_text = "§c§o")"

broken trail
#

both are good

#

its like 2+2+2 and (2+2) + 2

jolly rock
#

Thanks everyone:) I will try it later and if there is any problem I will let you know.

arctic kindle
#

King, you here?

#

Smokey?

past stirrup
#

hii

arctic kindle
#

Or anyone that can answer this question: Let's say I want to make my own version of a stonecutter, for example:
Do I make a block, then copy the stonecutter UI (or refer to it) under a new namespace, same as my block name?
What needs to happen to make interaction on my block call up the namespaced UI?

#

I would be great if someone did a simple tutorial on making something basic like that from something common... None of the wiki tutorials explain much...Learning this is gonna suck, I will have to deconstruct a lot myself in order to understand what came from where. Most reg people just want to make their own furnace or brewing stand... and people say... Json UI... but...really... a dev resources on one or two of these would help a lot of people get feet wet...

past stirrup
#

I have never used JsonUI before but I know some stuff, iirc you need to make the UI check for the name of the block if it equals to what you want and then make it appear

#

@hexed briar do you mind helping please?

arctic kindle
#

Giant.. HOW

torpid nymph
#

You can do that?

past stirrup
#

just add @silent at the start of the message

torpid nymph
# arctic kindle Or anyone that can answer this question: Let's say I want to make my own versio...
{
    "crafting_screen": {
        "modifications": [
            {
                "array_name": "controls",
                "operation": "insert_back",
                "value": [
                    {
                        "test@custom_crafting.root_panel": {}
                    },
                    {
                        "[email protected]_screen_base": {
                            "bindings": [
                                {
                                    "binding_name": "#crafting_label_text"
                                },
                                {
                                    "binding_type": "view",
                                    "source_property_name": "(#crafting_label_text = 'container.crafting')",
                                    "target_property_name": "#visible"
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    }
}

I wrote this test script a while ago, I don't remember how functional it is

{
    "namespace": "custom_crafting",
    "[email protected]_screen_base": {
        "$top_half_variant": "custom_crafting.crafting_panel_top_half",
        "bindings": [
            {
                "binding_name": "#crafting_label_text"
            },
            {
                "binding_type": "view",
                "source_property_name": "(#crafting_label_text = 'test')",
                "target_property_name": "#visible"
            }
        ]
    }......
velvet horizon
#

please help me I've been looking for 6 hours #1157788205106597971 message

past stirrup
torpid nymph
#

fwi when you're searching for ui stuff, I'd recommend looking for stuff either shane wolf or LeGend has posted

#

Pretty sure arcdustry and axoyl are also great at UI but Idk how often they post code here

past stirrup
#

Yeah, it's better too look at older posts before creating a new one, you might find what you're looking for

arctic kindle
torpid nymph
#

"test"

arctic kindle
#

How did you link the UI, is what I am getting at

torpid nymph
#

By title, title is set via the crafting table component

"minecraft:crafting_table": {
    "grid_size": 3,
    "table_name": "test",
    "crafting_tags": [
        "cooking"
    ]
},
arctic kindle
#

Was it this "source_property_name": "(#crafting_label_text = 'test')",

torpid nymph
arctic kindle
#

So for example, if you wanted to make your own custom map table.... similar?

torpid nymph
#

Probably? You can only have up to a 3x3 grid though (the only grid_size accepted is 3 but you can hide some of the buttons).

hexed briar
#

again, already retired on json-ui

past stirrup
#

oh, sorry!

torpid nymph
past stirrup
hexed briar
#

also having mental issues rn so can't really chat that much atm.

hexed briar
past stirrup
#

i hope you start feeling better soon harlow!

torpid nymph
past stirrup
hexed briar
past stirrup
#

hopefully!

unique swan
#

Is it possible to increase the score limit on the scoreboard?

limpid quarry
#

Would it be possible to add some sorta graph in actionform body? Just imagining a graph system with timeline for stock market type thing

opal aurora
hexed briar
#

cool ui thing I made because boredom

restive crag
hexed briar
#

I obviously need something like that for controller use

#

I hate playing vanilla with controller, the ui sucks already

restive crag
#

I also hate that too

hexed briar
#

nope

#

for me should be simple enough

#

mostly I have rewrote of them regularly so I could like. make something with ease

#

since I mostly have control over it so, yeah

normal moat
arctic kindle
unique swan
#

Can I create a new panel next to long_form_panel in the server_form.json file?

unique swan
#

How

#

How do I add it next to the long form?

#

just next to the long form

mystic heart
#

Remove the form from the factory and instead put your own panel inside the screen content. Then in your panel you can add back in the form factory and add your custom panel next to it.

wild mason
unique swan
last pollen
#

Difference of JSON UI and ORE UI?

hexed briar
#

yeah sure

#

definitely didn't ping me here even FROM the DMs.

#

You have never tried or has trial and errors, therefore it won't get you anywhere.

#

hence, you're asking for help everywhere even DMing people which surprisedly, against this server rules.

#

which, this is not cool. you're just asking to be blocked at the same time somehow muted or kicked here.

#

next time don't do that. If mods or admins gets involved, its on you.

whole jasper
jolly rock
#

Help, why i cant use §?

{
  "binding_type": "view",
  "source_property_name": "(not(('%.4s' * #hud_title_text_string) - 'Test' = ('%.4s' * #hud_title_text_string)))",
  "target_property_name": "#visible"
}```
normal moat
#

uh you can just do this if you're not specific to the 4 letters.

(not ((#title - 'Test') = #title))
jolly rock
#

"(not(('%.4s' * #hud_title_text_string) - 'Test' = ('%.4s' * #hud_title_text_string)))"This is supposed to work only when the first four letters are "Test" regardless of the rest of the text, and it works but I can't use § to prevent it from showing in the text.

restive crag
#

Can i use bindings on ignored?

hexed briar
#

no

tame light
#

Hey is there anybody can help me to display custom gui in geyser bedrock ?

normal moat
halcyon spear
#

Are bindings like element display conditions?

restive crag
halcyon spear
#

So, If I were to add a binding for is in creative the element only displays when the player is in creative

#

And when in survival the element is hidden

restive crag
halcyon spear
#

Oh, Thanks!

#

Anyway is this screen called store_common?

plain heath
#

You should delete it

restive crag
restive crag
torpid nymph
restive crag
#

I find out yesterday that everything isn't running in once, its like gonna run line by line.

hexed briar
#

JSON-UI works by reading top to bottom.

opal aurora
hexed briar
#

( e.g if my "world element' thing at line 500 but has some syntax error and such, only 0-499 lines will load. )

halcyon spear
restive crag
#

I also found out referencing something that doesn't exist crashes the game

#

Well in server forms, idk the case for other screens

hexed briar
#

nope that does not happen.

#

it should throw content logs error unless the element where it was referencing to has critical properties such as anims, yeah it'll crash.

restive crag
#

It don't have anims on my case, it literally just crashes the game

hexed briar
#

mine literally doesn't.

restive crag
#

For other screens i guess that's not the case

hexed briar
#

I don't have any crash issue with referencing failure on all screens.

restive crag
#

Game crasher just by opening a form💀 new /kick

hexed briar
#

hud screen, npc screen and form screen were included.

#

it works on my machine

restive crag
#

I mean like i could send the file just to prove it?

hexed briar
#

even if you send the file, that'll help nothing because I don't do script.

#

again, if the element it was trying to referencing that has critical properties, it'll crash.

restive crag
#

Not existing also included at 'critical properties' right?

hexed briar
#

Nope.

#

there's a lot of example of 'critical properties'

#

having anims property, referencing things in factory or grid

#

having wrong custom render ID

#

etc

restive crag
#

hm grid is my case

hexed briar
#

so that's why.

#

you're referencing stuff on critical properties element so, that's the answer.

restive crag
#

alright I see

hexed briar
#

that's why it was 'critical', since it has potentially to crash your game with any wrong step. so yeah

#

also clean the log folder often because you don't wanna have one of those 5gb log folder while editing #1067869374410657962

restive crag
#

Moving on, I'm confused on how Mojang maintained the responsiveness of each screens.

#

Tried doing percentages stuff

halcyon spear
#

Adding the ignored on this crashes the game💀```js
"realms_subscription_panel": {
"ignored": true,

restive crag
#

Ain't really workin'

#

@halcyon spear curse, everytime there's an emoji at a message, defowler will always be there

hexed briar
#

it wasn't really that optimized since the beginning so

halcyon spear
hexed briar
#

obviously devices are now upgraded or has more power on modern days so obviously it gonna run smooth

restive crag
restive crag
#

irelevĂ nt?

hexed briar
#

you're saying that #1067869374410657962 ain't data-driven?

restive crag
#

huh?

#

when

hexed briar
#

3 messages above?

#

what I'm saying is, json-ui exists nearly decade and was already data-driven since.

so basically, it itself was already optimized hence the smooth responsive and better at maintaining larger things, after all it's a modern age.

restive crag
#

Oh alright

#

I thought u were talking about Smth diff

hexed briar
#

json-ui was best at low-end hardwares so yeah, but ore-ui isn't really sure.

#

ore-ui just overheating my phone already and some people has performance issues over it

unique swan
#

How can I set the search bar according to the button's name?

restive crag
#

Can anyone help me making something responsive?

Basically I have stack panel set up like this.

"stack_panel": {
       "type": "stack_panel",
       "size": ["100%", "100%"],
       // Other stuff here...

      "controls": [{
           "Elem_1": { "size": ["100%", "100%c"] }
     }, {
          "Elem_2": { "size": ["100%", "70%"}
     }]
}

However the elem 2 isn't responsive based on user device size. It works on bigger screen but not small.

vestal arrow
broken trail
#

like 20/30

#

and let me know if something happens to this shine animation

#

im curious what will happen

jolly rock
keen marsh
#

Any idea why setting chest grid size to 6x3 splits it up weirdly like this?

keen marsh
#

Ignore this, fixed it ^^
I've moved further questions to a new post instead

idle anchor
#

Holy crap you’re actually doing it

hexed briar
#

json-ui my beloved

solid yoke
gray shale
#

My UI that uses chest GUI is broken in 1.20.31. Anything changed? I was detecting the chest container name

#

was working just fine in 1.20.10

gray shale
#

I didnt use any behavior pack

#

it's a serverside scripting

#

the script works fine but the resource pack didn't detect the container name anymore

halcyon spear
#

SHow your code:

vocal urchin
#

How do I make my json-ui code like this?

raven wigeon
whole jasper
#

Is it possible to create a button that produces a sound on hover or automatically activates when hovered?

vocal urchin
velvet horizon
#

is it possible to place a button according to its name? (eg: a button named "Mail" will be placed on the far left in a panel and another button named "Apple" will be placed in a panel with the other buttons which are fruits)

restive crag
#

Can we put bindings in variable array?

hexed briar
#

No.

#

Well sort of.

#

Yes you can put bindings in variable array but you can't use any operators on it.

opal aurora
opal aurora
#

what you can't do is using binding outputs for "variables" condition checks

restive crag
hexed briar
#

No.

opal aurora
#

try combining them with different #visible's

halcyon spear
#

In your code snippet is $bindings like a variable like const $bindings = ...?

opal aurora
halcyon spear
#

So it's like an array of conditions to ignore

gray shale
#

how do i make player head show in hud like that?

#

(I have done basic stuffs like adding static image etc.)

#

can't figure out how to add player's head

gray shale
#

nvm found the old thing

halcyon spear
#

How can it be done?

opal aurora
restive crag
halcyon spear
#

For example:

$myIgnores = [...]
"ignored": "$myIgnores"
gray shale
whole jasper
# restive crag My post huh?

does it display the head of another player's skin?, suppose there is another player near us it will display the caption, it is very cool if possible without edit entity.player

thorny nymph
#

where can i learn json ui?

halcyon spear
#

?Jason ui

limber quartzBOT
thorny nymph
torpid nymph
#

Yeah, LeGend has a video about it

restive crag
#

How do make the length of stack panel goes to the left side and not in both side? Because when sizing something, it sizes on both side,

What I'm trying to do is adding a text at bottom right of a screen, also the stack panel heavily relies on child size which is the labels,

Now I don't want to use panels because it's not responsive.

halcyon spear
#

This is the guy you should be watching

ivory aurora
#

Hi, do you recommend an application or a program to make the json-ui?

halcyon spear
#

Your imagination is the only program i know

restive crag
#

Well for China, MCStudio

ivory aurora
limber quartzBOT
halcyon spear
wicked mountain
#

does anybody knows about ore ui

lilac reef
#

I've noticed that there's a .json file for a debug screen, but I'm trying to figure out if there's a button to access that screen, other than what it says in the file which is slightly confusing, to me, lol

halcyon spear
lilac reef
#

Okay, I think I understand...

The debug screen is accessible, but—only if you essentially add extra coding, and essentially create a whole new button image and button code for it

#

Lolz

halcyon spear
#

Where is the debug screen even located? The start screen, Pause screen, HUD screen?

lilac reef
#

It's in the UI folder, in the root of the resource pack folder

halcyon spear
#

Yeah, I mean where is the UI used?

lilac reef
#

I'm not exactly certain, but I'm assuming it's almost like the hood, in the sense of you can enable it in game

#

There's certain code for it that states that it can display over game, basically

#

Which is why I'm assuming what I've stated

halcyon spear
#
"access_button@common_buttons.light_content_button": {
lilac reef
lilac reef
#

It has code that renders the game behind it, so I'm assuming it's something that you can enable while in a world or on a server

#

Just has no attached like, code for an actual button or whatever

#

Which is honestly one of the main reasons why I was confused

halcyon spear
#
 "debug_global_screen_panel": {
    "type": "panel",
    "clips_children": false,
    "size": [ "100%", "100%" ],
    "controls": [
      { "access_button@debug_screen.access_button": { } }
    ]
  },
lilac reef
#

But basically all that has to be done is code has to be included that creates a button, and includes a button image, from an image that is in the files of one of the other folders

halcyon spear
#

Does that json snippet seem useful to you?

lilac reef
#

It sounds like it would be on the main menu screen

#

Based on whatever debug global screen panel means

halcyon spear
#
 "$screen_content": "debug_screen.debug_global_screen_panel",
lilac reef
#

Hm

#

Wait, $screen_content would be essentially what it shows on the debug screen, correct?

halcyon spear
#

Yes

lilac reef
#

Alr

#

Where exactly are you finding this info?

#

Lmao

halcyon spear
#
"[email protected]_screen": {
    "send_telemetry": false,
    "screen_not_flushable": true,
    "render_game_behind": true,
    "is_showing_menu": false,
    "low_frequency_rendering": true,
    "is_modal": true,
    "should_steal_mouse": false,
    "render_only_when_topmost": false,
    "screen_draws_last": true,
    "always_accepts_input": true,
    "$screen_content": "debug_screen.debug_global_screen_panel",
    "$screen_animations": [],
    "$use_loading_bars": false
  }
}
lilac reef
#

Wait, is that all in the screenshot I sent you?

halcyon spear
#
 "debug_global_screen_panel": {
    "type": "panel",
    "clips_children": false,
    "size": [ "100%", "100%" ],
    "controls": [
      { "access_button@debug_screen.access_button": { } }
    ]
  },
#

This seems to be where you inset your elements

lilac reef
#

Lmaoo, idk how I missed it

#

Sorry

halcyon spear
#

✅

lilac reef
#

Ty

halcyon spear
#

I will try display the screen!

lilac reef
#

Kk

lilac reef
#

Where was this located?

#

In the same debug_screen.json file?

halcyon spear
#

Yes

lilac reef
#

Hm

#

Oh

vocal urchin
lilac reef
#

In your snippet you changed content panel to debug global screen panel

lilac reef
#

Or is my assumption/observation/inferring wrong?

hexed briar
#

Debug screen just like it said, debug.

#

This one was primarily used for preview/beta whereas it shows your device name, render name, game version, ram usage, frame per second, GPU/CPU and hardware info via on top-middle of your screen.

#

This was designed to be always displaying everywhere, and it always reloaded all time

#

you can use that debug screen and insert elements that cannot be unloaded.

#

Though that screen has alot of indev elements e.g a build you should never have it.

lilac reef
#

Well yeah, but am I correct in my assumption that to be able to access it in game, you could hook up a button and button image to it, and it would work?

hexed briar
#

It may work.

lilac reef
#

I don't understand what you mean by this

hexed briar
#

Illegal game builds that players like us wasn't supposed to have.

#

the developer build.

#

( as well we can't talk anything about dev builds here. )

lilac reef
#

Well yeah, but you're saying that the debug screen contains those game builds?

#

How?

lilac reef
#

Alright

#

I still don't quite understand how the debug screen can contain other game builds/versions, but okay

hexed briar
#

I didn't say that?

lilac reef
#

You said that, in response to me asking you to rephrase what you meant

hexed briar
#

That one was whole different bedrock client like beta/preview, this one was aimed directly for Mojang developers/marketplace stuff.

#

Debug screen was an tool for that build to have weird or debug stuff.

#

That's what I'm saying.

lilac reef
#

So you're trying to say that I shouldn't be looking into it, and shouldn't be trying to make the debug screen able to be accessed in game?

hexed briar
#

Not really, sure debug screen can only be used to only add elements that cannot be unloaded on stable/release versions

#

not all developer tools in there, even if it was, it won't be functional in stable/release versions.

lilac reef
#

Hm

hexed briar
#

and again, the 'illegal' builds I'm saying was just developer builds and no players should have it.

#

that one you're just asking to get banned here or likely gets DMCA'd by mojang ( a reminder that mojang employees is here this discord server. )

halcyon spear
#

💀 The game crashes when I remove the debug screen elements

lilac reef
#

When changing the image used for the button that you press for chat settings, when you have chat open, it doesn't change it when I have the pack enabled...

#

The pack installs correctly, and doesn't show any errors when installed

#

For the button image:

    "type": "image",
    "size": [ 14, 14 ],
    "texture": "textures/ui/debug_wrench"
  }```
#

For the actual button:

    "$button_content": "chat.debug_wrench",
    "$pressed_button_name": "button.open_chat_settings",
    "$focus_id": "chat_settings_button_focus_id",
    "$focus_override_up": "coordinate_dropdown_focus_id",
    "$button_tts_header": "chat.settings"
  }```
hexed briar
#

It should be chat.debug_wrench_image

lilac reef
#

Hm

#

Hm

#

Ohhh

#

Okay

#

Yeah

#

I understand now, thank you

#

Such a minor mistake, but can cause major issues apparently

hexed briar
#

yeah, everytime you referencing something, make sure the element name doesn't have any spell mistakes or wrong ones

#

otherwise yeah that happens.

lilac reef
#

Okay

#

Tysm

#

It still doesn't work😭

#

Lol

#

Idk what's wrong

#

Anyways

#

I'm going to sleep

restive crag
#

In progress screen, does preparing global resource resource, loading a world, loading realm is there together? I hope not

hexed briar
#

it does.

restive crag
# hexed briar it does.

Do you possibly know what should I edit just to modify the loading screen when loading a world or a server/realm?

fathom mica
#

I want to make the coordinates like this
x: 123
y: 123
z: 123

but the code is like this, I'm confused about how to make it, can anyone help me

"player_position": {
    "type": "image",
    "size": [ "100%c + 6px", "100%c + 2px" ],
    "texture": "textures/ui/Black",
    "alpha": 0.7,
    "controls": [
      {
        "player_position_text": {
          "type": "label",
          "anchor_from": "bottom_middle",
          "anchor_to": "bottom_middle",
          "layer": 1,

          "enable_profanity_filter": false,
          "color": "$chat_text_color",
          "text": "#text",
          "shadow": true,

          "bindings": [
            {
              "binding_name": "#player_position_text",
              "binding_name_override": "#text",
              "binding_condition": "always_when_visible",
              "binding_type": "global"
            }
          ]
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "#player_position_visible",
        "binding_name_override": "#visible",
        "binding_condition": "always",
        "binding_type": "global"
      }
    ]
  },
restive crag
#

Hm

past stirrup
lilac reef
#

When it comes to UI textures, does Minecraft limit the pixel size that the image can be?

#

Like in the case of the chat settings icon, when chat is open

mystic heart
inland loom
#

How could I change my title.png logo when loading into a mc world?

and is this the right code?

"hud square": {
    "type": "image",
    "texture": "textures/ui/title.png",   // vanilla texture
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "size": [ 64, 64 ],
    "offset": [ 0, 4 ],
},```
restive crag
mystic heart
#

I would probably make the control element a sibling element and then set resolve sibling scope to true. That way you won't need to ensure the control element has a unique name in the namespace

restive crag
mystic heart
# restive crag Huh. I don't follow, how would that work??

You can make a blank panel element which only contains that binding (you can leave out the last one with the text). Say the element name is position_text_data. You can then have a text element with the binding:

{
        "binding_type": "view",
        "source_control_name": "position_text_data",
        "source_property_name": "#x_coord",
        "target_property_name": "#x_coord"
      },

And then use that binding in your element to display text with it.

restive crag
mystic heart
restive crag
mystic heart
restive crag
fathom mica
lilac reef
#

Does anyone have an example of code where it changes the image used for a button on one of the UI screens?

#

Would like to compare to mine that I have currently, for the chat screen

fathom mica
lilac reef
#

Just curious

fathom mica
lilac reef
#

Yeah, both of those

fathom mica
#

i dont understand

lilac reef
#

How do you stop it from showing that, and how do you get it to start showing it

#

Disabling and enabling it

#

Do you have a method for doing that?

fathom mica
#

i dont understand, my english bad🗿

lilac reef
#

Start showing

#

Stop showing

#

Can you do?

#

Is possible?

fathom mica
#

saya hanya membuat kordinat / 8 dan memasukan text kedalam root panel, dan apakah yang anda maksud positionnya muncul dengan toggle? - translate

lilac reef
#

I hope you understand, lolz

fathom mica
lilac reef
#

OH, GREAT—YOU UNDERSTOOD ME, LMAOO

lilac reef
#

Language barriers suck

lilac reef
#

This(https://youtu.be/K7UyzmmML-g?si=0qbMLdAEXt2ydTH9) should def be in the wiki

Today, I introduce you to the wild world of Minecraft: Bedrock Edition's JSON UI. Enjoy!

Timestamps:
0:00 - Intro
1:10 - UI Files
1:32 - Namespace
1:52 - Elements
2:32 - The Element Hierarchy
3:36 - Phrases
4:25 - "Controls" Property
5:12 - @ Copying
5:54 - Example File
7:24 - "Type" Property
9:08 - Outro

Playlist: https://www.youtube.com/play...

▶ Play video
#

Easier to understand, if learning about the structures and stuff, and the way elements work, imo

lilac reef
#

In regards to buttons, the closest thing I can find to:
"elememt_name_goes_here"@common_buttons
...would be:

#

  //---------------------------------------------------------------------------
  // Common controls
  //---------------------------------------------------------------------------

  "empty_panel": {
    "type": "panel"
  },

  "horizontal_stack_panel": {
    "type": "stack_panel",
    "orientation": "horizontal"
  },

  "vertical_stack_panel": {
    "type": "stack_panel",
    "orientation": "vertical"
  },

  "button": {
    "type": "button",

    "$focus_id|default": "",
    "$focus_override_down|default": "",
    "$focus_override_up|default": "",
    "$focus_override_left|default": "",
    "$focus_override_right|default": "",
    "focus_identifier": "$focus_id",
    "focus_change_down": "$focus_override_down",
    "focus_change_up": "$focus_override_up",
    "focus_change_left": "$focus_override_left",
    "focus_change_right": "$focus_override_right",
    "$focus_enabled|default": true,
    "focus_enabled": "$focus_enabled",
    "focus_magnet_enabled": true,
    "$focus_wrap_enabled|default": true,
    "focus_wrap_enabled": "$focus_wrap_enabled",

    "$button_focus_precedence|default": 0,
    "default_focus_precedence": "$button_focus_precedence",

    "$button_tts_name|default": "accessibility.button.tts.title",
    "$button_tts_header|default": "",
    "$tts_section_header|default": "",
    "$button_tts_control_type_order_priority|default": 100,
    "$button_tts_index_priority|default": 150,

    "tts_name": "$button_tts_name",
    "tts_control_header": "$button_tts_header",
    "tts_section_header": "$tts_section_header",
    "tts_control_type_order_priority": "$button_tts_control_type_order_priority",
    "tts_index_priority": "$button_tts_index_priority",```(cont'd.)
#
    "sound_name": "random.click",
    "sound_volume": 1.0,
    "sound_pitch": 1.0,
    "locked_control": "",
    "default_control": "default",
    "hover_control": "hover",
    "pressed_control": "pressed",
    "button_mappings": [
      {
        "from_button_id": "button.menu_select",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "pressed"
      },
      {
        "from_button_id": "button.menu_ok",
        "to_button_id": "$pressed_button_name",
        "mapping_type": "focused"
      }
    ],

    "$button_bindings|default": [],
    "bindings": "$button_bindings"
  },

  "screen_header_title_panel": {
    "type": "panel",
    "size": [ "fill", 17 ],
    "$screen_header_title_visible|default": true,
    "controls": [
      {
        "store_header_title": {
          "type": "label",
          "size": [ "100%", 17 ],
          "offset": [ 0, 3.5 ],
          "ignored": "(not $screen_header_title_visible)",
          "anchor_from": "left_middle",
          "anchor_to": "left_middle",
          "text_alignment": "left",
          "color": "$title_text_color",
          "$screen_header_title|default": "#screen_header_title",
          "$screen_header_title_binding_type|default": "none",
          "text": "$screen_header_title",
          "bindings": [
            {
              "binding_type": "$screen_header_title_binding_type",
              "binding_name": "$screen_header_title",
              "binding_name_override": "$screen_header_title"
            }
          ]
        }
      }
    ]
  }```
#

—which is in the path of RP/ui/

hexed briar
#

had to put extra notes here — to properly reference the element, make sure look up the element namespace and use it properly.

#

namespace is optional when it comes into same file but, it's better to use that way.

lilac reef
#

I'm not trying to use it, I'm actually just at the moment trying to find where the common buttons are listed

#

There's no specific texture file for the pause button when in game, and I'd like to know why, or where it's pulling a texture from for the pause button

hexed briar
#

Button template has textures by default and heavily being referenced to all buttons.

#

There's 2 various of button textures, light and dark buttons.

#

Dark button seems to have larger customization than light button since light was already has preconfigured whereas dark does not.

lilac reef
#

In one of the GUI files, in RP/textures/gui/, there is a PNG with multiple different UI textures on it, but I'm not sure how that is used to pull the texture for the pause button from

hexed briar
#

If you're referring to touch mobile pause button on top-middle screen thing

lilac reef
hexed briar
#

They're hardcoded inside the game files

hexed briar
#

And it's not JSON-UI

#

just hardcoded in.

#

you can't modify it.

lilac reef
#

Do you happen to know what the screen is called where you're in-game?

hexed briar
#

which one?

lilac reef
#

Like, actively playing

hexed briar
#

in-game huds?

lilac reef
#

Where you can see the chat button, pause button, and emote button

#

*where

hexed briar
#

hud_screen

lilac reef
#

I've been looking for a while, and can't figure it out

lilac reef
hexed briar
#

and again, if you're looking for mobile touch controls thing, it's hardcoded and cannot be edited.

#

It's remotely not json-ui

lilac reef
hexed briar
#

Hud screen contains hotbars, hearts and most HUD related things

lilac reef
#

Or change the texture for one of those touch controls?

hexed briar
#

That's not how json-ui works.

lilac reef
#

And how come there are pictures connected to buttons on the chat screen, like the gear image friends, but you can replace the file of with a different image?

hexed briar
#

You're mixing hardcoded things with json-ui right now.

lilac reef
#

Could you add a button as well, though, if you wanted to?

hexed briar
#

You can, but again

#

It won't be functional.

#

you can only use the existing button IDs

lilac reef
#

Bruh

#

Bedrock is so limited

hexed briar
#

You can't expect JSON-UI to be THAT customizable

lilac reef
#

Hm

hexed briar
#

We don't have official docs from Mojang whatsoever

lilac reef
#

If there's a button listed, is it possible to just add a texture to that listed button?

hexed briar
#

everything here from wiki are literally community findings

#

not mojang.

lilac reef
#

Like, for instance access.button

hexed briar
#

you're asking too much honestly

#

you can add custom buttons if you want

#

like add a custom textures, put a icon on it or put the whole elements on it

#

again, it won't be functional since you're "overriding/modifying"

#

not adding them, you can't add new stuff to JSON-UI and that's how it works.

#

you can change some screens into whole different other than vanilla if you want, again. it's just reskinning at this point

lilac reef
#

Okay, so I have one last question for now

hexed briar
#

you can't expect to somehow add a new button ID and expecting "hey this should give me a new screen"

#

that's not how JSON-UI works.

#

JSON-UI is already deprecated, don't expect more from it.

lilac reef
#

One thing that I'm seeing across a few different screen files, is elements with "@common_buttons" as the second part of it... could you maybe explain where the second part is derived from?

hexed briar
#

ui_template_buttons.json

lilac reef
#

Hm

#

I'll take a long look

#

Tysm

#

Okay, yeah, this makes so much more sense, now that I know what file that it's actually pulling from, lolz

restive crag
hexed briar
#

and 'play' animations.

#

though still, you can't create a new things from that e.g screens.

fossil pilot
#

Does anyone know where I can find the experience bar texture? and what's the file name?

lilac reef
lilac reef
thorny nymph
#

How can I modify the color format of §9?

lilac reef
dire leaf
#

#1160275807076368424

halcyon spear
#

Might want to delete this before moderators see that message, You may get warned, I wouldn't want that to happen!

stiff urchin
#

Can anyone tell me how to solve this problem of the book recommendations not appearing?

mystic heart
jolly rock
#
"title_message": {
                    "type": "label",
                    "anchor_from": "center",
                    "anchor_to": "center",
                    "font_size": "large",
                    "text": "#text_a",
                    "alpha": 1.0,
                    "bindings": [
                        {
                            "binding_type": "global",
                            "binding_name": "#hud_title_text_string"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(#hud_title_text_string - '%.3s')",
                            "target_property_name": "#text_a"
                        }
                    ]
                }```
#

Help

#

Is this supposed to return the text without the first three letters?

#

I'm pretty new to bindings.

mystic heart
jolly rock
#

Ooooooooo

#

Let me try

#

Yeaaaa

#

Work

#

Thanks

jolly rock
#

Why dont work? everytime show unknow image


                                "glyph_text": {
                                "type": "image",
                                "texture": "#glyph",
                                "size": [
                                    "100%",
                                    "100%"
                                ],
                                "anchor_from": "center",
                                "anchor_to": "center",
                                "alpha": 2.0,
                                "layer": 2,
                                "bindings": [
                                    {
                                        "binding_type": "global",
                                        "binding_name": "#hud_title_text_string"
                                    },
                                    {
                                        "binding_type": "view",
                                        "source_property_name": "('textures/ui/Black')",
                                        "target_property_name": "#glyph"
                                    }
                                ]```
drowsy smelt
#

@jolly rock

mortal monolith
jolly rock
#

I don't understand, I'm pretty new with jsonUi

#

You talk about $title_text?

stiff urchin
#

that's right

stiff urchin
#

@idle anchor Âż Âż Âż what did you do

idle anchor
#

what

opal aurora
fathom mica
#

$play_screen_size hardcode?

undone marsh
#

It's in line 5995