#JSON-UI General

1 messages · Page 52 of 1

candid shadow
#

wait what????

#

WHY THE FUCK ARE THEY DOING THAT? WEREN'T THEY MOVING ON FROM JSON UI??

night holly
#

Anyone know if it’s possible to map/bind a toggle to perform say a screen close, or more specifically force a button submit in custom form?

manic dragon
#

Ig they are preparing for the migration. Moving stuff into other files to keep backwards compatibility ig

hexed briar
#

though inventory could not be just the only screen that getting common-ified.

manic dragon
#

It's going to be harder to find the controls and connecting the dots
To be precise, more time consuming

hexed briar
#

yeah unfortunately.

#

This is also really recent too basically just the latest stable thing.

#

server forms are the only thing that are unaffected from this iirc.

manic dragon
#

Ig it's the same for npc forms too
They haven't touched it in years

river flower
#
    "overworld_loading_background": {
        "type": "image",
        "texture": "textures/ui/transfer_screen",
        "size": [
            "300px",
            "300px"
        ],
        "color": [
            1.0,
            1.0,
            1.0
        ],
        "tiled": false,
        "controls": []
    },

I am overwriting this element, but the color being white makes the invisible part of my image white instead of just remaining invis

#

If I remove color, then it'll just use the vanilla which has the color white

#

And there is no 4th index to specify alpha to be 0 (to make it invis)

candid shadow
#

?

weak cape
#

biome, nah

candid shadow
#

: (

weak cape
#

villager profession, maybe. when you trade with villagers, does it say who they are?

#

if not then probably not.

candid shadow
#

As for the profession, I assume I can use the title string

weak cape
#

good for you

manic dragon
weak cape
valid swan
balmy crow
#

Gg

valid swan
river flower
weak cape
#

you have to spam your button 7 times to switch

valid swan
weak cape
#

and some other useless buttons

#

this would be optional so if they couldnt or didnt want to use they would stick with spamming

valid swan
#

Also, it's possible to define the RGBA of an image using bindings, right?

weak cape
limpid reef
#

How can resize the scale factor based on the ui scale?

valid swan
manic dragon
placid geode
#

I'll create my own company, my own featured server, become famous, and beg Mojang to add the global variable $gui_scale because I seriously need it, bruh 🥀

#

is it that complicated or does mojang actually hate its own UI system that much?

oak verge
#

and it look like ore ui will be the same

manic dragon
placid geode
#

500k maybe

manic dragon
#

Just get a job at mojang and quitely add the feature

placid geode
#

Adding a global variable to JSON UI costs the same as pulling 3 big updates

#

Not only that, I'll do JSON UI 2.0

manic dragon
placid geode
manic dragon
#

just call it a bug, they won't know and make it a feature themselves :)

limpid reef
placid geode
placid geode
#

#title_text

limpid reef
#

I would need to change everything 😭

placid geode
#

eggsactly

#

That's what I was going to say

limpid reef
#

😢

#

I’ll just make the size extremely small 😭

placid geode
#

you would need to add the bindings to each label that you want to have that

limpid reef
#

Small ui scale people will need glasses

manic dragon
#

try to find a sweet spot

placid geode
#

for your arrows You can use percentage size

#

for text in the middle buttons maybe if You use hover text instead

limpid reef
#

Also, personally, I just have -1 and 0 available in my settings. Is this normal?

placid geode
#

yeah ig

manic dragon
#

before this update i only had -1 and 0 too

#

now i have -2 -1 0

limpid reef
#

Bizarre

placid geode
limpid reef
#

Wait, could I get the parent y size and do some math to adjust the scale factor?

#

With bindings?

manic dragon
#

i don't think you can get parent size using bindings unless their size is defined using bindings

placid geode
#

hmm i don't think so

#

It would be possible if you could somehow get how many items a grid has with grid_fill_direction: vertical

#

but that's not possible either.

manic dragon
placid geode
#

For example, if you have a grid with a size of 100%, and that grid can hold 200 elements of size 1px without overlapping, if you lower your GUI scale, the 1px elements will be smaller, therefore they will fit more in the grid

#

If we could get how many items that grid has, we could even calculate the aspect ratio or the resolution of your screen in ui pixels

manic dragon
#

nice concept but yeah not possible to know the number of items sadly

weak cape
chilly yacht
#

and the new ddui "visible" condition doesnt properly remove children either

#

so its still laggy as fuck

#

the ui is like 3x laggier when its claimed to be "30%" more performant or faster

narrow goblet
#

Guys is it possible to make a button that responds to a certain key/touch

#

Thats always active on the hud

vale needle
#

is there a way to make only certain form to be unclosable? this one makes all forms unclosable

"third_party_server_screen": {
    "button_mappings": [
      {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "button.null",
        "mapping_type": "global"
      }
    ]
  }
weak cape
rocky canyon
#

Is the binding's part error? I want to fill in #size_binding_y_absolute with my str '§z100',but it made minecraft crashed when I open ui.(dc put the 'Â' letter in front of §z)

narrow goblet
weak cape
#

Key binds aren’t possible.

narrow goblet
manic dragon
limpid reef
#

"item_dropper_label": {
"$condition1|default": "($container_title = 'entity.hopper_minecart.name')",
"type": "label",
"layer": 2,
"offset": [ 0, 5 ],
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"text": "$container_text",
"color": "$title_text_color",
"localize": false,
"enable_profanity_filter": true,
"variables": [
{
"requires": "$condition1",
"$container_text": "Spin"
},
{
"requires": "(not $condition1)",
"$container_text": "$container_title"
}
]
},

#

why does this doesnt work?

manic dragon
rocky canyon
devout agate
#

does anyone have an idea? it should only display one but it shows all three (first screenshot is "§c§h§e§s§t", second one is just "Info"

devout agate
#

yeah I saw those a few mins ago & changed but it still doesnt work

placid geode
#

i just saw it too

#

bindings doesnt work like that

devout agate
#

what should I do then?

placid geode
# devout agate what should I do then?

{
"namespace": "server_form",
"[email protected]_screen": {
"$screen_content": "server_form.lpmc_main_content",
"button_mappings": [
{
"from_button_id": "button.menu_cancel",
"to_button_id": "button.menu_exit",
"mapping_type": "global"
}
]
},
"lpmc_main_content": {
"type": "panel",
"size": "$default_form_size",
"controls": [
{
"server_form_factory": {
"type": "factory",
"control_ids": {
"long_form": "@server_form.long_form_selection",
"custom_form": "@server_form.custom_form"
}
}
}
]
},
"long_form_selection": {
"type": "panel",
"size": "$default_form_size",
"controls": [
{
"long_form@long_form": {
"size": "$default_form_size",
"layer": 1,
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "(not (('%.15s' * #title_text = '§c§h§e§s§t') or ('%.21s' * #title_text = '§f§u§r§n§a§c§e')))",
"target_property_name": "#visible"
}
]
}
},
{
"chest_ui@chest_ui.chest_panel": {
"size": "$default_form_size",
"layer": 2,
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "('%.15s' * #title_text = '§c§h§e§s§t')",
"target_property_name": "#visible"
}
]
}
},
{
"furnace_ui@furnace_ui.furnace_panel": {
"size": "$default_form_size",
"layer": 2,
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "('%.21s' * #title_text = '§f§u§r§n§a§c§e')",
"target_property_name": "#visible"
}
]
}
}
]
},

"screen_exit_animation_immediate_push": {
"anim_type": "alpha",
"easing": "linear",
"duration": 0.0005,
"from": 1.0,
"to": 0.0,
"play_event": "screen.exit_push",
"end_event": "screen.exit_end"
},
"screen_exit_animation_immediate_pop": {
"anim_type": "alpha",
"easing": "linear",
"duration": 0.0005,
"from": 1.0,
"to": 0.0,
"play_event": "screen.exit_pop",
"end_event": "screen.exit_end"
},
"screen_entrance_animation_immediate_push": {
"anim_type": "alpha",
"easing": "linear",
"duration": 0.5,
"from": 0.0,
"to": 1.0,
"play_event": "screen.entrance_push",
"end_event": "screen.entrance_end"
},
"screen_entrance_animation_immediate_pop": {
"anim_type": "alpha",
"easing": "linear",
"duration": 0.25,
"from": 0.0,
"to": 1.0,
"play_event": "screen.entrance_pop",
"end_event": "screen.entrance_end"
},
"custom_form@common_dialogs.main_panel_no_buttons": {
"size": "$default_form_size"
},
"long_form@server_form.long_form": {
"size": "$default_form_size"
}
}

#

that should work fine

devout agate
#

that seems to work, tysm
I'm just curious, its not possible to put the check results (eg ('%.21s' * #title_text = '§f§u§r§n§a§c§e')) in a binding/variable & reuse that?

placid geode
#

nope

#

Well, it's actually possible, but it's a bit more complicated

devout agate
#

can you tell me how & I try a bit?

placid geode
# devout agate can you tell me how & I try a bit?

{
"namespace": "server_form",
"[email protected]_screen": {
"$screen_content": "server_form.lpmc_main_content",
"button_mappings": [
{
"from_button_id": "button.menu_cancel",
"to_button_id": "button.menu_exit",
"mapping_type": "global"
}
]
},
"lpmc_main_content": {
"type": "panel",
"size": "$default_form_size",
"controls": [
{
"server_form_factory": {
"type": "factory",
"control_ids": {
"long_form": "@server_form.long_form_selection",
"custom_form": "@server_form.custom_form"
}
}
}
]
},
"long_form_selection": {
"type": "panel",
"size": "$default_form_size",
"controls": [
{
"long_form@long_form": {
"size": "$default_form_size",
"layer": 1,
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "('%.15s' * #title_text = '§c§h§e§s§t')",
"target_property_name": "#is_chest"
},
{
"binding_type": "view",
"source_property_name": "('%.21s' * #title_text = '§f§u§r§n§a§c§e')",
"target_property_name": "#is_furnace"
},
{
"binding_type": "view",
"source_property_name": "(not (#is_chest or #is_furnace))",
"target_property_name": "#visible"
}
]
}
},
{
"chest_ui@chest_ui.chest_panel": {
"size": "$default_form_size",
"layer": 2,
"bindings": [
{
"binding_type": "view",
"source_control_name": "long_form",
"source_property_name": "#is_chest",
"target_property_name": "#visible",
"resolve_sibling_scope": true
}
]
}
},
{
"furnace_ui@furnace_ui.furnace_panel": {
"size": "$default_form_size",
"layer": 2,
"bindings": [
{
"binding_type": "view",
"source_control_name": "long_form",
"source_property_name": "#is_furnace",
"target_property_name": "#visible",
"resolve_sibling_scope": true
}
]
}
}
]
},

"screen_exit_animation_immediate_push": {
"anim_type": "alpha",
"easing": "linear",
"duration": 0.0005,
"from": 1.0,
"to": 0.0,
"play_event": "screen.exit_push",
"end_event": "screen.exit_end"
},
"screen_exit_animation_immediate_pop": {
"anim_type": "alpha",
"easing": "linear",
"duration": 0.0005,
"from": 1.0,
"to": 0.0,
"play_event": "screen.exit_pop",
"end_event": "screen.exit_end"
},
"screen_entrance_animation_immediate_push": {
"anim_type": "alpha",
"easing": "linear",
"duration": 0.5,
"from": 0.0,
"to": 1.0,
"play_event": "screen.entrance_push",
"end_event": "screen.entrance_end"
},
"screen_entrance_animation_immediate_pop": {
"anim_type": "alpha",
"easing": "linear",
"duration": 0.25,
"from": 0.0,
"to": 1.0,
"play_event": "screen.entrance_pop",
"end_event": "screen.entrance_end"
},
"custom_form@common_dialogs.main_panel_no_buttons": {
"size": "$default_form_size"
},
"long_form@server_form.long_form": {
"size": "$default_form_size"
}
}

#

that way

devout agate
#

tysm

vale needle
hardy lily
#

is it possible to create a stop button for a specific sound definition?

#

I'm about to create a music preview UI

storm pumice
#

I want to take some text from the /title tag and do something like "000name" where it will write the "name" (from the 4th to the 7th digit) in a label, and the "000" would be the name of an image like "textures/ui/000". I know it's possible to use "%.4s", but for some reason I'm not able to use it. I'd like an example and to rewrite my code based on that.

valid ridge
#

you need to convert it to a string by adding like an alphabet letter at the start

cunning bridge
#

is it possible to combine to translation key in one label?

#

like 'item.diamond_sword.name + '§7 ' + 'enchantment.damage.all

weak cape
#

nvm

manic dragon
manic dragon
cunning bridge
rocky canyon
#

Is there anything I missed?
I can turn on the toggle but i can't turn off until turning on another toggle

storm pumice
#

I wanted to do something like 0001Name004100fmtbl
"0001" refers to the name of an image
"name" refers to text written on the screen
"004" refers to text written on the screen
"100" refers to an image
"f" refers to an image
"mtbl" refers to an image

hardy lily
#

fine, I'll go trough myself

storm pumice
glass valley
#
"abc_render_factory": {
  "type": "panel",
  "factory": {
    "name": "hud_title_text_factory",
    "control_ids": {
    "hud_title_text": "[email protected]_panel"
    }
  }
},```
Even if I use property_bag and display the title with factory, can't I display multiple titles?
cunning bridge
#

how to use translation keys that have : in them in UI

i to display the name of a custom block that i made in a label but it wouldn't translate it, if i replace the key with any other key without a : it translates it

worthy forge
#

is it possible to make it so that an image appears if i charge a specific item and the image disappears when i release it?

half sentinel
#

Does anyone know how I would make a single label that changes text based on whether a toggle is enabled or not?

whole jasper
#

how to trigger control_ids

manic dragon
# whole jasper how to trigger control_ids

For control_ids the #collection_length has to be an array of string

"control_ids": {
  "ex1": "@hud.a",
  "ex2": "@hud.b"
}

Now the ["ex1"] passed as #collection_length will generate @hud.a
And ["ex2"] will generate @hud.b

whole jasper
craggy heart
#

Hi, could someone guide me on how to modify the scoreboards.json file? What I want to do is visually customize each row of the scoreboard where players are displayed. My goal is for each player row to have a texture applied to it, and for that texture to change dynamically depending on the player's score: one texture when the player has a low score and a different one when the player has a high score. In short, I want each scoreboard row to have a custom texture that automatically changes based on the player's score.

manic dragon
oak verge
#

well, this is not the right place to ask for sure

night holly
#

Does anyone know if custom player geos work on paper doll? Doing a simple cosmetic system although it won’t render anything but the player

manic dragon
#

sqrt of a number using json UI. Actually it's the floor value of the sqrt of a number
It's shocking how simple and performant it is.
-# distance is not accurate because of a mistake of mine

manic dragon
#

distance is accurate now

manic dragon
#

Plays fine for me

weak cape
#

for me doesnt :(

manic dragon
#

That's weird...

limpid reef
#

I only got the 1st frame

#

I think it’s discord

#

Because I had the same problem in other servers

manic dragon
#

And it's a simple expression
It's called Babylonian Method of finding square root

chilly yacht
#

is it possible to force a child to the bottom in a factory?

#

or like

#

make it have a static location at all times even if more children are generated

#

like

#

awdawd
awdagg
hiawda
hello world!

#

and if another awdmaw is sent below itll swap them

#
awdawd
awdagg
hiawda
hello world!
awdmaw

to

awdawd
awdagg
hiawda
awdmaw
hello world!
manic dragon
#

What are you trying to make?

whole jasper
chilly yacht
chilly yacht
placid geode
#

maybe using two factories

chilly yacht
#

hmm true actually

#

have a stack panel

#

factory with chat messages

#

factory with flagged "pinned" chat messages

#

smart

placid geode
#

yep

chilly yacht
half sentinel
#

anyone know why my horizontal stack panel is still a vertical one even though I clearly set orientation: horizontal?

manic dragon
half sentinel
manic dragon
#

Can you share the code?

rocky canyon
#

does the splitting text have limitation? I found when I split text which has lots of bytes it will make next text incorrectly split.

#

smth like that my texture text abnormally move back

charred lodge
rocky canyon
broken trail
#

mhm

valid swan
rocky quail
#

AI on ore ui

weak cape
#

Now you all have no right to hate me for using AI on JSON UI 😈

broken trail
#

this slop gave me once type: image

#

I was trying to find this shiiiiiiiiii for 10m

#

never again

vivid dome
#

yo so i did
Dingsels ui tutorial and everything was working fine other than the part where when i replace his icons with my own they break

#

is there any way to fix this

#

i think it might be because of size because i had tested it with smaller icons (16x16) for place holders and they worked but when i go back to the 64x64 textures that i want to use for it they dont work

glass valley
#

Can't server forms use % for size?

limpid reef
#

You can change it for [“100%”, “100%”]

glass valley
muted spire
#

i'll solved

vale needle
#

does #gamertag binding works on server_forms?

chilly yacht
#

i beleive its hardcoded to hud_screen and pause_screen

vale needle
manic dragon
candid shadow
#

same

jovial hemlock
#

Like bedrock wiki, and then a lot of sample codes of many forms or json ui stuff and it gives good results

#

Specially Geminai and Claude

manic dragon
#

I'd rather write the code myself

candid shadow
#

I use Copilot to understand which property does what, but half the time it makes stuff up

limpid reef
#
"bottom_panel": {
                "type": "panel",
                "size": ["100%", "100%"],
                "controls": [
                  {
                    "[email protected]": {
                      "size": [ "100% - 20px", 10 ],
                      "$slider_name": "offset_slider",
                      "$slider_steps": 10,
                      "property_bag": {
                        "#slider_steps": 10,
                        "#slider_value": 1
                      }
                    }
                  },
                  {
                    "offset_panel": {
                      "type": "panel",
                      "size": [50, 50],
                      "debug": "red",
                      "layer": 600,
                      "offset": [0, 20],
                      "bindings": [
                        {
                          "binding_type": "view",
                          "source_control_name": "offset_slider",
                          "source_property_name": "#slider_value",
                          "target_property_name": "#slider_value"
                        },
                        {
                          "binding_type": "view",
                          "source_property_name": "#slider_value",
                          "target_property_name": "#anchored_offset_value_y"
                        }
                      ]
                    }
                  }
                ]
              }
            }
#

whats the problem? its my fist timeusing sliders

placid geode
#

just add "resolve_sibling_scope": true to your first binding

limpid reef
placid geode
#

Well, actually, it's more like searching within the sibling controls, not the entire control tree

limpid reef
#

Oh okk

placid geode
#

try it

limpid reef
#

I can’t

placid geode
limpid reef
#

@placid geode do you think this is worth 65$ CAD?

#

It took me like 5hours 😅

placid geode
#

yep

weak cape
limpid reef
manic dragon
limpid reef
vale needle
#

why is my UI always default selection is the close button? any reason for this? how can i change this

glass valley
#

An error log appears, but there's no actual error. It just keeps popping up, which is annoying. Is there a way to get rid of it?

#

I used common.dark_text_button.

valid swan
vapid glen
valid swan
vapid glen
#

Massa, parabéns ficou top

limpid reef
#

how to reset an animation when it finishes?6

chilly yacht
#

just call the first frame on the last frame

opal aurora
limpid reef
#

I’m using play_event

#

With the custom button name

#

I could do another button which reset the animation but I want it to reset automatically when the animation ends

#

I don’t have my pc rn so can’t show you my json but I hope I explained well

clever maple
#

Does someone have a JsonUi code that makes Actionform UI bigger?

river flower
#

Not sure where to ask this, but is there a way to NEVER have the font above?

#

Like- I want to know what font glyph minecraft is using

#

And I will overwrite it to use the normal font that I like

river flower
chilly yacht
#

set the backup font to MinecraftSeven

#

not too sure though

manic dragon
valid swan
limpid reef
#

how does this progress bar get the clip ratio data if its made like this and i cant seem to find the responsible json. Id love to get some help

limpid reef
vernal storm
#

How do I display an image on the screen?

vapid glen
sinful violet
limpid reef
limpid reef
sinful violet
# limpid reef Justement je veut le nom du binding

"full_progress_bar": {
"type": "image",
"texture": "textures/ui/experiencebarfull",
"clip_direction": "left",
"bindings": [
{
"binding_name": "#exp_progress",
"binding_name_override": "#clip_ratio",
"binding_type": "global"
}
]
}

limpid reef
#

Et c’est sur que y’a un json

limpid reef
#

Dans hud_screen

#

Moi je veut la barre quand on join un serveur

sinful violet
limpid reef
#

we must need to talk in English to ensure other people can help and/or learn

sinful violet
limpid reef
sinful violet
#

Okay wait I cherche

limpid reef
#

😂 oui oui

sinful violet
#

@limpid reef
Test this
"[email protected]_progress_bar_icon_base": {
"bindings": [
{
"binding_name": "#loading_bar_percentage",
"binding_name_override": "#clip_ratio"
}
]
}

Or this
"binding_name": "#loading_bar_percentage",
"binding_name_override": "#clip_ratio"

#

(This is same 😭)

sinful violet
valid swan
sinful violet
#

@limpid reef it work ?

sinful violet
limpid reef
#

I’ll try

#

Where did you found this json block?

sinful violet
#

(This is ai)

valid swan
limpid reef
placid geode
sinful violet
sinful violet
sinful violet
limpid reef
#

This was franglais

sinful violet
viscid prism
#

Hellooo

limpid reef
viscid prism
#

Can someone help me make a connectable table?

limpid reef
vernal storm
graceful elbow
#

How would I enlarge a glyph?

candid shadow
hexed wigeon
#

who knows how to make the buttons start from index 4 instead of 0 in "factory"?

hexed wigeon
limpid reef
#

#1067870274894172260 message

tepid ember
#

Doesn't it work with "anchor_to:center"?

valid swan
#

Bugrock

limpid reef
valid swan
tepid ember
#

I'm passing the correct size value, I did the same thing with the offset and it worked, but every time I use #size_binding_x my game crashes, does anyone know how to solve this?

rocky quail
#

You can't put strings on size_binding_x/y

#

that'll crash the game

tepid ember
#

Offset via title worked perfectly, but now this size is proving very difficult to get working.

placid geode
#

You need to add size property when using size_binding (e.g. "size": [0,0])

placid geode
#

also size_binding it's a percentage, but not like "100%"

#

it's a float

#

0 = 0%, 1 = 100%, 2.5 = 250%

tepid ember
#
hud.pushHud(id, "I can't take it anymore.".repeat(8), {
            idblock: 1, text: {
                offSetX: 20,
                offSetY: 20,
                disable: false
            },
            textures: {
                texture: "textures/items/diamond",
                offSetX: 1,
                offSetY: 0,
                sizeX: 2,
                sizeY: 2,
                disable: false
            }
        })```
placid geode
#

if You want to pass 5%, then you need to pass from your title something like 0005, then multiply it by 0.01

tepid ember
#

I'm passing the integer, and in the JSON UI I convert it to a float, multiplying it by 0.01.

#

I'll send the entire code.

placid geode
#

yea

tepid ember
#

Dude, it worked!

#

Oh my god, I tried it and it didn't work, now that you mentioned it worked, I can't believe it.

#

This game is playing games with me.

placid geode
#

XD

tepid ember
placid geode
#

yeah np

tepid ember
placid geode
#

just use #alpha

#

float

tepid ember
#

ok

#

The same thing I do here, right?

placid geode
#

yep

tepid ember
faint junco
#
{
  "bar": {
      "type": "image",
      "texture": "textures/ui/White",
      "color": [
          1,
          0,
          0
      ],
      "size": [
          2,
          "100%"
      ],
      "anchor_from": "left_middle",
      "anchor_to": "left_middle",
      "use_anchored_offset": true,
      "bindings": [
          {
              "binding_type": "view",
              "source_control_name": "preserved_filler",
              "source_property_name": "(#first_value * 1.0)",
              "target_property_name": "#anchored_offset_value_x"
          }
      ]
  }
},
{
  "preserved_filler@fishing_catch.preserved_title": {
      "$update_string": "fishing_controller:"
  }
}

why it doesn't working?? the #anchored_offset_value_x don't change the bar element offset x

valid swan
vapid glen
valid swan
vapid glen
patent bramble
#

How hard would it be to create the health UI?

weak cape
patent bramble
weak cape
#

I don’t really know how the hearts really work

patent bramble
#

I pretty much want to do hearts in 4 parts instead of 2

weak cape
#

Iirc it uses a renderer. I don’t know if the hearts are accessible through bindings BUT you can use title to display hearts easily

#

You can just make the vanilla hearts gone, and add a label as the title and put all hearts as glyphs

#

You will change the glyphs in your code

patent bramble
#

Wouldn't title be only behavior pack applicable

weak cape
#

Wdym?

#

you can divide hearts into four parts just using the renderer. There are no 0.25 hearts

#

You will have to use title probably

patent bramble
#

Title would be like commands or stuff no?

weak cape
#

Yes

patent bramble
#

Which only works in BP

weak cape
#

Yes

patent bramble
#

So it's not useful to me

weak cape
#

Why would you want 0.25 hearts without behavior packs?

patent bramble
#

20 HP / 2 = 10 hearts
20 HP / 4 = 5 hearts

More compact ui

weak cape
#

Ohh you want fewer hearts?

patent bramble
#

Yeah

weak cape
#

Makes much more sense

#

I will see if that’s possible (some time today, I can’t search for keywords on my phone)

manic dragon
#

There is another option ig
Using paper doll and player.json
But that'll make it incompatible with many packs

patent bramble
manic dragon
#

Nope you can't make renderers

patent bramble
#

and why do paper dolls cause incompatibility? this isnt really intended to be used alongside other UI resource packs anyways?

manic dragon
#

the issue is player.entity.json
It completely overwrites other pack's player.entity.json file. So the packs that use this breaks

patent bramble
#

That's fine by me, I don't see any reason that this would combine with another pack like that anyways

rigid pier
glass valley
#
{
    "renderer": {
        "type": "custom",
        "renderer": "live_horse_renderer",
        "property_bag": {
            "#look_at_cursor": true
        },
        "anchor_from": "center",
        "anchor_to": "center",
        "offset": [
            0,
            0
        ],
        "size": [
            100,
            100
        ],
        "layer": 20,
        "bindings": [
            {
                "binding_type": "view",
                "source_property_name": "(#form_text - 'menu.invisible')",
                "target_property_name": "#entity_id"
            }
        ]
    }
},```

How do I bind live_horse_renderer?
limpid reef
#

what is named the file for the marketplace

manic dragon
ocean hatch
#

Could you kindly provide more info on that? Like how does one register a .ttf font into the RP? I've been browsing this server but I still don't know where font_metadata.json goes and what are the full steps.

graceful elbow
#

Where do I edit the size?

candid shadow
#

oh there's an issue: Discord prevents me from typing messages that are too long

ocean hatch
#

oh

candid shadow
#

Cuz I don't have Nitro

ocean hatch
#

you mean this:

{
  "version" : 1,
  "fonts" : [
    {
      "font_format": "ttf",
      "font_name": "font_name",
      "version": 1,
      "font_file": "font/font_file_name",
      "lowPerformanceCompatible": false
    }
  ]
}```
#

right?

candid shadow
#

you have to include the vanilla objects as well

ocean hatch
#

oh i see

#

uhh if you are on laptop, you can make a .txt file via NotePad

candid shadow
#

oh right

ocean hatch
#

thank you so much🙏

candid shadow
#

You're welcome, have a great day

ocean hatch
#

you too!

candid shadow
# graceful elbow How though

In your image editor (e.g. Aseprite)

  • double the size of the canvas of your glyph (I wouldn't recommend doing that with glyphs that Vanilla uses, which are glyph_E0 and glyph_E1)
  • select the glyphs of your canvas and stretch them so that your selection matches the size of the newly enlarged canvas. Hold SHIFT while you do that as to keep proportions
#

In Aseprite you can change the size of the canvas by pressing C

ocean hatch
#

Does this require a global resource pack? Cause I don't think it's working for me as a world RP

fading mauve
#

Is it possible to have a custom button inside of a vanilla , (like a furnace) ui block and have it function?

robust ocean
#

yo this shit is hard.. how tf do yall learn how to do this? its SOOOOO different from any other programming i have done..

weak cape
#

i just did stuff and learned through the wiki and mainly bedrock samples

limpid reef
#

Guys can someone steal my json from their pack cache?

#

Like if they joined my multiplayer world

weak cape
limpid reef
#

Oh…

placid geode
#

lol

elder tapir
#

Heya! I'm thinking of trying something quite cursed - is it feasible to modify the lore test to e.g. render only everything up to a character / char sequence that i send and discard the rest?

faint junco
#

Anyone knows if is possible to change the button offset inside a factory?

"[email protected]": {
  "offset": [100, 10]
}
"factory": {
  "type": "stack_panel",
  "size": ["100% - 4px", "100%c"],
  "orientation": "vertical",
  "anchor_from": "top_middle",
  "anchor_to": "top_middle",

  "factory":{
    "name": "buttons",
    "control_ids": {
      "button": "namespace.button"
    }
  },

  "collection_name": "form_buttons",
  "bindings": [
    {
      "binding_name": "#form_button_contents",
      "binding_name_override": "#collection_length"
    }
  ]
}

Instead of following the factory offset, it follows its own offset

robust ocean
#

is this not the correct way to parse a long string into segments of 4 characters? (the string is a subtitle with 44 characters)

robust ocean
# manic dragon Are these all numbers?

yeah, strings of numbers, i am having a script encode info about the players equipment and biome into the title and subtitle and i am trying to parse them out. each encoded segment is 4 chars in length.

manic dragon
#

There's nothing to separate the numbers or any character at the start of the string?

robust ocean
#

(it actually does have a namespace at the beginning though)

#

but i get rid of that

manic dragon
#

Can you send an example of the full string

#

If it only contains numbers that's the issue

robust ocean
manic dragon
#

When doing string multiplication on a numeric string, the string is converted to number. But if it goes above integer limit then it fails

#

The easy fix is to add a character in front of the numbers. That should prevent conversion to integer

manic dragon
#

Do the string multiplication including the character
So %.4s would be %.5s now if you use one byte character

robust ocean
manic dragon
# robust ocean wdym? (i am admittedly TERRIBLE at json ui)

let's say you add '@' at the beginning
the numeric string would be like this
@10600997...
to get the first 4 number you'll do this
('%.5s' * #subtitle_text - '@')
for the next 4 this should be enough
('%.9s' * #subtitle_text - '%.5s' * #subtitle_text)
and so on

manic dragon
#

Oops that's a mistake

#

I use : a lot so wrote that instead

robust ocean
#

(molang and json ui)

manic dragon
#

You can do some crazy stuff once you get the hang of it

glass valley
#

In the live_horse_renderer, #entity_id should only accept strings. However, if the string result is only a number, as in (#preserved_text - $update_string), it seems to be automatically recognized as a number in the Json UI. This seems to be causing the renderer to not work. Is there a solution?

whole jasper
#

Does localization work for dynamic strings created by binding?
For example:

('%world.size ' + #world_size + ', ' + '%world.last.played ' + #last_played_date + ', ' + '%world.id ' + #world_id)

And in the language file:

world.size = .....
world.last.played = .....
world.id = ......
jovial hemlock
manic dragon
glass valley
manic dragon
#

Yeah then you need to pass the subtitle as entity id in bindings

glass valley
#

thank you

eager aurora
#

"test_label": {
"type": "label",
"anchor_from": "center",
"anchor_to": "center",
"layer": 100,
"offset": [0, 40],
"text": "test_label",
"color": [1, 1, 1],
"font_size": 8,

"bindings": [
  {
    "binding_type": "global",
    "binding_name": "#hud_subtitle_text_string",
    "binding_name_override": "#text"
  },
  {
    "binding_type": "view",
    "source_property_name": "(('%.2s' * #text) = '뀌뀌')",
    "target_property_name": "#visible"
  }
]

},
What's wrong? Why isn't it working?

manic dragon
glass valley
#

I created this feature by using title and subtitle together!

charred lodge
#

How would I replace the background of the enchanting table screen with my own?

#

I only want to overwrite the background of the enchanting table screen. No other screens.

candid shadow
# charred lodge How would I replace the background of the enchanting table screen with my own?

create a file named ui_common.json and place it under ui/ui_common.json and paste this code:

{
  "namespace":"common",

  "dialog_background_opaque":{
    "$opaque_background_texture|default":"textures/ui/dialog_background_opaque",
    "texture":"$opaque_background_texture"
  }
}```

The create another file  named `enchanting_screen.json` and place it under `ui/enchanting_screen.json` and paste this:

```json
{
  "namespace":"enchanting",

  "enchanting_panel":{
    "$opaque_background_texture":"textures/ui/your_path" //change the texture path
  }
}```
charred lodge
candid shadow
#

You're welcome

rustic storm
#

If i want to create a button that console can select i would do "focus_enabled": true right?

vernal storm
#

How to create a button that can be hold?

#

Holding the key will keep the script running until it stops

#

Impossible?

hazy ice
#

whats the binding to check if a button is the end of collection?

glass valley
#

What exactly does the property_bag component used in the "Preserve Title Texts" example do?
Also, removing the property_bag component from the example seemed to work.
Is there a reason it's needed?

clever vapor
#

because normally, when u source control it from another element, it can sometimes be empty

#

so instead of that, using property bag, it returns an empty string instead

glass valley
#

I understand, thank you

manic dragon
# hazy ice bump

You simply compare the collection index of that button with total collection length

For form button it'll be like this
(#collection_index = (#form_button_length - 1))

hazy ice
#

got it thank you

hazy ice
#

#custom_form_length and?

manic dragon
hazy ice
#

ah okay ty

leaden kayak
#

Does item renderer not work in forms?

normal moat
#

its works everywhere ig

glass valley
#

What kind of control is this?

placid geode
#

seriously mojang? 🥀

#

well whatever

placid geode
candid shadow
limpid reef
#

So that’s useless

candid shadow
#

Oh I didn't notice it, maybe the value below is a placeholder? But most likely they had an oversight

normal moat
broken trail
placid geode
#

"button": {
"type": "panel",
"size": ["100%", "100%c"],
"controls": [
{
"[email protected]": {
"offset": [100, 10]
}
}
]
}

#

should look like that

craggy heart
untold dawn
glass valley
# quartz axle OMG HOW

Since live_horse_renderer only accepts string entity_ids, the title is fixed to update(Name) and the actual value is displayed via the subtitle.

left hearth
candid shadow
#

Idk I've never tried

candid shadow
#

Is this an issue with all fonts? I'm talking about those lines that gets drawn around the text

oak verge
#

Do you have shadow on

robust ocean
#

Is there anyone here who could maybe private message me so that I can send them some of my work for help.. I am making a ui overlay that displays the players armor items, offhand, and current biome. As of now the only things that are working are the biome display, the durabilities of the armor and offhand items, and the stack count of the offhand items. (so the only thing I am trying to get working is the item renders. Please do help a homie out..

#

(i could pay a few bucks for what im sure is not much work.. I am fairly new to json ui so i think i have it mostly done, but am just struggling.)

#

(idk if im allowed to say that.. if im not ill delete it, sorry.)

robust ocean
#

OK yall.. I am trying to use the 'custom' 'inventory_item_renderer' for displaying items in a ui and it asks for a 'item_id_aux' and no documentation i am finding has any WORKING way of getting items aux ids (except for values before the flattening) that work with the display. I am calculating the ids for items, putting those numbers in, and loading in and if I calculate for a compass, it shows a freaking armor stand... calculate for a clock, it shows an iron helmet.... ughhhhh

glass valley
#

How do I use the translation feature in json ui? .lang

candid shadow
# oak verge Do you have shadow on

No, I'm faking a shadow by rendering a text twice with different colours and overlapping them. But I'm not talking about the shadows, but the lines around the edges

manic dragon
candid shadow
manic dragon
limpid reef
lilac reef
#

quotations because I'm not as smart as other people and I'm not sure if that's the right term in this scenario/case/situation/etc.

placid geode
#

ig it's just a problem related to how json ui renders ttf fonts

weak cape
lilac reef
#

extremely hard to break it, been having issues with that kind of stuff for years

#

trust me, it's not that I enjoy it

#

just haven't found out how to truly break free from it

weak cape
lilac reef
#

That's also embarrassingly part of the bad habit

#

💀😂💀

#

saying sorry too much, is what I'm referring to

weak cape
#

😭✌️

#

i will stop my dry talk lmao

lilac reef
#

lmfao

#

no worries

weak cape
lilac reef
#

not sure I quite understand what you mean, but we don't have to talk about it, especially not in the JSON UI channel, lol

lilac reef
# weak cape 😭✌️

could you maybe add me, since I can't add you? you seem like a really nice person who's genuinely kind of chill most of the time, and you seem quite interesting to me, so kind of wanted to add you

#

if the answer is no, I can understand

#

no worries, if that's the case

#

just thought I'd ask

weak cape
#

I was wondering if I could make a joke but it will be better if i just answer your question 😭

lilac reef
#

you can make a joke, I'm not afraid of a joke, lol

weak cape
lilac reef
#

dude, just make the joke, lmao

#

it's never too late to be silly

weak cape
lilac reef
#

That's what makes us feel alive

lilac reef
weak cape
#

🫶 thanks

weak cape
limpid reef
#

What was that conversation 😂😅

rustic storm
#

How do i make a custom ui's buttons selectable by console?

candid shadow
candid shadow
proven kiln
proven kiln
#

swear to god noone helps me

#

@placid geode yo quesiton

#

Ooooo zel

weak cape
proven kiln
#

its doing some wierd shizz

placid geode
proven kiln
#

zel is helping rn

weak cape
#

i regret installing linux

proven kiln
#

Lol

jolly rock
hardy lily
#

I'm kinda forgot how to get a formatted text from binding text to another binding text and display it on button name or other variable

#

anyway, is it possible to use binding text like #form_text for "sound_name"?

        "form_button@common_buttons.light_text_button": {
          "sound_name": "#form_text",
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "size": ["fill", 32],
          "$button_text": "#form_text",
          "$button_text_max_size": ["100%", 20],
          "bindings": [
            {
              "binding_name": "#form_text"
              // any formatting here...
            }
          ]
        }
tepid ember
#

@placid geode Can you help me again? I created a system to move the text and resize the image, but for some reason the text position is different from the mobile version. Is there any way I can fix this?

tepid ember
#

I wanted it so that if I changed the position, it would be the same for everyone, mobile PC, etc.

weak cape
#

I thought a ping was bad

#

But a double ping is crazy

tepid ember
weak cape
#

Besides that there are plenty of other people intelligent

tepid ember
weak cape
#

But I’m not him so he should say it himself

tepid ember
#

👍

grave flax
#

Json UI erro. help me?
[UI][error]-UI Control: sdl_store_header_with_coins | UI Control: sdl_store_header_with_coins_content | UI Control: top_bar_coins | UI Control: top_bar | UI Control: title_stack_panel | UI Control: search_header_stack | UI Control: search_header_text_box_panel | On Control Path: /store_data_driven_screen/variables_button_mappings_and_controls/safezone_screen_matrix/inner_matrix/safezone_screen_panel/root_screen_panel/screen_content/top_bar_section/sdl_store_header_with_coins/sdl_store_header_with_coins_content/top_bar_coins/top_bar/title_stack_panel/search_header_stack/search_header_text_box_panel/clear_button | JSON UI parse failure: Must define a collection name for the binding!

hardy lily
#

I forgot how to make flipbook 💀

#

hlep

manic dragon
hardy lily
#

Oh, I forgot that if auto save icon exist

#

Thanks

whole jasper
manic dragon
limpid reef
#

How can I make the stone background with just the stone texture??

#

Maybe like nineslice repeat??

#

But I don’t know how to implement it in the json object of the texture

#

If that how I should do it

#

I did not check if there was a nineslice_type parameter in json ui but yeah

limpid reef
limpid reef
glass valley
#

How do I add my desired fonts as ttf to font_metadata.json?

#

I'm not sure if I should add this to font_metadata.json

fallow compass
#

Is there any binding for player tag or score board? And for making it fully disabled? Also where I can find the bindings documentation?


"heart_renderer": {
    "type": "custom",
    "size": [ 1, 1 ],
    "renderer": "heart_renderer",
    "layer": 1,
    "bindings": [
      {
        "binding_name": "#show_survival_ui",
        "binding_name_override": "#visible"
      }
    ]
  },```
manic dragon
# fallow compass Is there any binding for player tag or score board? And for making it fully disa...

#objective_sidebar_name gives you the scoreboard title if that's what you meant
and this can show the player nametag

"playername_grid": {
  "type": "grid",
  "size": ["100%c", "100%c"],
  "grid_dimensions": [1, 1],
  "grid_item_template": "hud.player_name",
  "collection_name": "players_collection"
},

"player_name": {
  "type": "label",
  "text": "#gamertag",
  "bindings": [
    {
      "binding_name": "#gamertag",
      "binding_type": "collection",
      "binding_collection_name": "players_collection"
    }
  ]
}
whole jasper
clever vapor
#

they made an AI do it

rocky quail
#

I just woke up what 😭

#

assistance with AI

valid swan
#

LOL 🤣

rocky quail
#

Ahhh yes Undefined, undefined and undefined

valid swan
rocky quail
#

Interesting, I'm on the lookout for undocumented stuff

valid swan
#

If that's the case, I'll be very sad with Mojang.

rocky quail
#

maybe, let's hope not

wooden sluice
#

whats the correct binding operation for adding a string to a string bind?

#

example

"source_property_name": "('§' + #text) = #text)",

im trying to do something like this and my game crashes

#

fixed, solution for anyone else like me:

('§' + #text) // you dont need = or anything else
oak verge
#

ah yes, the undefined docs

candid shadow
valid swan
valid swan
valid swan
pine furnace
#

One message removed from a suspended account.

#

One message removed from a suspended account.

manic dragon
#

I wonder how accurate those descriptions are...

clever vapor
#

they're broad

#

it sucks at the moment

#

like this property virtual_keyboard_buffer_control

#

it says: "Whether this input uses a virtual keyboard buffer."

#

i mean, no shit

manic dragon
rocky quail
#

what does that even do

oak verge
manic dragon
#

Some other info is wrong too. Wrong description and type

pine furnace
#

One message removed from a suspended account.

oak verge
#

from the samples, possible values are text_edit or text_scroll

manic dragon
clever vapor
#

yes

#

like source control name

oak verge
clever vapor
#

advertisement

oak verge
manic dragon
pine furnace
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

manic dragon
#

Could be something wrong with the animation itself

pine furnace
#

One message removed from a suspended account.

manic dragon
#

Are you using factory to generate the animation?

#

I can't really tell what's wrong without seeing the code. Title shouldn't normally interfere with any animation

red creek
#

How can I move this slot? Which file controls it?

valid swan
rustic storm
#

i have a custom sidebar, using titles as the binding, but the issue is this causes flashing, and i would prefer not to use the actionbar, is there any workaround besides the actionbar, to stop the flashing?

polar frigate
#

For what? Aren't they gonna move to ore ui LoL

valid swan
tepid ember
#

Is there "#anchored_offset_value_y_absolute" ?

polar frigate
tepid ember
#

It looks like they’re going to merge it, I hope it turns out good to use.

polar frigate
#

I see, good to know

quaint raptor
#

Can anyone help me? I'm using a text-to-text splitting tool in the Bossbar, but the problem is:

It currently displays as "x55555" normally.
However, if I remove the "x," leave only "55555," or just use the numbers, it stops displaying. What could be causing this? Can anyone help me?

uneven epoch
#

I have no clue what I am looking at honestly

weak cape
#

It can only display strings

#

Add the paragraph with z

valid swan
valid swan
#

Mojang being Mojang

limpid reef
#

why does the header is gray when my background is visible and is white when the bg isnt visible

#

even the dropdown label

#

this is so frustrating

#

i tried everything

limpid reef
#

It’s dynamically changing based on the bg

#

How can I set this to white?

placid geode
placid geode
#

change the layer of the whole generated_contents stack panel

limpid reef
#

oh

#

it works thanks

potent current
#

can someone help me out? idk how to make the server form body label appear

        "type": "stack_panel",
        "orientation": "horizontal",
        "size": ["100%c", "100%"],
        "anchor_from": "center",
        "anchor_to": "center",
        "collection_name": "form_buttons",
        "controls": [
            {
                 "text": {
          "type": "label",
          "color": [0,0,0],
          "text": "#form_button_text",
          
          "max_size": [ "100%", "default" ],
          "offset": [ 0, 4 ],
          "locked_alpha": 0.5,
          "font_type": "default",
          "font_size": "normal",
                    "bindings": [
                        {
                            "binding_name": "#form_button_text",
                            "binding_type": "collection",
                            "binding_collection_name": "form_buttons"
                        }
                    ]
        }
            },
            
            {
                "my_offset_button@server_form.my_custom_button": {
                    "collection_index": 0,
                    "$button_size": [64,64],
                    "$padding_size": [80,80],
                    "$icon_size": [32,32]
                }
            }
        ]
    },```
potent current
#

PLS someone help me out with this one

wooden sluice
#

does anyone know the max image size in a json ui ijmage

limpid reef
jagged breach
#
import { ActionFormData } from "@minecraft/server-ui";

system.beforeEvents.startup.subscribe(({ customCommandRegistry }) => {

    customCommandRegistry.registerCommand(
        {
            name: "c:menu",
            description: "Open a simple menu",
            permissionLevel: CommandPermissionLevel.Any,
            cheatsRequired: false
        },
        (origin) => {
            const player = origin.sourceEntity;

            if (!player) {
                return {
                    status: CustomCommandStatus.Failure,
                    message: "Only players can use this command."
                };
            }

            // Delay 1 second (20 ticks) before showing the menu
            system.runSchedule(() => {
                const menu = new ActionFormData()
                    .title("Simple Menu")
                    .body("Choose an option")
                    .button("Option 1")
                    .button("Option 2")
                    .button("Option 3");

                menu.show(player).then(response => {
                    if (response.isCanceled) return;
                    const choice = response.selection; // 0-based index
                    player.runCommand(`say You selected Option ${choice + 1}`);
                });
            }, 20);

            return {
                status: CustomCommandStatus.Success,
                message: "Opening menu..."
            };
        }
    );

});```

Can anyone help me? when i run /menu it just says 

```[Scripting][error]-TypeError: not a function    at <anonymous> (menu.js:37)``` and i literally have no idea why
weak cape
#

whats the 37th line?

oak verge
#

this is off topic
where did you get runSchedule anyway

#

runSchedule => runTimeout
isCanceled => canceled

#

again, this is off topic

hollow needle
#

Is it possible to show your inventory slots in a form?

manic dragon
#

You can interact with them like regular form buttons

hollow needle
#

But I don't want them to be buttons that close the form

manic dragon
#

Inventory renderer is just to display the items. It doesn't interact with anything.

manic dragon
#

Use entity inventory or chests if you really want the feel of player inventory

placid geode
#

without on

jovial hemlock
jagged breach
weak cape
#

oh i see

left yew
#

Why not?

manic dragon
#

You dug real deep

weak cape
#

😭✌️

#

bro is NOT late

limpid reef
#

Form tag!

#

Oh there it is already

normal moat
#

bruh xd

rocky quail
#

honestly true

weak cape
#

i am not that old to have messages that old

#

lol

oak verge
#

Wdym, that was just some days ago

rocky quail
#

that was 2 hours ago wym?

weak cape
#

it redirected me to a message from 2023

#

november 11th of 2023 PepeHands

weak cape
#

btw #anchored_offset_value_x how does this binding work?

#

Cuz it doesnt seem to work at all when i use it

#
{
    "left_text_template": {
        "type": "label",
        "text": "#text",
        "bindings": "$bindings",
        "debug": "red",
        "use_anchored_offset": true,
        "property_bag": {
            "#anchored_offset_value_x": 100
        }
    }
}
manic dragon
oak verge
manic dragon
weak cape
weak cape
weak cape
weak cape
#

Alright this is what i came up with:

{
    "left_text_template": {
        "type": "panel",
        "anchor_from": "top_left",
        "anchor_to": "top_left",
        "use_anchored_offset": true,
        "bindings": "$offset_bindings",
        "size": [
            1,
            1
        ],
        "controls": [
            {
                "label": {
                    "type": "label",
                    "text": "#text",
                    "anchor_from": "top_left",
                    "anchor_to": "top_left",
                    "use_anchored_offset": true,
                    "bindings": "$bindings",
                    "offset": [
                        "50%",
                        "50%"
                    ]
                }
            }
        ]
    }
}
#

Its offset is dynamic, based on a bossbar

#

no idea if that thing what i made is the best way, but if it work, it works

#

😭✌️

#

tbf anchored offset bindings are great

manic dragon
weak cape
#

from my observations it uses the elements size

manic dragon
#

I'm pretty sure it's based on its parent's size. I've worked with it before

weak cape
#

my previous version had the anchor offsets instead of the actual offset array with 50%

#

and it worked the same as offset with 50%

#

Alright this is what i came up with:

{
    "left_text_template": {
        "type": "panel",
        "anchor_from": "top_left",
        "anchor_to": "top_left",
        "use_anchored_offset": true,
        "bindings": "$offset_bindings",
        "size": [
            1,
            1
        ],
        "controls": [
            {
                "label": {
                    "type": "label",
                    "text": "#text",
                    "anchor_from": "top_left",
                    "anchor_to": "top_left",
                    "use_anchored_offset": true,
                    "bindings": "$bindings",
                    "property_bag": {
                        "#anchored_offset_value_x": 0.5,
                        "#anchored_offset_value_y": 0.5
                    }
                }
            }
        ]
    }
}
#
{
    "left_text_template": {
        "type": "panel",
        "anchor_from": "top_left",
        "anchor_to": "top_left",
        "use_anchored_offset": true,
        "bindings": "$offset_bindings",
        "size": [
            1,
            1
        ],
        "controls": [
            {
                "label": {
                    "type": "label",
                    "text": "#text",
                    "anchor_from": "top_left",
                    "anchor_to": "top_left",
                    "use_anchored_offset": true,
                    "bindings": "$bindings",
                    "offset": [
                        "50%",
                        "50%"
                    ]
                }
            }
        ]
    }
}
#

i got the same result with both codes

manic dragon
#

0.5 means 50% so you should get the same results

weak cape
#

yeah. But you said the #anchored_offset_value_x bindings were relative to the parent's size, no?

manic dragon
#

Yeah

weak cape
#

Im confused 😭

manic dragon
#

Normal offset array that uses percentage also depends on parent size

weak cape
#

What is the parent?

#

Is it the "left_text_template"?

manic dragon
#

yeah

weak cape
#

The offset percentage uses the size of the label element

#

it moved the label by the halfed width and height of the actual label

#

not by 0.5 pixels

manic dragon
#

now I'm confused

manic dragon
weak cape
#

without bindings

#

Hold Up

#

No idea why but it suddenly works without the offset array

#

I guess you were indeed right!

#

I wonder what made my label go offcenter when i coded it 🤔

#

thanks anyways

manic dragon
chilly yacht
#

ther is opne that isnt relative

manic dragon
weak cape
#

the only absolute one that shows up is #size_binding_x/y_absolute

chilly yacht
manic dragon
#

It was never used anywhere and I never tried it myself

chilly yacht
#

guess its just size

placid geode
#

#offset_binding_x/y 😱😱😱😱😱

#

nah i dont think it exists lol

tepid ember
#

There is no absolute value for offset.

whole jasper
whole jasper
charred viper
#

how to access #hud_title_text_string in other UI screen like pause screen, emote wheel, etc.?

when those screen are open you cant access #hud_title_text_string

weak cape
#

im pretty sure you cant access bindings from other screens

charred viper
#

you can still access scoreboards in those screens

manic dragon
#

Not all bindings are accessible like this
You can access scoreboard because pause screen used to have scoreboard

#

Title is not accessible anywhere else other than hud_screen

charred viper
#

then is there a way I can make minecraft window still show HUD while window is not active... I dont want pause screen overlay when window is inactive

manic dragon
charred viper
manic dragon
manic dragon
#

If it doesn't work, add "render_only_when_topmost": false in hud_screen

limpid reef
#

why does the paper doll is facing away.

limpid reef
#

i found

glass valley
#
{

"binding_type": "view",

"source_property_name": "(((('%.300s' * #text_a) - ('%.200s' * #text_a)) - '\t') / 10)",

"target_property_name": "#alpha"
},

``` I added this binding because I wanted to be able to change it to a desired alpha value, but is it impossible to get a number like 0.5?
manic dragon
#

It's safer that way, because trying to divide strings will crash the game

hoary skiff
#

Beside bedrock wiki

#

Where can I learn more about json ui to the higher level

clever vapor
#

vanilla

#

thats it

hoary skiff
#

Hello @clever vapor

#

My little sister told me about you

weak cape
#

that is the best way

#

if you need help with documentation get yourself on bedrock samples

#

and this discord channel

hoary skiff
#

I think that's what I'm currently doing

#

Thanks

clever vapor
hoary skiff
#

She just asked me if I remember you, that's all

rich abyss
#

how can i make a dynamic crosshair? (0 ui experience)

#

ik i can bind it with a title text but what other ways are possible?

weak cape
#

actionbar

#

chat messages

#

toasts i guess

rich abyss
#

hmm

weak cape
#

substitles (kinda) (from title, thats why kinda)

rich abyss
#

what about scoreboards

weak cape
#

yeah

#

those too

rich abyss
#

oh nice

#

yk any example/template or anything similar from where i can learn allat?

weak cape
#

using scoreboards?

#

i dont know any examples

#

i finished my round

#

i mean you can look through bedrock samples but it wil lbe hard with 0 json ui experience

clever vapor
hoary skiff
hoary skiff
weak cape
#

server about json ui?

#

interesting server

hoary skiff
#

Would you like me to invite you

weak cape
#

yeah

limpid reef
weak cape
#

Cant we send it here?

#

there are no rules against it so 🤷‍♂️

weak cape
charred viper
#

how can I use #collection_index to labels?

limpid reef
#

Collection index is used to select an element in a collection so it depends on the collection you’re using (form_buttons, ..)

#

After picking an element you can access element specific binding like form_button_text for form_buttons collection

#

Then you can set the value of your label to this collection element specific binding

hazy ice
#
"progress": {
   "type": "image",
    "texture": "textures/ui/experiencebarempty",
    "anchor_from": "left_middle",
    "anchor_to": "left_middle",
    "size": ["100%", 6],
    "collection_index": 0,
    "controls": [
        {
            "progress": {
            "type": "image",
            "size": ["100%", "100%"],
            "layer": 1,
            "clip_direction": "left",
            "clip_pixelperfect": false,
            "texture": "textures/ui/experiencebarfull",
            "$max": 100.0,
            "bindings": [
                    {
                "binding_name": "#form_button_texture",
                "binding_name_override": "#progress",
                "binding_type": "collection",
                "binding_collection_name": "form_buttons"
                },
                {
                "binding_type": "view",
                "source_property_name": "(#progress * 1)",
                "target_property_name": "#converted"
                },
                {
                    "binding_type": "view",
                    "source_property_name": "(($max - #converted) / $max)",
                    "target_property_name": "#clip_ratio"
                }
            ]
            }
        }
    ]
}```

anything wrong with my code? been a while using progress bar
#

its wrapped in a form_buttons collection name stack panel btw

#

and
.button('hello world', '50')

wintry crater
#

is it possible to render a specific item from my inventory on my hud like this?

manic dragon
#

You'd basically copy the code for how items are displayed in hotbar and change the collection index. 0-8 for hotbar items and higher than that for inventory items

wintry crater
#

I found this item_id_aux, and this is what I’m looking for. But how can I get the ids of the items/blocks using a script and print it?

manic dragon
wintry crater
#

this slot

manic dragon
#

You don't need scripts at all

#

I might have an example. Just need to find it.

manic dragon
hazy ice
manic dragon
hazy ice
lone glen
#

Does the tab(in the menu) text gets imported from another script or is it in the hbui files?
OreUI

shrewd island
#

Whats the Best Software To Do Coding

weak cape
shrewd island
#

Bet Thy

#

Thy Downloading Now

weak cape
#

🥺

shrewd island
#

Does The AI Feature Be Good

hazy ice
shrewd island
#

How Do I Start A New Thingy In VisualStudioCode

weak cape
hazy ice
shrewd island
#

Zel How Do I Make A New Code

weak cape
#

inside a resource pack

shrewd island
#

Can Anyone Teach Me How To Code Im Starting Fresh]

shrewd island
#

Oh

#

What Should I Try Code First 🙂

weak cape
#

i would recommend starting with the actual intro and overall wiki

#

What i did is I modified vanilla code

shrewd island
#

oki

weak cape
#

here are all ui/*.json files

shrewd island
#

@weak cape Zel Could You Teach Me Like How To Start Maybe

manic dragon
hazy ice
weak cape
#

You got tutorials and reference documents

#

That is how I started

wintry crater
#

If I have this text remove this abc efg, how can I get only abc? I tried (#text - ('%.12s' * #text)), but the result is abc efg

wintry crater
#

I see, thanks! I forgot how format works since it’s been a while since the last time I touched a json ui file hehe

manic dragon
#

I wish I had something fun to do...

weak cape
wintry crater
manic dragon
wintry crater
#

thank you!!!

dusty rune
#

My half brained ape with bearly ui knowledge about to code all of that health ui

wintry crater
#

How can I position the 2nd stack_panel below the 1st stack_panel?

here's my json ui structure

stack_panel (vertical)
stack_panel 1 (horizontal)
= elements
stack_panel 2 (horizontal)
= elements

jolly rock
#

stack_panel (vertical)
size: ["100%" , "100%c"]

#

Maybe

wintry crater
#

thanks!

red creek
#

How do I make the slot image disappear if there's an item in it?

sinful violet
#

Hello, is it possible for a script to detect if an item has been placed in the slots of a crafting table, for example?

placid geode
#

or 0 but i remember it was -1

red creek
limpid reef
#

La crafting table n’a pas d’inventaire

tiny surge
#

Can this be moved, or the text underneath? Pocket edition (iOS). I want to be able to read the preview stats.

#

Stats use a custom renderer, I can only seem to hide them or not. Can't seem to find where the top buttons are coded. Any pointers to whether it's currently data driven, what it's even called etc?

manic dragon
tiny surge
#

Both the stats and the buttons?

#

Size can't be manipulated?

#

Or transparency or top/background with rendering?

tiny surge
#

Maybe changing the matching button textures (if they are actively used) to transparent would work. ¯_(ツ)_/¯

#

(There's a hide HUD option but that's ridiculous.)

#

If anyone knows where if anywhere this top bar is referred to in the vanilla texture pack, that would be appreciated. I can find the preview stats section but don't want to turn that off, i need to be able to turn off the top bar.

manic dragon
dusty rune
#

I'm dumb at ui so uh
when I manually change empty bar wideness, it affects height too, how do I prevent it

tiny surge
manic dragon
bitter ether
#

Is there a way to detect the current GUI scale modifier?
Something similar to binding variables like #is_spectator_mode or #is_creative_mode..

manic dragon
#

Nope

tepid ember
#

Is it possible to use reserved text in sendMessage? I want to create my UI using it; how do I get the text and display it in the player's HUD, just like in the title?

dusty rune
#

no

dusty rune
#

eh no need already did this in my method now

balmy crow
#

I want to ask something we can do modal animated UI ?

oak verge
unreal ravine
#

yo Guys, I have a question , How can I get several texts without the spacing? like "clUI:red Warning!" "clUI:blue Detected!"

limpid reef
#

why is this happening??

#

why is there space between the buttons

#

?

#

i found the problem

limpid reef
#

does someone knows how to use vignette_renderer

#

?

hardy lily
#

can someone tell me what actually happen on this situation?

        "button_texture": {
          "type": "panel",
          "size": [34, 34],
          "bindings": [
            {
              "binding_type": "view",
              "source_control_name": "image",
              "resolve_sibling_scope": true,
              "source_property_name": "(not (#texture = ''))",
              "target_property_name": "#visible"
            }
          ],

          "controls": [
            {
              "image": {
                "type": "image",
                "layer": 2,
                "size": [30, 30],
                "offset": [-2, -1],
                "allow_debug_missing_texture": false,
                "bindings": [
                  {
                    "binding_name": "#form_button_texture",
                    "binding_name_override": "#texture",
                    "binding_type": "collection",
                    "binding_collection_name": "form_buttons"
                  },
                  {
                    "binding_name": "#form_button_texture_file_system",
                    "binding_name_override": "#texture_file_system",
                    "binding_type": "collection",
                    "binding_collection_name": "form_buttons"
                  },
                  {
                    "binding_type": "view",
                    "source_property_name": "(not ((#texture = '') or (#texture = 'loading')))",
                    "target_property_name": "#visible"
                  }
                ]
              }
            },
            {
              "[email protected]_loading_bars": {
                "size": [30, 4],
                "offset": [-2, 16],
                "bindings": [
                  {
                    "binding_type": "view",
                    "source_control_name": "image",
                    "resolve_sibling_scope": true,
                    "source_property_name": "(#texture = 'loading')",
                    "target_property_name": "#visible"
                  }
                ]
              }
            },
            {
              "[email protected]_renderer": {
                "offset": [-2, -1.25],
                "size": [30, 30],
                "anchor_from": "center",
                "anchor_to": "center",
                "layer": 10,
                "property_bag": {
                  "#item_id_aux": "#item_id_aux"
                },
                "bindings": [
                  {
                    "binding_name": "#form_button_texture",
                    "binding_name_override": "#texture",
                    "binding_type": "collection",
                    "binding_collection_name": "form_buttons"
                  },
                  {
                    "binding_name": "#form_button_texture_file_system",
                    "binding_name_override": "#texture_file_system",
                    "binding_type": "collection",
                    "binding_collection_name": "form_buttons"
                  },
                  {
                    "binding_type": "view",
                    "source_property_name": "((#texture - 'aux_id_') * 1)",
                    "target_property_name": "#item_id_aux"
                  }
                ]
              }
            }
          ]
        }
#

I thought it was a missing texture, but when I tried to replace the missing texture, the purple thing is still there

hardy lily
#

solved

hoary skiff
#

How do yall send a chat using just json ui

#

I just saw many chat screens that can send messages by clicking the button

#

My guess was the button is a send button using a custom value to send

chilly yacht
# hardy lily solved

ik u solved it but they seemed to have fucked up "allow_debug_missing_texture": false, in some recent update

hardy lily
hoary skiff
#

Just want to tell yall

#

JSON UI is a pain

manic dragon
#

It's not :>

balmy nacelle
burnt flame
#

Is it possible to use binding conditions with "view" type bindings?

manic dragon
#

afaik it's not possible. But I was told there's some hacky way to do it, although it never worked for me

wooden sluice
#

does anyone know if the size anim type can be used on font scale factor

#

and does font scale factor accept [] for width in height rather than a single value?

manic dragon
#

Nope

wooden sluice
wooden sluice
#

does a buttons panel have to be in the scrolling content of a form for the scrolling content to actually be able to be scrolled or no?
because i have a form and i didnt want the buttons to be scrolled, the things should be separate. perhaps i can add button mappings?

#

or is there some property for an element to not be scrolled like that sticky css one?

placid geode
wary pollen
#

I have a working edit_box hover system using text_control/hover_control. Inside the hover panel I want to display a label that reads and strips #text from the parent edit_box. The binding (#text - 'flag') inside the hover panel's child label doesn't work — #text seems out of scope. Is there a way to pass #text down into a nested hover panel child, maybe via source_control_name or another approach?