#JSON-UI General

1 messages · Page 49 of 1

manic dragon
#

custom factories or ignored property (needs variables) can be used to not generate them

#

No

viral oxide
#

Hmm, maybe i could have a bunch of factories that are conditionaly renderered, that somehow only set collection length to 1 when some condition is met?

manic dragon
# manic dragon custom factories or ignored property (needs variables) can be used to not genera...
{
  "name": {
    "type": "collection_panel",
    "factory": {
      "name": "_factory",
      "control_name": "namespace.control"
    },
    "property_bag": {
      "#length": 1
    },
    "bindings": [
      {
        "binding_type": "view",
        "source_property_name": "#length",
        "target_property_name": "#collection_length"
      }
    ]
  }
}

It's possible to make the collection length 0 or 1 (or more) based on another binding
1 will generate the content specified in control_name where 0 will not

viral oxide
#

oh wait i see

manic dragon
#

No it can be anything really but you must set some value to #collection_length. I'm using #length for that

viral oxide
#
{
  "type": "collection_panel",
  "collection_name": "container_items",
  "controls": [
      {
          "test_factory": {
              "type": "stack_panel",
              "factory": {
                  "name": "test_factory",
                  "control_name": "chest.test"
              },
              "property_bag": {
                  "#hover_text": "0"
              },
              "bindings": [
                  {
                      "binding_name": "#hover_text",
                      "binding_type": "collection",
                      "binding_collection_name": "container_items"
                  },
                  {
                      "target_property_name": "#collection_length",
                      "source_property_name": "(#hover_text - '')",
                      "binding_type": "view"
                  }
              ],
              "collection_index": 0
          }
      }
  ]
}

Hmm, with any item name it seems to always be non 0, am I missing something?

young dune
#

Anyone know if its possible to use glyphs with the minecraft ten font?

upbeat frigate
# viral oxide ``` { "type": "collection_panel", "collection_name": "container_items", "c...

not sure, if this is what you are looking for, and i'm new to json-ui. But, i have a similar thing in my current project.

I'm naming the item to be the collection_length to dynamically render stuffs that should only be rendered like lazy loading in web.

Like if i name my item "21" it will only show 21 items vice versa.

{
                "binding_type": "view",
                "source_property_name": "((#hover_text - '' - '§o' - '§f') * 1)",
                "target_property_name": "#collection_length"
            }
viral oxide
upbeat frigate
manic dragon
viral oxide
#

yea i managed to get it working ty for the help, sadly this approach doesnt actually allow for not parsing the ui until its needed since it goes and pre-parses the content in control_name, although i guess it does mean that i will have less in my scene tree so maybe it still does work kinda

manic dragon
#

In this case, a better option would be to use ignored property with probably global variables

viral oxide
#

i need them to be dynamicly hidden, not static, based on the item in the slot

#

so i dont think thats an option?

young dune
#

you figure this out?

viral oxide
#

probably xD, thats such a tiny question theres no way i would remember a solution, probably just have the anchors as center now that i think about it tho?

young dune
#

i do is the thing

weak cape
young dune
#

huh???

young dune
manic dragon
manic dragon
young dune
#

thats annoying

#

oki

weak cape
analog snow
#

I added a panel in my inventory screen but when i click on it while selecting an item on mobile, it drops it, how could i fix that?

manic dragon
analog snow
# manic dragon Instead of using a panel use ``@common.root_panel``, this has all the button map...

i realized i may have not given full context, my screen (not a panel i dont know if that would make any difference) is inside of "highlight_slot_panel", which is inside of "container_slot_button_prototype", which has other button mappings such as drop_one and drop_all.

the screen i made is essentially a custom hover text, im making it compatible with mobile, but the problem with mobile is that, when i click on the item, the text displays, it fades out (using the vanilla animation) and technically it should destroy_at_end the parent element of where im calling the alpha anim, but apparently it does not, as in, if i try to click on the area where the custom hover text was earlier, it drops the item instead of placing it in one of the slots, the hover text is not just an image and a label, it has a lot of different panels and a lot of labels

I tried what you said but i think that since the parent element (container_slot_button_prototype) has other button mappings, it does not calculate the ones inside of it (?)

manic dragon
#

yea it's more complicated than you previously mentioned. honestly, i can't tell what's causing this

weak cape
placid geode
#

or maybe 0 + #title_text

weak cape
# weak cape

@strange snow they changed it a bit but that message explains stuff that was way back

weak cape
polar frigate
broken trail
#

yo did they remove /reload all function to apply on the UI changes?

#

dont tell me I need to restart game everytime small detail in the UI is changed

#

I will go crazy

#

seems like when you have pack in the world, instead in the settings it reloads

manic dragon
#

You can reload a world or use a dummy pack. Why restart the game

broken trail
#

jsut put txt in world settings

#

also can someone explain?

#

input:

#

and bindings:

#

idk maybe I have found something, for now I am going crazy

#

uhhh

#

uhhhhhh

#

2nd is wrong

#

I have no idea why its working

#

where is 'z' ?

#

without it it doesnt work

placid geode
#

just use other name for your binding

broken trail
#

actually... however I guess that I need to import it by adding type global binding

#

also it doesnt display form body text

#

there are correct texts from buttons collection

#

I ende dup with something like this

#

I have no idea where the '|' disappears

#

but it works

#

or maybe I know, but the general idea of setting type to string when input starts from number is so damn bad and annoying and many other words

placid geode
#

|something - |som = ething

broken trail
#

yeah

#

exactly, and now its string looks like

nimble harness
sinful violet
#

67

surreal basalt
#

Tégé

opal aurora
young dune
#

why is my scroll panel cutting the bottom elements?

young dune
#

just gonna add padding lol

fathom mica
#

is this ('[' + '\"actionform' + #smt + '\"' + ']') possible?

fathom mica
manic dragon
gaunt apex
#

i found my artifact JSON

weak cape
tropic tangle
#

Is anyone experienced with editing the hotbar for both desktop and mobile devices?
The hotbar is replaced with a custom one, on Desktop it's working perfectly though for mobile devices it's all messed up

torpid whale
#

Whats the texture for the inventory button on the hotbar?

proven kiln
#

yes the fix is in another thread go look

#

in here

dim obsidian
#

Help, is it possible to ignore an element within a panel with clip_childrens? Ignore the clip_childrens in it. Cause I have a button inside my panel, but it has a hover_text and it disappears with the clip_childrens

gaunt apex
#

my first json ui

gaunt apex
#

im soo bored

manic dragon
#

Current subtitles are reusing chat messages layout without any modifications XD

#

It's probable that the subtitle factory works the same way as the chat factory

weak cape
oak verge
manic dragon
#

They are hardcoded as it seems

oak verge
#

bruh

hexed briar
#

though quite unfortunate that it isn't quite polished.

#

100%cm does exist and certainly works with chat, which should actually create a more accurate java subtitle UI.

manic dragon
#

Even the position is wrong. Ig they are making sure it works first. The layout can be done later

hexed briar
#

knowing the way mojang do UIs, it's gonna be that way unfortunately.

#

they don't polish JSON-UI elements the moment they make it work.

#

like, they just don't care unless it looks too ugly which is what happened to pause screen.

#

probably makes sense since they broke the pause screen's button background, player list background, title just doesn't exist even though it exists, probably much more.

#

the code for all of these still exists and can be fixed, idk how did they managed to break this bad.

manic dragon
hexed briar
#

just fyi the effect screen still has a pocket edition slider in there.

manic dragon
hexed briar
#

i just found it by accident but it is funny and not quite surprising.

manic dragon
#

it's probably the ugliest screen in my opinion ;-;

hexed briar
#

the panel layout itself still screams pocket edition but with white UI covered in paint.

#

but the moment you have too many effects, that paint starts to wear off.

manic dragon
cunning bridge
#

Is it possible to combine the information of two elements (let's say #dropdown_option_text of two different dropdowns in a modal form) into one string? (let's say the #texture of an image element in the same form?)

cunning bridge
#

Why is this allowed ?

#

While this isn't

#

When i have a collection in the controls of a different collection it works perfectly fine, but when i add a collection to the controllers of the same collection, the child element collection index gets overwriten by the parent's despite being different

#

this doesn't make any sense

cunning bridge
clear sand
#

Folk i have a very small request if anyone has it on hand

#

I need a "use item" button

#

It's literally impossible to use throwable items properly with the "d-pad and touch" config, and all the other configs go too far in the opposite direction for me

#

Automated fish farms, wind charge jumps, teleport clutching, it's just straight up not doable without a proper button

cunning bridge
#

the solution was to start by the dropdown collection, then the form collection, and back to the dropdown collection
i am genius for thinking of this

vernal imp
#

it is possible to do "#name" : "$name" ?

valid swan
#

@hexed briar The challenge log for patch 1.21.130 stated that string multiplication will be restricted to text splitting only. Does this mean that custom bars that multiply with numbers will stop working?

manic dragon
manic dragon
vernal imp
vernal imp
ancient agate
#

"hud_text_combo": {
"$update_string": "combo:",
"type": "label",
"text": "#text",
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"font_scale_factor": 0.6,
"font_type":"MinecraftTen",
"size": [ 64, 64 ],
"offset": [ -104, -2.5 ],
"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"
}
]
}
}
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "data_control",
"source_property_name": "(#preserved_text - $update_string)",
"target_property_name": "#text"
}
]
},

can someone help me. I try to make custom ui using preserved title text but the custom ui only visible when the input tile is like combo:abc123 but when the input title is combo:123 it not visible

manic dragon
ancient agate
#

ok thanks

unique swan
#

Hello

#

The scroll bar is sticking out here; I want to put it inside the form, but it's not working.

#

Which part of the code do I need to edit?

vernal imp
weak cape
#

because #number is a binding and requires to be used in bindings

unique swan
#

Where is the source code for this?

placid geode
#

like your code

weak cape
# unique swan What kind of thing, for example?

i forgot to send a message explaining what we need lol

we need info like is this form custom? can you show your code? What is the exact issue, does the scrollbar vanish or the scrollbar just doesnt move?

placid geode
#

that could be caused by several things

unique swan
weak cape
#

Or rather change the variables if you use a template

#

We need some code

unique swan
#

In which code section do we need the offset?

#

common.scrollin_panel?

#

javascript { "[email protected]_panel": { "anchor_to": "top_left", "anchor_from": "top_left", "$show_background": false, "size": [ "100%", "100%" ], "$scrolling_content": "server_form.long_form_scrolling_content", "$scroll_size": [ 3, 0 ], "$scrolling_pane_size": [ "100% - 3px", "100% - 3px" ], "$scrolling_pane_offset": [ 2, 10 ], "$scroll_bar_right_padding_size": [ 0, 0 ] } } ] },

limpid reef
cunning bridge
limpid reef
#

Can I do this with an actionform?

limpid reef
unique swan
weak cape
#

try adding this

weak cape
#

like kinda

limpid reef
#

"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, "color": "$chat_text_color", "text": "#player_position_text", "shadow": true, "bindings": [ { "binding_name": "#player_position_text", "binding_type": "global", "binding_condition": "always" } ] } } ], "bindings": [ { "binding_name": "#hud_text_background_alpha", "binding_name_override": "#alpha" }, { "binding_name": "#hud_subtitle_text_string", "binding_type": "global" }, { "binding_type": "view", "source_property_name": "(not (#hud_subtitle_text_string = 'show_xyz'))", "target_property_name": "#visible" } ] }

#

it doesnt work anymore

#

it should show the player position when show_xyz is sended to the player with /titleraw subtitle show_xyz (in rawtext)

weak cape
#

i think you have to send a title to have a subtitle no?

limpid reef
#

it shows even if i dont have a subtitle and a title

weak cape
limpid reef
weak cape
# limpid reef i think im pretty good

i used to say that too but oh boy, i helped someone once with some bindings stuff, someone had to correct every single thing i said about bindings

#

😂

weak cape
limpid reef
#

how to get the button state?

weak cape
#

the toggle state?

limpid reef
#

or toggle

#

yes

weak cape
#

erm lemme check

#
{
    "binding_type": "view",
    "source_control_name": "control_name",
    "source_property_name": "#toggle_state",
    "target_property_name": "#toggle_state"
}
#

like that i think

#
{
    "main": {
        "type": "panel",
        "visible": false,
        "enabled": false,
        "layer": 21,
        "size": [
            "100%cm",
            "100%cm"
        ],
        "bindings": [
            {
                "binding_type": "view",
                "source_control_name": "utils_screen_visibility",
                "source_property_name": "#toggle_state",
                "target_property_name": "#visible"
            },
            {
                "binding_type": "view",
                "source_control_name": "utils_screen_visibility",
                "source_property_name": "#toggle_state",
                "target_property_name": "#enabled"
            }
        ]
    }
}
#

my example

limpid reef
#

oh oaky

nimble harness
#

Is it possible to make a shorter model of the player so that only he and, for example, his "friend" could temporarily see the model, while others could not see it?

unique swan
# unique swan

I would also appreciate your help on how to increase the size of the scroll bar.

nimble harness
cunning bridge
#

is there a way to change the missing texture texture for a specific image?

thorny nymph
#

I want to create spacing between these two controls. How could I do that? stack_panel

limpid reef
#

{
"[email protected]_panel": {
"anchor_to": "top_left",
"anchor_from": "top_left",
"$show_background": false,
"size": [ "95%", "95%" ],
"$scrolling_content": "wiki.form_body_text",
"$scroll_size": [ 5, "100% - 4px" ],
"$scrolling_pane_size": [ "100% - 4px", "100% - 2px" ],
"$scrolling_pane_offset": [ 2, 0 ],
"$scroll_bar_right_padding_size": [ 0, 0 ]
}
}
]
}
}
]
},

"form_body_text": {
"type": "label",
"offset": [0, 0],
"text": "#form_text",
"size": ["100%", "100%"],
"layer": 8,
"bindings": [
{
"binding_name": "#form_text"
}
]
},

#

whats the problem?

#

the text juste dont show

#

no errors

placid geode
gilded rivet
#

@delicate berry ask here

placid geode
mint charm
manic dragon
cunning bridge
#

i want to change the fallback texture to something else not have it empty

manic dragon
#

There is a missing texture image somewhere in the textures folder. Not sure if changing that would work.

cunning bridge
manic dragon
#

Yea that's understandable

chilly yacht
#

just grab the texture file thingy and check if its equal to 'loading'

ancient agate
#

"hud_sharpness": {
"type": "image",
"texture": "textures/ui_elements/sharpness",
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"layer": -10,
"size": [74, 74],
"offset": [125, 0],

    "bindings": [
        {
        "binding_name": "#hud_title_text_string"
        },
        {
        "binding_name": "#hud_title_text_string",
        "binding_name_override": "#preserved_sharpness_text"
        },
        {
        "binding_type": "view",
        "source_property_name":
            "(not ((#preserved_sharpness_text - \"sharpness:\") = #preserved_sharpness_text))",
        "target_property_name": "#visible"
        }
    ]
},

guys help please. I'm trying to make the image only apear when the title contain sharpness: but the image apear flikering. Is there other way to make the togle system ?

hoary skiff
#

Hello guys

#

You can try using ' ' instead of " " inside of source property name value

#

I meant the "sharpness" to 'sharpness'

ancient agate
#

what will it do. Can you explain it a bit, i'm new to JsonUi stuffs

manic dragon
#

It's about the syntax. You can't use double quotes inside double quotes. So you need ' ' inside " "

hoary skiff
#

What's even easier to override variabes is to create one like this:

"panel": {
  "type": "panel",
  "$hud_text|default": "#hud_title_text_string"
}

Instead of binding override, unless if it's something else

manic dragon
cunning bridge
#

is it just not possible to convert a string into 0-1 float for the alpha property?

weak cape
#

shouldnt this be possible?

placid geode
#

You need to multiply it by 1 in variable, then divide by 100 or 1000 or something

weak cape
#

yeah was about to say this

placid geode
#

or just multiply by a variable with value 0.0001 idk

pulsar hornet
#

im searching someone that is really good at json ui that can help me in a minimap ui project (i can pay) contact me

young dune
#

Can anyone help figure out why my scroll panel on my custom form doesn't allow controllers to scroll when there is a lot of text in the body?

#

It works fine without a lot of text or even texts that are bigger than the panel but there seems to be a limit

oak verge
#

is it possible to stop horse render from rotating?

analog snow
#

anyone know what skin_idx is / what it's used for?

valid swan
#

Has anyone here managed to create a new interface in ddui?

dry fractal
#

When creating custom boss bars, besides the boss_name of the boss_bars, what else can I use to identify the boss?

manic dragon
gray spear
#

Can someone help me im kinda confused about settings_screen/common ill send a picture for better understanding of what i meant. Thank you in advance :>

vocal urchin
#

Someone help

vocal urchin
#

I do have that

gray spear
gray spear
# polar frigate

Thanks now i just need to modify the scroll bar its confusing for me i dont know where's its located

gray spear
#

Woah let me try it rq

polar frigate
# polar frigate

If u change that, it'll change the whole scroll box in the game...
Just change the "$scroll_box...... control"
And make new control that contains your texture in this settings_common file

#

Anyway...

#

WHY MOJANG

#

Hol' up lemme change my clothes so i can easily to identify:
🤵-> 🦹 ->🤵

gray spear
#

Guys is it possible to add a button on the settings screen?

clever maple
#

@pine matrix can you text me on privte I have a question about the dev pack that you send for the chest UI

weak cape
#

damn

placid geode
#

damn daniel 🦭🦭🦭🦭🦭🦭🦭

gray spear
safe wasp
#

Yo is there a way to have a property bag value go up every time u press a button?

gray spear
manic dragon
safe wasp
#

Im not to aware of how it works

manic dragon
# safe wasp Im not to aware of how it works

Not a bunch of them. Basically, each time you click on the toggle it increases the value by 19
So you can divide the end result by 19 to get the count
The bindings can be like this
property_bag: #count: 0
source: (1 * #toggle_state + #count)
target: #count

safe wasp
#

Ohhhhhh that makes way more sense

#

thanks a lot

manic dragon
#

I believe there's a slightly better way where you don't have click the toggle twice to increment once. In that way each click increments the counter. But I forgot how to do that :)

safe wasp
#

Wouldn’t it just be two bindings then

#

Just flip the state with not

#

Anyways I can figure that out on my own

#

Again, thanks a lot

#

Im about to cook

manic dragon
gray spear
#

I already got it i mean

gray spear
manic dragon
#

the Mob Maze server ui looks quite good

manic dragon
#

okay i was wrong. browsing their server forms will drain your memory

#

memory leaks!!

weak cape
manic dragon
#

It looks good in my opinion but it's not good for your memory :/

hoary skiff
#

I gotta learn more about this custom ui

#

I'm merely just redesigning stuff

#

How do I make the variable set to something else if the other variable have the specific value like true/false

#

For example, if the $test is true, then the $htu will be set to [0,0], otherwise its [50,50]

weak cape
#

Use variables

#

I mean the array

placid geode
hexed briar
#

Bad use of bindings can cause memory leak.

placid geode
#

what would be a bad way to use bindings?

#

like using "target_property_name": "#visible" more than once in the same control?

limpid reef
#

What is memory leaks?

#

Like what does it do?

valid swan
chilly yacht
#

or too many unnecessary bindings

valid swan
placid geode
#

ooh yeah those binding loops

dry fractal
#

Which property of the boss bar can I use to make its title appear above the boss bar itself?

#

I mean I want to increase the layer of the title.

hexed briar
hexed briar
#

though it should be more noticable since this also slows down your performance constantly aswell.

hoary skiff
#

Random: is it also more efficient to display map item renderer just like compass/clock render on other packs to display minimap. Or does it need to be help and adjust how it's displayed on animation controllers

manic dragon
cunning bridge
#

Didn't they give all Minecraft foods (except glow berries) the food component in 1.21.120?

valid swan
proven kiln
limpid reef
#

guys i added an animation on the minecraft title image in the pause menu but the animation only works the first time that i open the ui

#

how can i make the animation activate every opening?

#

theres nothing on the wiki about this

lone carbon
#

can you have hover texts and button display texts at the same time?

#

like can I have a button that renders some text over it, but then shows more detailed text when it's hovered over

limpid reef
#

Yes

red creek
#
"bindings": [
  {
    "binding_name": "#hud_title_text_string"
  },
  {
    "binding_type": "view",
    "source_property_name": "(not((#hud_title_text_string - ($prefix + '1')) = #hud_title_text_string))",
    "target_property_name": "#visible"
  }
]

If this makes the element invisible if the title is equal to ($prefix + '1')
how would you make it visible if the title is equal to ($prefix + '1')??

jolly rock
#

Remove not

red creek
#
"select": {
  "type": "image",
  "texture": "textures/ui/White",
  "size": [
    "100%",
    30
  ],
  "alpha": 0.6,
  "layer": 1,
  "bindings": [
    {
      "binding_name": "#hud_title_text_string"
    },
    {
      "binding_type": "view",
      "source_property_name": "((#hud_title_text_string - ($prefix + '1')) = #hud_title_text_string)",
      "target_property_name": "#visible"
    }
  ]
}
jolly rock
#

What is the value of $prefix

#

(#hud_title_text_string = $prefix + '1')

#

Try it @red creek

lethal sentinel
#

Could someone help me? All I need is to put an image on the screen; it's the simplest thing. But I don't know how.

red creek
red creek
manic dragon
jolly rock
red creek
lethal sentinel
nimble harness
#

How do I make an armor stand? If I move it, it will become a player model. If I tag it "playerstarklol:player," then if the player has this tag, it will show them the player's skin instead of their own.

polar frigate
#

Is there a way to show '%' symbols after numbers when using binding?

manic dragon
polar frigate
#

But why???? It says default value is already false

#

Also translated to what? If i change the language it's still changing the text.. or it's something like we use to translate the text in the chat message panel using commands?

manic dragon
polar frigate
#

Ohh okay

manic dragon
polar frigate
#

Ohh okay, i got it.. just realized i'm using text binding, not localization keys, that's why it's still translating the text LoL

nimble harness
#

Is it possible to display another player's "player model" doll? I know how to display the player model of the person who opened it in the menu, but how does it display the player model of another player?

#

Is it possible?

#

I want to create a kind of duel with the winner being shown

weak cape
#

but you have to save the players id without changing the string

#

because the player id is always a number in a string (unless you use a custom server software or proxy) you cannot change the stirng in any way

nimble harness
weak cape
#

i think thats uuid

nimble harness
#

If so, I can simply make the menu create a button in BP with his name

nimble harness
placid geode
nimble harness
weak cape
#
{
  "player_renderer": {
    "type": "custom",
    "renderer": "live_horse_renderer",
    "anchor_from": "center",
    "anchor_to": "center",
    "layer": 20,
    "property_bag": {
      "#entity_id": "your binding here"
    }
  }
}

in case you want an example

nimble harness
nimble harness
#

By the way, look at how I roughly showed it in Photoshop (only the table will not be the same)

weak cape
#

cool i guess

nimble harness
#

Same

nimble harness
#

Just check for yourself if it's possible, maybe you know.

#

And armor elements, for example (items that the player had)

weak cape
#

If you use script api to play animation then yeah

weak cape
#

if the palyer walks, the renderer walks, if the player plays emote, renderer plays emote, etc

nimble harness
nimble harness
nimble harness
#

Rendering

nimble harness
#

I don't know much about him.

nimble harness
weak cape
#

👍

nimble harness
# weak cape 👍

It wasn't me who wrote some nonsense, I'll look at the Mojang protocols now.

#

I haven't found anything normal yet.

#

There is little that is particularly useful about rendering.

nimble harness
weak cape
weak cape
nimble harness
unique swan
#

Hello

nimble harness
unique swan
#

I have two buttons. I want one to only work when the button name is "category," and the other to not work when the button name is "items."

weak cape
#

a file

nimble harness
nimble harness
#
  "player_renderer": {
    "type": "custom",
    "renderer": "player_live_renderer",
    "anchor_from": "center",
    "anchor_to": "center",
    "layer": 20,
    "property_bag": {
      "#entity_id": "player_entity_id"
    }
  }
}
bitter summit
#

Hello everyone, do you know if it’s possible to display the player’s inventory in this custom UI interface in Bedrock?

This UI is activated when interacting with an entity. I want to be able to equip armor on it, but for that I would also need to show the player’s inventory, and I don’t know how—or even if it’s possible.

limpid reef
unique swan
#

Why do the buttons on the right look like this?

#

I want them to stay up there and not come down.

weak cape
#

when you hide an elementi n a gird

#

the element will be invisible but the space wil lstay

limpid reef
#

isnt live_player_rederer?

frosty gyro
#

can someone help to fix this probelm?

limpid reef
unique swan
#

I want to use the two button panels in different grids.

gaunt apex
#

hmm

polar frigate
#

hmm

bitter summit
#

Or what do you want to do?

gray spear
#

Can someone help me, i cant change the size of my line, it suppose to be a line but it doesn't

#
                "L": {
                    "type": "panel",
                    "size": [2, "100%"],
                    "anchor_from": "left_middle",
                    "anchor_to": "left_middle",
                    "layer": 4,
                    "controls": [
                        {
                            "LL": {
                                "type": "image",
                                "texture": "textures/ui/white",
                                "size": [2, "100%"],
                                "color": "$line_color"
                            }
                        }
                    ]
                }
            },```
limpid reef
#

It’s not clear what are you talking about

gray spear
#

Sorry im not really good at English

limpid reef
#

You’re talking about the little red dot?

limpid reef
gray spear
#

Yes

gray spear
limpid reef
#

Okayy

#

Can you provide more code because you’re always referencing 100% but we can’t see the parent

gray spear
#

Oh the parent? Wait

limpid reef
#

And it’s maybe a layer problem

#

Try setting the layer to like 300

gray spear
#
        "type": "panel",
        "size": "$button_panel_size",
        "$button_panel_size|default": ["100%", "100%"],
        "controls": [
            {
                "background_container": {
                    "type": "panel",
                    "size": ["100%", "100%"],
                    "layer": 1,
                    "controls": [
                        {
                            "background": {
                                "type": "image",
                                "alpha": 0.5,
                                "texture": "textures/ui/Black",
                                "size": ["100%", "100%"]
                            }
                        }
                    ]
                }
            },
            {
                "L": {
                    "type": "panel",
                    "size": [2, "100%"],
                    "anchor_from": "left_middle",
                    "anchor_to": "left_middle",
                    "layer": 4,
                    "controls": [
                        {
                            "LL": {
                                "type": "image",
                                "texture": "textures/ui/white",
                                "size": [2, "100%"],
                                "color": "$line_color"
                            }
                        }
                    ]
                }
            },
            {
                "label@kuro_buttons.bound_button_label": {
                    "layer": 10
                }
            }
        ]
    },```
limpid reef
#

Also try to set the y of the line to a constant value so you can see if it’s the 100% the problem

gray spear
#

On the L?

#

Sure wait

limpid reef
#

The image itself

gray spear
#

Okay i see some changes, the box got big but not a line

limpid reef
#

Wait your texture white is red??

#

Did you define a nine slice json object for the texture?

gray spear
#

Nope

gray spear
#

I didn't Modify any vanilla textures

#

Only the panorama

limpid reef
#

The texture you wand is « textures/ui/white » right?

gray spear
#

Yes

limpid reef
#

Yeah I don’t know if it’s a nine slice texture

placid geode
#

try with White

#

capital W

gray spear
#

Okay...

limpid reef
#

Yeah

gray spear
limpid reef
gray spear
#

How tho? There isn't a white with capital W in the textures/ui???

placid geode
#

5 years at most

#

but not all day so maybe 3 years?

limpid reef
gray spear
manic dragon
lethal sentinel
#

Hey guys, could someone help me? I wrote some code that's supposed to display an image when I use /title, but it's actually displaying the image regardless of whether I use /title or not In addition to the fact that the sample always

#

Please don't judge me, I'm a beginner.

manic dragon
nimble harness
#

Is it possible to create a button for a website, like Discord?

#

IN Custom form ui

polar frigate
#

How many times variable can be called without defining a new variable? And having default value on every child controls

 "parent": {
  "$variable": "value",
  "controls": [
   {
    "child3": {
     "$variable|default": "value",
     "controls": [
      {
       "child2": {
        "$variable|default": "value",
        "controls": [
         {
          "child1": {
           "main_property": "$variable",
          }
         }
        ]
       }
      }
     ]
    }
   }
  ]
 }
}````
#

Got confused with this.. sometimes i can call the variable more than 2 or 3.. sometimes it can only 1 or 2 times with default value in it

weak cape
limpid reef
hardy lily
#

🤔

frosty gyro
bitter summit
#

I’m new to this whole JSON UI thing.

frosty gyro
weak cape
#

if no i could perhaps create a new and better one

frosty gyro
weak cape
#

like i dont wanna do something that there is

#

someone already asked me for my help for chest ui but i am not that motivated lmao

weak cape
#

alright im woorking on it

oak verge
#

Isn't there a fork that works

tepid ember
#

Is there a way for me to get the text offset and use it to change the text's location on the player's screen?

#
{ //money
                "title_money": {
                    "type": "label",
                    "text": "#text",
                    "$offSety|default": -41,
                    "$offSetx|default": -52,
                    "anchor_from": "center",
                    "anchor_to": "center",
                    "offset": [
                        // -41,
                        // -52
                        $offSety,
                        $offSetx
                    ],
                    "font_scale_factor": 1,
                    "bindings": [
                        {
                            "binding_type": "view",
                            "source_control_name": "player_hud_data_control",
                            "source_property_name": "#preserved_text",
                            "target_property_name": "#info",
                            "resolve_sibling_scope": true
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(('%.290s' * #info - '%.280s' * #info - ' ') * 1)",
                            "target_property_name": "$offSetx"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(('%.300s' * #info - '%.290s' * #info - ' ') * 1)",
                            "target_property_name": "$offSety"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "('%.300s' * #info - '%.200s' * #info - ' ' - 'money:')",
                            "target_property_name": "#text"
                        },
                        {
                            "binding_name": "#show_survival_ui",
                            "binding_name_override": "#visible"
                        }
                    ]
                }
            },```
#

I'm trying to change the offset using the title itself so I can place it wherever I want, but I'm not able to. Can anyone help me, please?

fringe dock
#

ใครก็ได้สอนผมทีผมต้องการให้ scoreboard มันแสดงผล4ช่องได้อะครับช่วยผมทีครับ

rocky quail
#

cant have this

  "offset": [
                        // -41,
                        // -52
                        $offSety,
                        $offSetx
                    ],
tepid ember
rocky quail
#

use

#anchored_offset_value_x/y
tepid ember
rocky quail
#

that's the way to offset elements using bindings

tepid ember
# rocky quail that's the way to offset elements using bindings

like this?

            {
                            "binding_type": "view",
                            "source_property_name": "(('%.290s' * #info - '%.280s' * #info - ' ') * 1)",
                            "target_property_name": "#anchored_offset_value_x"
                        },
                            {
                            "binding_type": "view",
                            "source_property_name": "(('%.300s' * #info - '%.290s' * #info - ' ') * 1)",
                            "target_property_name": "#anchored_offset_value_y"
                        },```
rocky quail
#

something like this

brittle raptor
#

is there a way to change the scale of text (default font) without the font getting "subpixel scaling problems" even though its not even on the pixel level yet

#

here is a screenshot of the text

#

im using font scale factor 0.8 btw

tepid ember
brittle raptor
#

i think that will work

tepid ember
#

@brittle raptor

brittle raptor
brittle raptor
tepid ember
brittle raptor
jolly rock
#

Any way to parse this number?
-4294967296

#

ex:

"test:-4294967296"```
#

If i remove test: doesnt work because that method only works with 9 numbers

#

And *1 it doesn't work anymore

tepid ember
tepid ember
#
      player.onScreenDisplay.setTitle(`hud:thirst`.padEnd(100, " ") + `bleeding`.padEnd(100, " ") + `beforOffsetx`.padEnd(80, " ") + `1`.padEnd(10, " "), { fadeInDuration: 0, fadeOutDuration: 0, stayDuration: 0 });

@brittle raptor

#
    { //money
                "title_money": {
                    "type": "label",
                    "text": "#text",
                    "anchor_from": "center",
                    "anchor_to": "center",
                    "offset": [
                        "#offset_x",
                        "#offset_y"
                    ],
                    "font_scale_factor": 0.8,
                    "bindings": [
                        {
                            "binding_type": "view",
                            "source_control_name": "player_hud_data_control",
                            "source_property_name": "#preserved_text",
                            "target_property_name": "#info",
                            "resolve_sibling_scope": true
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "('%.280s' * #info - '%.200s' * #info - ' ' - 'money:')",
                            "target_property_name": "#text"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(('%.290s' * #info - '%.280s' * #info - ' ') * 1)",
                            "target_property_name": "#offset_x"
                        },
                        {
                            "binding_type": "view",
                            "source_property_name": "(('%.300s' * #info - '%.290s' * #info - ' ') * 1)",
                            "target_property_name": "#offset_y"
                        }
                    ]
                }
            },```
#

Did I make a mistake somewhere?

tepid ember
jolly rock
#

That's what I see, strange

#

I'll try another way tomorrow, testing with your code, thanks

weak cape
manic dragon
candid shadow
#

Does /reload all work for you?

#

For some reason not even restarting the world reloads the resource packs, I even have to reload the entire game

weak cape
#

Seems to work

#

The scripts realod doesn't tho,

#

If I add new files I gotta realod all

candid shadow
manic dragon
candid shadow
manic dragon
candid shadow
#

oh ok thanks

manic dragon
#

font size doesn't give you as much customizability as font_scale_factor

limpid reef
weak cape
polar frigate
limpid reef
#

Oh ok Mbad

polar frigate
#

I'm wondering why this text can be small and still keeping the font pixel/weight right

#

I'm guessing the scale factor is around 0.8 or 0.85... yet when i try it the text still looks funky

manic dragon
jolly rock
polar frigate
manic dragon
# jolly rock Ye

entity id is a numeric string. if you try to extract it from another string it'll become an integer and you won't be able to use it for the live_horse_renderer

#

ig it's a numeric string instead of an integer because it can exceed the 32 bit integer limit

jolly rock
#

You're right, so I can't use this method, right? Because a number can't be converted to text, i mean, i can use §c + #text for example, but it doesnt work in horse render

tepid ember
manic dragon
jolly rock
#

Is there any way other than sending the value directly?

manic dragon
#

I don't think so

wooden sluice
#

does anyone know if there is a gui scale variable or something

#

thats not hardcoded

#

perchance even the %?

#

i was told there was one

manic dragon
wooden sluice
manic dragon
#

Where did you see it? I never saw it before

wooden sluice
#

but ik it exists

manic dragon
#

It doesn't exist. There's $touch but not $touch_gui

limpid reef
#

Echo do you know how to activate an animation when I open the pause menu?

manic dragon
#

$touch has a boolean value and it tells you if you're using touch input or not

limpid reef
#

The animation works only one time

wooden sluice
limpid reef
#

The first time that I open the pause menu

manic dragon
#

You can use animation_reset_name: button_id to reset the animation whenever a button is pressed

limpid reef
#

And if he just close it?

manic dragon
#

wdym

limpid reef
#

Close the menu

#

With escape

#

Is there a button id for this?

manic dragon
#

button.menu_cancel or button.menu_exit

But if you close the screen the animation will disappear

limpid reef
#

Okay I will test

#

@manic dragon

#

"anim_logo_size": {
"anim_type": "size",
"easing": "spring",
"from": [ 0, 0 ],
"to": [ "150%", "150%" ],
"duration": 0.15,
"animation_reset_name": "button.menu_cancel"
},

manic dragon
#

There's a reset name you can use for this

#

Let me find that

limpid reef
#

It also say animation reset name unknown property

limpid reef
manic dragon
#

"animation_reset_name": "screen_animation_reset"

manic dragon
limpid reef
#

It doesn’t work

#

I tried with « any » and this also doesn’t work

manic dragon
limpid reef
#

Okay I found

#

button.menu_continue

#

thanks for the help

brittle raptor
hoary skiff
#

Is this also detecting if the NOT string without prefix is the same as the string OR if the string is empty?

(
  not 
    (
      (#form_button_text - $_pref) = #form_button_text
    )
  or (#form_button_text = '')
)
fringe dock
weak cape
#

Just without any string manipulation

livid vault
#

Guys how to make a button that drop all item in specific slot I want to drop all of item in the 10th place of in my inventory slot

placid geode
hoary skiff
# placid geode if text contains $_pref OR text si empty, return true

Thanks, I can't tell yet if it works because other elements are overlapping/bugging. This might be the issue, can you explain how this works:

"(((#form_button_text - $_pref_red) = #form_button_text) or ((#form_button_text - $_pref_green) = #form_button_text) or ((#form_button_text - $_pref_purple) = #form_button_text) or ((#form_button_text - $_pref_lowop) = #form_button_text) or not (#form_button_text = ''))"
#

I'm not sure also about the "or not"

#

I'm trying to set the #visible to true if it doesn't have all the specific prefix or if empty string

placid geode
#

so it should work
-# actually no it wont work lol because You are checking if the string is not empty and You want to be true if it is empty, so should work fine without that not

#

but better do it this way

hoary skiff
#

Thankss, If that do I think this works fine. But ingame it's bugging

hoary skiff
placid geode
#

((#form_button_text - $_pref_red - $_pref_green - $_pref_purple - $_pref_lowop = #form_button_text) or (#form_button_text = ''))

hoary skiff
#

I'll test this quick

placid geode
hoary skiff
#

Thanks a lot

placid geode
livid vault
#

How to make a button that drop items in inventory slot 10

hoary skiff
# placid geode yup

It seems always showing, I tried to add not and many other things because it seems it's giving true value even if the string is empty

#
((#form_button_text - $_pref_red - $_pref_green - $_pref_purple - $_pref_lowop) or (#form_button_text = ''))
#

This

#

I just don't know much about expressions

placid geode
#

o shit i forgor to add = #form_button_text

#

now good

placid geode
hoary skiff
#

Thankss it works now, these small problem tho but the expression is fine

#

It's just the other buttons still showing in grid that doesn't have any component on script api action form data

#

But I'll make adjustments

grand eagle
#

I don't know anything about JSON-UI, can someone teach me?

wooden sluice
#

i dont know if this is just problem for me, but i am using a custom button on my form (not template) and everything works and is how i want it.
however when i use button text bind #form_button_text, it does absolutely nothing.

{
            "b_text": {
                "type": "label",
                "text": "#form_button_text", // Does nothing, but if is a normal text, it applies to all my buttons' text and works fine
                "offset": [
                    0,
                    2
                ],
                "size": [
                    "100%",
                    20
                ],
                "font_scale_factor": 1,
                "font_type": "MinecraftTen",
                "text_alignment": "center"
            }
        }
placid geode
#
"bindings": [
  {
    "binding_name": "#form_button_text",
    "binding_type": "collection",
    "binding_collection_name": "form_buttons"
  }
]
wooden sluice
#

that makes a lot of sense now

viral oxide
#

Does anyone know how to get common.item_renderer to actually render on the layer its passed?

#

For some reason only a few blocks / items (like stone for some reason) render on the right layer, otherwise they seem to always render super far down and behind my UI

#

despite specifiying a layer above my UI

#

Even when I put just a basic container slot, the item doesnt render on the right layer

#

and its drivng me crazy xD

manic dragon
#

strange, container_item in chests also use it with layer and that seems to work fine

clever vapor
viral oxide
#

I’ve already tried putting it parented to something with a high layer

#

It just goes behind it or something

eternal arrow
#

this is the binding stuff i used:

      ```"$item_render_id": [
        {
            "binding_name": "#form_button_texture",
            "binding_type": "collection",
            "binding_collection_name": "form_buttons"
        },
        {
            "binding_type": "view",
            "source_property_name": "(not (('%.8s' * #form_button_texture) = 'textures'))",
            "target_property_name": "#visible"
        },
        {
            "binding_type": "view",
            "source_property_name": "(not ((#texture = '') or (#texture = 'loading')))",
            "target_property_name": "#visible"
        },
        {
            "binding_type": "view",
            "source_property_name": "(#form_button_texture * 1)",
            "target_property_name": "#item_id_aux"
        }
    ],```
viral oxide
#

I’m rendering inside of a container

viral oxide
#

Whats weird is specific items show up

#

Like stone will render on top, but not most blocks or custom items

eternal arrow
#

but they do render right?

viral oxide
#

Only specific items

#

But for those yes

eternal arrow
#

well they shifted the ids due to the update

#

maybe it has to do with that

#

and i mean do the other blocks and items that dont render on top even render at all

viral oxide
#

I’m not doing anything with IDs manually

#

I’m just pointing it to a real item slot

viral oxide
#

I’m using the item renderer for some other stuff on the regular layer and it works there

#

But I need to render on top of that, which is why I need a higher layer xD

eternal arrow
#

hmm

eternal arrow
#

Now i have done a lot of JSON UI and learned stuff myself like how to customize the scrollbar or how to customize a modal form but there are two things I couldnt find an answer to

1.Is it possible to have 2 animated elements that use the title as the input(Preserve Title Texts) to play there animation at the same time

for an example two Pop up notifications one on the left one on the right with moving in and out animations and i try to use both but if you use something like a factory it wont work

2.I wanted to make it possible to display big buttons and small buttons in a grid

for an example i have two columns and in those 2 columns fit 2 big buttons and 3 small ones

Design:

| | | |

| | | | | |

so in js code like:

...
.button("Survival")
.button("Creative")
.button("%small%Ranks")
.button("%small%Shop")
.button("%small%TP")
...
abstract sage
#

Does anyone know how to change the sound of a button on a server form?

eternal arrow
#

what code are you using for the button?

#

form_button@common_buttons.light_text_button this one?

#

@abstract sage

#

"sound_name": "random.wood_click"

#

for an example

eternal arrow
#

well then use the "sound_name" value

#

and set it to the sound you want

#

like:
"sound_name": "random.wood_click"

abstract sage
abstract sage
eternal arrow
#

try it out

abstract sage
# eternal arrow try it out

This error occurred.
Unknown properties found in def[custom_toggle] from namespace[common_toggles]
-Unknown property [sound_name]

eternal arrow
#

well then it doesnt work

manic dragon
manic dragon
#

np

polar frigate
#

It's so unfortunate that we can't add child controls in it :) it's making a lot of bug

eternal arrow
polar frigate
polar frigate
hoary skiff
# polar frigate

This is actually cool, kinda look like in resources/behavior pack tab content

hoary skiff
rocky quail
polar frigate
#

Yeah i know XD
Too lazy to make a new line h4h4h4

manic dragon
#

for pc players it won't be that big of an issue but it'll be hard for mobile users

polar frigate
#

Also some button will disappear when we open the settings in-gameplay

#

I noticed mojang hides so many button there :))

opal aurora
polar frigate
#

Emmm that's captured from my phone... if it's count as mobile lvl gui scale bao_event_mobvote_penguin

eternal arrow
#

@polar frigate so i make a grid then a stack panel connected to the grid and the stack panel then has the buttons right?

polar frigate
#

And yes, you'll have to make the main stack panel that'll stack your button vertically (rows)
For every rows having horizontal stack panel for your button to fit

#

All done manually because grid just can't do that, grid will share every size of the buttons the same value

eternal arrow
#

but do i need to make the buttons manually too?

#

so i cant do dynamic collection index stuff right?

tepid ember
#

Is it possible to change a value within a variable?

manic dragon
tepid ember
manic dragon
#

If I'm correct, it's a binding. You can use it in any other control using source_control_name

tepid ember
limpid reef
#

What is preserved text?

tepid ember
manic dragon
tepid ember
# manic dragon If it's a binding, then no

In short, what I want to do is take a number from the title and save it in a variable, to make comparisons and make certain textures invisible according to the number.

#

So I thought of creating a calculation that saves a variable, the number, and I use it anywhere to change the visibility of textures.

manic dragon
#

You can do this using bindings but not variables

tepid ember
#

Wouldn't it be possible for me to change the value of a global variable and use it wherever I want?

manic dragon
#

Nope

tepid ember
manic dragon
#

variables in JSON UI aren't like variables in programming languages

manic dragon
# tepid ember why??<:bao_ext_toldyouso:1016392386433257553>

Let's say you have an element that has a variable that stores 0. That element can have multiple elements in it. If you change the value to 1 in one of those elements, that element and its children will have the value 1. But all other elements will have value 0.
Also, you can't store value from a binding in a variable

hexed briar
#

so this sucks but apparently this update just bugged global resources out. which makes some stuff like UI doesn't reload properly.

#

The workaround? — put your UI development pack on the world instead of global resource.

manic dragon
hoary skiff
#

Random, do I can get the value of variable from other element using this binding?

{
  "panel": {
    ...
    "bindings": [
      {
        "binding_type": "view",
        "source_control_name": "my_elem",
        "source_property_name": "#myvar",
        "target_property_name": "#visible"
      }
    ]
  },

  "my_elem": {
    "#myvar": true
  }
}
hexed briar
#

i had this issue even on a phone too.

manic dragon
#

They messed up globally on global resources lmao

manic dragon
hoary skiff
#

Yayy

#

If I'm gonna call the element in the same namespace, do I still need to put the namespace like [email protected] or just elm@template

tepid ember
tepid ember
#

It's a little disorganized because I'm testing things out.

manic dragon
tepid ember
#

My idea is to take the value of the title, get the exact number, save it in a variable, and use it in various image panels to hide or show them.

tepid ember
manic dragon
#

You're trying to set the value of a binding in a variable. This doesn't work

tepid ember
#

hum.

#

What if, instead of saving the title in #info, I save the number directly in it? Then it will work correctly, right? Especially since I can use it in several places.

manic dragon
#

This is how you can use the #text from title_mission in other controls

"test": {
                    "type": "label",
                    "text": "#text",
                    "anchor_from": "center", // unnecessary since it's the default value 
                    "anchor_to": "center",
                    "bindings": [
                      {
                        "binding_type": "view",
                        "resolve_sibling_scope": true,
                        "source_control_name": "title_mission",
                        "source_property_name": "#text",
                        "target_property_name": "#text"
                      }
                    ]
                }
upbeat frigate
#

Is it possible to only render a few characters in the text editor?

I modified the custom form text editor's max length to be 5000. But, i will be pasting long characters like probably up to 5000 length, but in the client side, i just want to display like probably 100 characters and the rest are "..." Or clipped, so it doesn't lag for a short period of time.

Is this possible?

hoary skiff
#

Adjust the size I think

#

It's not based on the amount of characters anymore

upbeat frigate
eternal arrow
#

well then its not what i wanted

#

i wanted a grid like solution so that i can add as many buttons as i want in script

wooden sluice
#

is it possible to have two texts simultaneously if you use different hud_actionbar_text factories? i have found i can make them, and i only show my custom actionbar text when a certain symbol is present inside the actionbar text. however if i use a normal one the custom one is hidden

#

nvm i am not thinking

quick wolf
#

Excuse me, I have a question. I'm trying to create a score bar that displays a number only when mounting an entity and disappears when dismounting. It should show the current health of the mounted entity. For example, if I mount a pig, the numbers indicating its health should only appear when mounting it. If I'm not mistaken, the pig has 10 health, which is 5 hearts.

abstract sage
#

Is it possible to make two different buttons display the same thing when clicked? I tried it and only the first one worked.

                    "source_control_name": "(#name = 'toggle1') or (#name = 'back1')"
young dune
#

Yall know if its possible to have multiple persistent title displays?

#

if so how?

quartz axle
#

is it possible to render 3d model in json ui?

manic dragon
manic dragon
quartz axle
#

render controller for the armor stand if armor is in ui & what color is their equipment and then change the armorstand geometry and texture

manic dragon
#

I haven't really messed with smithing table much, so no useful info on that

quartz axle
#

im updating the wiki with what i know so far

quartz axle
#

hmm is there a way to get item_aux_id from custom item from chest using binding?

#

ill figure it out

clever vapor
#

detect if armor stand is in ui

quartz axle
#

i figure it out

quartz axle
quartz axle
#

now i can sleep peacefully

junior shell
#

How add more custom item overlays?

young dune
#

Do format specifiers work on bindings?

clever vapor
young dune
#

nvm I figured out why it wasnt workin

#

ty'

young dune
#

How would I go about overriding a binding on some condition?

nimble harness
#

How can I set up the correct operation of various menus, if they have, for example, §y§r in the name, then one menu opens, if §u§r, then another? (I am making several menus and thinking about the best

clever maple
#
{
                            "binding_type": "view",
                            "source_property_name": "#length",
                            "target_property_name": "#maximum_grid_items"
                        }
``` How do I remove the first 10 btns from the grid?
limpid reef
lusty lodge
#

Hi.

#

I have an issue.

#
{
"hud_elements_panel": {
    "type": "panel",
    "controls": [
        { "preserved_title_display@preserved_title_display": {} }
    ]
},

"root_panel": {
    "modifications": [
        {
            "array_name": "controls",
            "operation": "insert_front",
            "value": [
                { "[email protected]_elements_panel": {} }
            ]
        }
    ]
},
  "preserved_title_display": {
    "$update_string": "update",
    "type": "label",
    "text": "#text",
    "controls": [
      {
        "data_control": {
          "type": "panel",
          "size": [0, 0],
          "property_bag": {
            "#preserved_text": ""
          },
          "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"
            }
          ]
        }
      }
    ],
    "bindings": [
      {
        "binding_type": "view",
        "source_control_name": "data_control",
        "source_property_name": "(#preserved_text - $update_string)",
        "target_property_name": "#text"
      }
    ]
  }
}

This is not working.

nimble harness
#

How can I set up the correct operation of various menus, if they have, for example, §y§r in the name, then one menu opens, if §u§r, then another? (I am making several menus and thinking about the best )

weak cape
# oak verge Isn't there a fork that works

Yes but all of them are the same. At least it looks like it. Correct me if I am wrong but they don't have dynamic amounts of slots and are based off of herobrines chest form which I don't like. A lot of unnecessary bindings and just spagetthi code (no offense)

oak verge
#

i mean, that is what a fork is
if they changed something it is not that big pf a change, and the base code stay the same

weak cape
#

Not just small changes. And that is what most forks for Chest form do

oak verge
#

you may as well start from scratch

weak cape
weak cape
#

('%.5s' * (#form_button_text - ('%.8s' * #form_button_text)) - '&')
Am I tripping or it's wrong?
#form_button_text = "enabled&&1000&"

This works:
(('%.13s' * #form_button_text) - ('%.8s' * #form_button_text) - '&')

torpid whale
#

Whats the name of the screen with the movement controls and the pause button and hotbar stuff?

#

Im trying to edit it

manic dragon
torpid whale
#

Yeah i thought those buttons were, thanks for the information! 😁

placid geode
#

yeah it seems everyone needs that chest form so ill make a chest form with dynamic slots

#

like you do .body('10:10') and boom You get 10x10 grid

placid geode
weak cape
#

syntax looks alright, but does the logic seem right?

placid geode
#

yeah it looks fine

#

maybe you can also do it with (#form_button_text - '%.9s' * #form_button_text)

#

You get 1000& that is autoconverted to 1000 number

weak cape
#

altrhough just wanted an opinion if my syntax or logic was wrong cuz it did not work

#

prolly cuz of the new update perhaps 🤷‍♂️

placid geode
#

it should work in my opinion

#

but yeah idk

cunning bridge
#

why is visible: false not working?

#

i got it, because i am using it in a button hover control

weak cape
#

damn

#

I managed to display only two slots, I deleted the button mappings for the slots, but I want to let the user scroll only between those two slots. Is it even possible?

#

I know I can change Player.selectedSlotIndex to 1/2 but i want just two slots

nimble harness
#

How can I set up the correct operation of various menus, if they have, for example, §y§r in the name, then one menu opens, if §u§r, then another? (I am making several menus and thinking about the best )

weak cape
#
{
   "[email protected]_screen": {
      "$screen_content": "server_form.custom_main_screen_content",
      "button_mappings": [
         {
            "from_button_id": "button.menu_cancel",
            "to_button_id": "button.menu_exit",
            "mapping_type": "global"
         }
      ]
   },
   "custom_main_screen_content": {
      "type": "panel",
      "controls": [
         {
            "server_form_factory": {
               "type": "factory",
               "control_ids": {
                  "long_form": "@server_form.switching_long_form",
                  "custom_form": "@server_form.custom_form"
               }
            }
         }
      ]
   },
   "switching_long_form": {
      "type": "panel",
      "controls": [
         {
            "chest_form@chest_form.main": {
               "enabled": false,
               "visible": false,
               "bindings": [
                  {
                     "binding_name": "#title_text"
                  },
                  {
                     "binding_type": "view",
                     "source_property_name": "(not ((#title_text - '@zelisce/chest_form') = #title_text))",
                     "target_property_name": "#enabled"
                  },
                  {
                     "binding_type": "view",
                     "source_property_name": "(not ((#title_text - '@zelisce/chest_form') = #title_text))",
                     "target_property_name": "#visible"
                  }
               ]
            }
         },
         {
            "vanilla_long_form@common_dialogs.main_panel_no_buttons": {
               "enabled": false,
               "visible": false,
               "$title_panel": "common_dialogs.standard_title_label",
               "$title_size": [
                  "100% - 15px",
                  10
               ],
               "$title_max_size": [
                  "100% - 15px",
                  10
               ],
               "size": [
                  225,
                  200
               ],
               "$text_name": "#title_text",
               "$title_text_binding_type": "none",
               "$child_control": "server_form.long_form_panel",
               "layer": 2,
               "bindings": [
                  {
                     "binding_name": "#title_text"
                  },
                  {
                     "binding_type": "view",
                     "source_property_name": "((#title_text - '@zelisce') = #title_text)",
                     "target_property_name": "#enabled"
                  },
                  {
                     "binding_type": "view",
                     "source_property_name": "((#title_text - '@zelisce') = #title_text)",
                     "target_property_name": "#visible"
                  }
               ]
            }
         }
      ]
   }
}

here is my code

#

if thats what you ask for

nimble harness
weak cape
#

Hmm, how do I say this?

Do you want to open the second form, without using script api twice?

nimble harness
weak cape
#

You open each with different prefixes.

#

In my case, its @zelisce/chest_form or no prefix for vanilla

nimble harness
weak cape
nimble harness
pulsar hornet
#

is it possible to rotate an image by 45 degrees?

weak cape
pulsar hornet
#

so i have to rotate manually on the png file?

weak cape
#

it is so crucial for some projects but sadly havent found any way to do so

pulsar hornet
#

i hate json ui

weak cape
#

You could theoretically make the png file a flip book anim and make different anims that only show one rotation.

#

But yeah, you would need to make it a flip book anim and for each image and for each rotation make a standalone animation, or make a template which I don't know if is even possible.

#

The Anim way is not possible for nineslices ^

pulsar hornet
weak cape
#

Via JSON UI no, but it is a way to do it with one image file.

pulsar hornet
#

my minimap is lacking that feature and i dont think i need an animation

weak cape
#

So no. It is likely not possible to rotate it.

placid geode
#

what if instead of rotating the whole map you rotate the player?

pulsar hornet
#

so i have the boolean variables

{
    "requires": "$left",
    "$texture": "textures/minimap/locator_left"
},
{
    "requires": "$right",
    "$texture": "textures/minimap/locator_right"
},
{
    "requires": "$up",
    "$texture": "textures/minimap/locator_up"
},
{
    "requires": "$down",
    "$texture": "textures/minimap/locator_down"
},

what's the json ui equivalent to do?

(left && up)

(left && !up)

?

placid geode
#

($left and $up)

#

($left and not $up)

pulsar hornet
#

just words?

placid geode
#

yes

pulsar hornet
#

thanks btw

#

so this is a correct syntax?
"requires": "($left and not ($up or $down))",

placid geode
#

yeah that would be (l && !(u || d))

pulsar hornet
#

thanks again

placid geode
#

also you can just do "texture": "('textures/minimap/locator_' + $viewdirection)"

#

-# just to prevent using a lot of variables

pulsar hornet
#

damn

#

mhh but viewdirection has the color code to hide from the text

#

wont it create problems on the png file name?

placid geode
#

nope

pulsar hornet
#

mhh ill try

placid geode
#

just rename to locator_§u §d §l §r

pulsar hornet
#

i dont know why the game is crashing

#

is it too much a 700x700px image on a 7x7px space?

weak cape
#

json ui doesnt like big images but 700px by 700px doesnt seem too bad

limpid reef
#

do you get the bloc color by script??

cunning bridge
#

it seems i have had hit another dead end, is it possible to make an element take the size of a sibling label element?

cunning bridge
marble rover
#

Hi, im new in here. Can anyone help me?


 "buttongrid": {
    "type": "stack_panel",
    "size": ["100%", "100%cm"],
    "controls": [{
      "grid": {
        "type": "grid",
        "size": ["100%", "100%c"],
        "grid_item_template": "chv_element.img_text_horizontal_button",
        "grid_fill_direction": "horizontal",
        "grid_rescaling_type": "horizontal",
        "factory":{
          "name": "buttons",
          "control_name": "chv_element.img_text_horizontal_button"
        },
        "collection_name": "form_buttons",
        "bindings": [{
          "binding_name": "#form_buttons_length",
          "binding_name_override": "#maximum_grid_items"
        }]
      }
    }]
  }
}

For some reason, the form_button_length exceeds the buttons I sent in the script, in the script I only sent up to 4 buttons, but the buttons created on the grid were up to 13
It's the same number of buttons on my other forms, but I've differentiated them in the script, so it shouldn't look like this. Is there a solution?

#

Don't mind why it's not in the right position :v

#

Pls help ;V

gaunt apex
#

p

gaunt apex
weak cape
pulsar hornet
timber smelt
#

Hi, does anyone know how to make UI buttons in a circular layout (like a radial menu)?
I tried placing them in a circle, but when I press one, they all trigger the same action.
Visually they are separated, but the game seems to detect them as a single button.
Is it possible to make this work correctly?😣.I leave the example image as I would like

weak cape
jolly void
#

How do I reverse the colors?

limpid reef
#

And is it because we can’t put collection_name in type: panel??

weak cape
#

its a type

#

you put collection name in collection panel

timber smelt
# weak cape collection panel is collection panel

question is that I don't know much how I could do a UI like the one in the image, I tried to do it but the buttons all do the same thing when each one should do something different, I don't know what to do

limpid reef
weak cape
#

Like panel.

wooden sluice
#

can someone explain grid properties to me? i have tried to make a grid before and i dont understand how they work.
an grid of images for example

timber smelt
#

Alguien sabe como hacer que una UI tenga barias texturas y sepuede canbiar de una a otra?

weak cape
wooden sluice
#

i checked the inventory container grid

#

im sure i could figure it out myself eventually, i was just hoping someone who has used grids before could explain to me if they wanted to and had the time of course

timber smelt
chilly yacht
#

think of it as a stack panel

#

so all of the controls are stacked in order

#

for server forms its simply this

#
"button_grid": {
    "type": "grid",
    "size": [ "100%", "100%c" ],
    "grid_item_template": "$grid_item_template",
    "grid_rescaling_type": "horizontal",
    "collection_name": "form_buttons",
    "bindings": [
        {
            "binding_name": "#form_button_length",
            "binding_name_override": "#maximum_grid_items"
        }
    ]
},```
#

i havent used them for anything else but i imagine you can define a binding in property bag and replace it with form_button_length and just feed your controls into it

wooden sluice
chilly yacht
#

i just found out that u can actually use #gamertag in hud screen

weak cape
#

nvm xD

chilly yacht
#

username display purely json ui

#

on hud screen

left yew
weak cape
jolly void
#

How do I make an image semi-transparent and have an animation that starts from the center and covers the entire screen?

teal wraith
#

How can i start on custom ui forms? Like those Minigames Selectors in servers

wooden sluice
#

see where the elements reference the elements

#

like go into template buttons and see all the properies

#

add to the element

#

play around with buttons

young dune
#

I would like to make some ui that has multiple preseved title displays but im struggling with getting it to work. Can anyone help?
Here is the current code:

timber smelt
#

Does anyone know how to make a UI have multiple textures and switch between them dynamically?

marble rover
marble rover
candid shadow
clear stone
#

hii

polar frigate
#

How many pixels is MinecraftTen height?
I know default one is 10px

weak cape
#

nvm lol

polar frigate
#

Normal size

weak cape
polar frigate
#

It's hard to recognize sinze it's use ttf

weak cape
#

example ^^

polar frigate
#

is it 12px i guess? 10px font + 2px padding

manic dragon
# polar frigate MinecraftTen

I believe it's still 10px
One way to verify this is to set size of the label to lower than 10, the label will disappear in that case

weak cape
manic dragon
#

I think this size is accounting for padding. Like default font has height of 10px accounting for the padding

weak cape
#

oh alright

manic dragon
#

MinecraftTen does feel a bit squished even in default size. I might also be wrong about the size :)

polar frigate
manic dragon
#

I mentioned I might be wrong about it or it takes more space with new lines

polar frigate
#

I mean when i use default font it's all fine

polar frigate
manic dragon
#

So yeah because of padding

polar frigate
manic dragon
#

I don't think it matters that much

weak cape
quartz axle
pulsar hornet
#

like you can go far away but still see areas that arent loaded

pulsar hornet
jolly void
#

Could someone help me?

quartz axle
#

cool

weak cape
jolly void
weak cape
jolly void
#

Do you know how? Could you please help me?

weak cape
#

And when should it all happen?

jolly void
#

when I type ts with the title command title

weak cape
jolly void
weak cape
#

let me finish eating and will help zou then

jolly void
#

Okay, but if I don't reply it's because I'll be busy soon.

weak cape
jolly void
weak cape
#

And conditionally render both

#

if you manage to code something by yourself, good. if not i can help

jolly void
#

Okay, I'll try it, but could you tell me exactly which folders I need?

weak cape
#

resource_pack/ui/

jolly void
weak cape
#

is there mcui format?

weak cape
jolly void
#

I don't know, someone told me that yes

weak cape
#

damn. i would stick with json

#

some intro if you need it

jolly void
#

And he also sent me a script that I used and it does work, but it covers the hotbar and has no animation, and it appears from the moment the world is created.

weak cape
#

hmm. you can use the same animation but you will have to create the element in the title anyways

jolly void
weak cape
#

practice helps a ton with json ui

jolly void
#

The problem is that I started this less than a month ago

#

And besides that, my bridge is bugged and it's not showing me the suggestions, I don't know why, and that makes it harder for me.

#

@weak cape Do you know how I could fix that?

weak cape
#

what bridge

jolly void
weak cape
#

what is v2

#

oh the IDE?

jolly void
#

This xd

weak cape