#JSON-UI General
1 messages · Page 49 of 1
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?
{
"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
Yep
Is the #length in property_bag supposed to be #collection_length there?
oh wait i see
No it can be anything really but you must set some value to #collection_length. I'm using #length for that
{
"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?
Anyone know if its possible to use glyphs with the minecraft ten font?
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"
}
ah thank you, whats kinda crazy is literally like 30 seconds ago i figured out they were adding formatting characters xD
i was fixing also mine (cus it worked before the update) before i read ur message here, then i saw ur message, so not sure if that was coincidence xd, no probs
Nope
You need to provide a number or an array specifying control IDs to a #collection_length property
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
In this case, a better option would be to use ignored property with probably global variables
i need them to be dynamicly hidden, not static, based on the item in the slot
so i dont think thats an option?
you figure this out?
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?
i do is the thing
divide the label into 2 (or more) labels*
huh???
I was thinking of doing that but too lazy lol
Ig factory is the only option then
Just wrap the elements in a panel and add the panel in the stack_panel
Yeah, had the same issue but was too lazy to rewrite my toggle lmao
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?
Instead of using a panel use @common.root_panel, this has all the button mappings to prevent that
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 (?)
yea it's more complicated than you previously mentioned. honestly, i can't tell what's causing this
or maybe 0 + #title_text
@strange snow they changed it a bit but that message explains stuff that was way back
Something they changed is ‘%.5a’ * #str * 1 this doesn’t work anymore but this doesn’t really change much
Noooo
i just get started making something with this LoL
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
Yeah that isn't working for some people. It works for me but sometimes breaks XD
You can reload a world or use a dummy pack. Why restart the game
it works for me constantly
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
remember that #form_text is used to show body
just use other name for your binding
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
you are removing it with '%.4s' * #ftext
|something - |som = ething
Minecraft developers
67
Tégé
the fact that you don't need to know russian to understand this is crazy
why is my scroll panel cutting the bottom elements?
just gonna add padding lol
is this ('[' + '\"actionform' + #smt + '\"' + ']') possible?
uh
It'll be a string not an array
i found my artifact JSON
I cant wait for someone to cry about OreUI
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
Whats the texture for the inventory button on the hotbar?
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
"allow_clipping": false
my first json ui
im soo bored
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
im more than happy to let you do my work for free!!!
don't tell me the arrow is hard coded into the text
They are hardcoded as it seems
bruh
yeah i already knew that by the way it works ngl
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.
Even the position is wrong. Ig they are making sure it works first. The layout can be done later
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.
it's quite easy to make it right
i don't see any reason to keep it this way but it's up to them
it is yeah, though again. they probably won't do it.
just fyi the effect screen still has a pocket edition slider in there.
i didn't notice it ig
i don't even open it often and even if i do it's just for a glance
i just found it by accident but it is funny and not quite surprising.
it's probably the ugliest screen in my opinion ;-;
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.
how the heck did i miss this thing ;-;
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?)
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
MFW i figure out the cause of the issue after 4 hours of trial and error and realize that i have no idea how to avoid it
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
I have solved it! 🥳
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
it is possible to do "#name" : "$name" ?
@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?
Some of them might break but not all custom bars. Mine didn't break
Yeah in property_bag
maybe it just limit spliting text only "%.(number)s"
other spliting limited
%-X.Xs
%Xs
%-Xs
and other```
how about "texture": "('textures/ui/' + $number)"
is it possible?
yes
"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
Just send the text like this
combo:§r123
ok thanks
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?
how about "texture": "('textures/ui/image_' + #number)"
is it possible?
we need more info on this
need to use bindings
because #number is a binding and requires to be used in bindings
What kind of thing, for example?
Where is the source code for this?
like your code
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?
that could be caused by several things
No, the problem is: the scroll bar is outside the form, not inside.
So set an offset
Or rather change the variables if you use a template
We need some code
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 ] } } ] },
How do you change the ui content without closing it and reopening it??
this is a modal form
Can I do this with an actionform?
Ohh
.
"$scroll_bar_left_padding_size": [
0,
0
]
try adding this
how 😂
"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)
did you send title?
i think you have to send a title to have a subtitle no?
it shows even if i dont have a subtitle and a title
it is a bit more complicated. requires a deep understanding of json ui
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
😂
anyways, you have to place a toggle, and using a button you change the conditionally rendered panel based on the data of the button
how to get the button state?
the toggle state?
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
oh oaky
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?
I would also appreciate your help on how to increase the size of the scroll bar.
+Depending on the player's current armor type (armor and items in both hands), they can already save the armor in the menu if they want to install it and select an animation, for example.
.
is there a way to change the missing texture texture for a specific image?
I want to create spacing between these two controls. How could I do that? stack_panel
{
"[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
change form_body_text size to ["100%", "default"]
@delicate berry ask here
add the spacing in your body text
i can´t help me please
https://discord.com/channels/523663022053392405/1450191496681754835
I think it was "allow_debug_missing_texture": false
that's not what i need
i want to change the fallback texture to something else not have it empty
Oh mb
But I don't think you can change it, not from the UI at least
There is a missing texture image somewhere in the textures folder. Not sure if changing that would work.
even if, i don't want to overwrite that texture because it's used for other things
Yea that's understandable
you can actually check if the texture is loading
just grab the texture file thingy and check if its equal to 'loading'
"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 ?
Hello guys
You can try using ' ' instead of " " inside of source property name value
I meant the "sharpness" to 'sharpness'
what will it do. Can you explain it a bit, i'm new to JsonUi stuffs
It's about the syntax. You can't use double quotes inside double quotes. So you need ' ' inside " "
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
The variable won't have the value of that binding. It will behave like a string that has the binding name as value
is it just not possible to convert a string into 0-1 float for the alpha property?
shouldnt this be possible?
You need to multiply it by 1 in variable, then divide by 100 or 1000 or something
yeah was about to say this
or just multiply by a variable with value 0.0001 idk
im searching someone that is really good at json ui that can help me in a minimap ui project (i can pay) contact me
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
is it possible to stop horse render from rotating?
Has anyone here managed to create a new interface in ddui?
When creating custom boss bars, besides the boss_name of the boss_bars, what else can I use to identify the boss?
afaik there isn't anything available other than boss name and progress data
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 :>
You want the source code?
I do have that
I mean the code of it
Thanks now i just need to modify the scroll bar its confusing for me i dont know where's its located
Woah let me try it rq
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:
🤵-> 🦹 ->🤵
Okay got itt thanks so much
Guys is it possible to add a button on the settings screen?
Yeah
@pine matrix can you text me on privte I have a question about the dev pack that you send for the chest UI
damn
damn daniel 🦭🦭🦭🦭🦭🦭🦭
anyone?
How im kinda having a hard time adding it
Yo is there a way to have a property bag value go up every time u press a button?
How im kinda having a hard time adding it
Yeah use a toggle instead of a button. That's how counters are made
Is it a bunch of toggles?
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
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 :)
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
You add a toggle along with the other toggles with a unique index. Then add your content in the content_section and conditionally render them based on that toggle state
I got it, but thanks
I already got it i mean
the Mob Maze server ui looks quite good
okay i was wrong. browsing their server forms will drain your memory
memory leaks!!
I don’t think so
It looks good in my opinion but it's not good for your memory :/
Why 19?
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]
im just curious, how do you cause memory leak using ui?
Bad use of bindings can cause memory leak.
what would be a bad way to use bindings?
like using "target_property_name": "#visible" more than once in the same control?
Is there a way for me to check if the toggle is disabled to revert the animation?
like reassigning a binding to the same name over and over again maybe
or too many unnecessary bindings

ooh yeah those binding loops
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.
Unnecessary looping. or loops that you forgot to clear out.
A thing that fills up your ram to full constantly without clearing, can either cause whole system lock-up or just kernel panic/BSOD.
though it should be more noticable since this also slows down your performance constantly aswell.
Ohh okay
🙃
So awesome
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
I think you already got your answer. In their case, the sheer amount of bindings is the cause I think.
Didn't they give all Minecraft foods (except glow berries) the food component in 1.21.120?
I tried using the "reversible" animation component, but I can't get it to work because it throws an animation error. Is it possible to reverse the animation using the same event as a type button?
can someone help me in https://discord.com/channels/523663022053392405/1451515692896747620
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
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
Yes
"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')??
Remove not
I did that, but for some reason it didn't work
"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"
}
]
}
What is the value of $prefix
(#hud_title_text_string = $prefix + '1')
Try it @red creek
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.
"$prefix": "hidan_select:"
That didn't work either
(#hud_title_text_string = ($prefix + '1'))
Also are you sure #hud_title_text_string is hidan_select:1 ?
Yes, I managed to fix it by replacing "($prefix + '1')" with "hidan_select:1"
I don't know why it's not reading the "$prefix"
Yes, I've seen it. But it's confusing sometimes; it has translation errors because I translate it into Spanish.
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.
Is there a way to show '%' symbols after numbers when using binding?
Use "localize": false in the label
It works, thankyou :D
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?
the default value is true. the wiki is wrong on this i suppose
Ohh okay
it means translating the localization keys. those that are defined in texts folder
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
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
yes it is possible
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
Player ID ? Player Name ?
If so, I can simply make the menu create a button in BP with his name
Or more precisely, what is it and how to get it?
Well then I'll just create an additional button that says Indefecator
yes
{
"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
And how should I write in Rp
Thank you!
By the way, look at how I roughly showed it in Photoshop (only the table will not be the same)
cool i guess
And you can add animations
Just check for yourself if it's possible, maybe you know.
And armor elements, for example (items that the player had)
player animatrions? not without scripts.
If you use script api to play animation then yeah
whatever the palyer currently does or has equipped will be rendered
if the palyer walks, the renderer walks, if the player plays emote, renderer plays emote, etc
It doesn't matter, the main thing is that in the menu itself, it would be cool to add a walking animation, for example.
Very good !!!
Well, if it's not too much trouble for you, could you write some kind of example :3 ?
An example of what exactly?
Rendering
got an example here no?
I don't know much about him.
Well, I'll try to write something now...
👍
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.
Can you help and write a mini rendering example?
I think there is a language barrier. I sent a renderer already.
You just have to put it in a specific collection and use bindings (in your case; using the button collection and button bindings)
Try forwarding
Hello
Or send as a text document
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."
Yes, thanks to the localization, I guess.
Maybe it would be more correct this way
"player_renderer": {
"type": "custom",
"renderer": "player_live_renderer",
"anchor_from": "center",
"anchor_to": "center",
"layer": 20,
"property_bag": {
"#entity_id": "player_entity_id"
}
}
}
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.
Hello bro
Its as simple as that?
Sorry to bother you, could you please check your DMs?
Why do the buttons on the right look like this?
I want them to stay up there and not come down.
grid
when you hide an elementi n a gird
the element will be invisible but the space wil lstay
player_live_renderer exist?
isnt live_player_rederer?
can someone help to fix this probelm?
did you define your json files in the _ui_defs.json file?
So what should I do?
I want to use the two button panels in different grids.
hmm
hmm
How is the server_form?
Or what do you want to do?
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"
}
}
]
}
},```
It’s not clear what are you talking about
Its supposed to be a line but its a box 🙂
Sorry im not really good at English
You’re talking about the little red dot?
What’s your language
Yes
Filipino
Okayy
Can you provide more code because you’re always referencing 100% but we can’t see the parent
Oh the parent? Wait
"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
}
}
]
},```
Also try to set the y of the line to a constant value so you can see if it’s the 100% the problem
The image itself
Wait your texture white is red??
Did you define a nine slice json object for the texture?
Oh nineslice?
I didn't Modify any vanilla textures
Only the panorama
The texture you wand is « textures/ui/white » right?
Yes
Yeah I don’t know if it’s a nine slice texture
Okay...
Yeah
Okay i think i can fix it now Thank youu
Since how many years are you doing json ui to be this good 😩
How tho? There isn't a white with capital W in the textures/ui???
XD not much
5 years at most
but not all day so maybe 3 years?
it is
Okayy but you’re very good and we appreciate the help you give 🫡
Oh okay Thankss❤️
yep ty
Woah. It'll be at most 1 year for me. Maybe a bit more.
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.
remove binding_type
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
no
Can’t put custom links in mc
🤔
a server form "ActionFormData" but with a chest UI
By any chance, do you have a tutorial in English or maybe a basic example template?
I’m new to this whole JSON UI thing.
i used this one https://github.com/Herobrine643928/Chest-UI
but it doesnt seems it works
are there any alternatives?
if no i could perhaps create a new and better one
if you could create a new one it would be better
but is there an alternative?
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
alright im woorking on it
Isn't there a fork that works
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?
ใครก็ได้สอนผมทีผมต้องการให้ scoreboard มันแสดงผล4ช่องได้อะครับช่วยผมทีครับ
yeaa that's not allowed
cant have this
"offset": [
// -41,
// -52
$offSety,
$offSetx
],
Is there another way to do it?
use
#anchored_offset_value_x/y
I have no idea how to use it, I've never used this before, what's the difference?
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"
},```
something like this
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
I couldn't get it to work.
I'm new to JSON UI, is this rendering system really that complex
you can bind the x and y components of offset to a binding:
{
"offset": [ "#offsetx", "#offsety" ]
}
then change offsetx and offsety
i think that will work
But I've already done that, look here.
@brittle raptor
first, you need to enclose it in quotes, and second, you used variables, which wont work. you need to use bindings, which use hashtags (#)
i reccomend read
https://wiki.bedrock.dev/json-ui/json-ui-intro#bindings
I had done that before too, I tested # and $ to see if it worked, or maybe I tested it wrong, I'll try again.
make sure you enclose it in quotes (")
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
It doesn't work? My addon uses this in a stamina bar, and it keeps working.
nope
Actually not
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?
I saw it on Changlog, but my bar was still working, and it was using *1.
That's what I see, strange
I'll try another way tomorrow, testing with your code, thanks
Its entity id no?
I think you're allowed to use 32bit integers only (-2,147,483,648 to 2,147,483,647)
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
I'm referring to reloading textures and UI files
It was working until I reinstalled Minecraft. Now it doesn't work. I'm using a dummy pack to reload things.
I honestly don't know what a dummy pack is, but what matters is that at least it works in Preview
oh i mean an empty pack actually just the manifest and pack icon. i just change the order before reloading the world
oh ok thanks
Font size
font size doesn't give you as much customizability as font_scale_factor
Yeah but he doesn’t want font not being perfect
And you asked me if it works. Said how it worked.
That case is because we want font to be smaller than normal and font size still make it like that, just smaller...
Oh ok Mbad
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
it depends on your resolution really. no matter what scale you choose it'll still look funky in some resolution
Ye
Yeah, it's sucks we can't make font smaller like debug text
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
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
@umbral trench
You're right. Adding §c in front does convert it to string but that string becomes invalid for the horse renderer
Is there any way other than sending the value directly?
I don't think so
does anyone know if there is a gui scale variable or something
thats not hardcoded
perchance even the %?
i was told there was one
afaik there isn't
what about touch_gui
Where did you see it? I never saw it before
i think its in hud_screen.json
but ik it exists
It doesn't exist. There's $touch but not $touch_gui
Echo do you know how to activate an animation when I open the pause menu?
$touch has a boolean value and it tells you if you're using touch input or not
The animation works only one time
i swear ive seen it
The first time that I open the pause menu
You can use animation_reset_name: button_id to reset the animation whenever a button is pressed
And if he just close it?
wdym
button.menu_cancel or button.menu_exit
But if you close the screen the animation will disappear
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"
},
It also say animation reset name unknown property
Thanks
"animation_reset_name": "screen_animation_reset"
Apply it on the element that has the animation not directly on the animation
Yeah I figured that out
It doesn’t work
I tried with « any » and this also doesn’t work
It's used to reset the paperdoll animation. And that works
font size small seems to be the exact same as scale factor 0.5, with the same issues
Oh
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 = '')
)
Can anyone help me? I want the scoreboard to display on my HUD. Please help me.
Yes
Just without any string manipulation
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
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
that is if text does NOT contains pref_red OR does NOT contains green OR does NOT contains purple OR does NOT contains lowop OR is NOT empty, returns true
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
Thankss, If that do I think this works fine. But ingame it's bugging
Yes?
((#form_button_text - $_pref_red - $_pref_green - $_pref_purple - $_pref_lowop = #form_button_text) or (#form_button_text = ''))
I'll test this quick
ig its because the last not
Thanks a lot
yup
How to make a button that drop items in inventory slot 10
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
i edited it
should work fine now
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
I don't know anything about JSON-UI, can someone teach me?
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"
}
}
You need to add bindings
"bindings": [
{
"binding_name": "#form_button_text",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
}
]
ohhh
that makes a lot of sense now
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
strange, container_item in chests also use it with layer and that seems to work fine
try and make it inherit a parent's layer
I’ve already tried putting it parented to something with a high layer
It just goes behind it or something
i made everything myself including the item renderer:
``` {
"custom_item_renderer": {
"type": "custom",
"renderer": "inventory_item_renderer",
"size": [16, 16],
"layer": 3,
"bindings": "$item_render_id"
}
}```
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"
}
],```
I’m rendering inside of a container
Yea I tried making my own one too, even with the layer set to like 5 million it doesn’t show up
Whats weird is specific items show up
Like stone will render on top, but not most blocks or custom items
but they do render right?
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
They don’t render on top
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
hmm
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")
...
Does anyone know how to change the sound of a button on a server form?
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
Yes
well then use the "sound_name" value
and set it to the sound you want
like:
"sound_name": "random.wood_click"
It worked, ty.
Is it possible to change the "custom_toggle@common_toggles.light_text_toggle" sound?
try it out
This error occurred.
Unknown properties found in def[custom_toggle] from namespace[common_toggles]
-Unknown property [sound_name]
well then it doesnt work
// ui_common.json
"toggle": {
"sound_name": "$sound_name"
"$sound_name|default": "random.click"
}
And then in your toggle set "$sound_name": "<sound_name>"
It worked, thank you.
np
- Just make stack panel instead?
It's so unfortunate that we can't add child controls in it :) it's making a lot of bug
thanks
i will try that out
U can do size ["fill", 30] for every button..
So it'll automatically fit every button to the parent horizontally
This is actually cool, kinda look like in resources/behavior pack tab content
shi I forgot about this thanks
That General section is a little cramped
Yeah i know XD
Too lazy to make a new line h4h4h4
for pc players it won't be that big of an issue but it'll be hard for mobile users

Also some button will disappear when we open the settings in-gameplay
I noticed mojang hides so many button there :))
imagine mobile level gui scale
Emmm that's captured from my phone... if it's count as mobile lvl gui scale 
@polar frigate so i make a grid then a stack panel connected to the grid and the stack panel then has the buttons right?
There's nothing to do with grid anymore.. it's fully stack_panel
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
but do i need to make the buttons manually too?
so i cant do dynamic collection index stuff right?
Is it possible to change a value within a variable?
Yes. But the change will only be applicable in the element you change it in and it's children
Could I use preserverd text in this? Because I realized that I can only use preserverd text if it's in the same control where I'm going to use it.
If I'm correct, it's a binding. You can use it in any other control using source_control_name
Could I retrieve the value of the preserved text, save it in a variable, and use it anywhere?
What is preserved text?
If it's a binding, then no
It's text that stays on your screen permanently; you can manipulate it however you want, as if you had created a new title.
Probably referring to preserved title text from wiki
Oh ok
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.
You can do this using bindings but not variables
I know, but it would be a lot of work to do something like that; it would be interesting to have a simpler and more effective approach.
Wouldn't it be possible for me to change the value of a global variable and use it wherever I want?
Nope
why??
variables in JSON UI aren't like variables in programming languages
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
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.
I was having this issue for a few days. But apparently it randomly got fixed.
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
}
}
same. but putting that on the world just fixes it entirely. for some reason i guess lmao
i had this issue even on a phone too.
They messed up globally on global resources lmao
Kind of, yeah. That #myvar has to be inside property_bag
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
Will you be able to use the value of this variable, even if it's outside its intended scope?
Both works ig
Won't work as I've mentioned before
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.
What if I put a control inside the reserved text? Would that work?
You're trying to set the value of a binding in a variable. This doesn't work
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.
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"
}
]
}
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?
New update?
Yep
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

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
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.
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')"
is it possible to render 3d model in json ui?
Doesn't matter how many factories you use you can't have multiple different texts simultaneously
Yes using live horse renderer or paper doll renderer for player
im tinkering using equipment_preview_renderer and render controller
render controller for the armor stand if armor is in ui & what color is their equipment and then change the armorstand geometry and texture
I haven't really messed with smithing table much, so no useful info on that
im updating the wiki with what i know so far
hmm is there a way to get item_aux_id from custom item from chest using binding?
ill figure it out
is that even possible
detect if armor stand is in ui
i figure it out
yep q.is_in_ui
and yep
now i can sleep peacefully
yeah i realized that
How add more custom item overlays?
Do format specifiers work on bindings?
it suppose to
How would I go about overriding a binding on some condition?
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
{
"binding_type": "view",
"source_property_name": "#length",
"target_property_name": "#maximum_grid_items"
}
``` How do I remove the first 10 btns from the grid?
You can’t
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.
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 )
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)
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
Not really. Fork can also be made to base off of the code but optimise and add features
Not just small changes. And that is what most forks for Chest form do
you may as well start from scratch
that is what i did
('%.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) - '&')
Whats the name of the screen with the movement controls and the pause button and hotbar stuff?
Im trying to edit it
movement controls and the buttons on top are hardcoded, you can't edit those
the hotbar is in hud_screen.json
Yeah i thought those buttons were, thanks for the information! 😁
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
cool
do you want to get that '1000'?
yup that was the point
syntax looks alright, but does the logic seem right?
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
like i already got a working version, but i would neeed to remove first 8 letters and get the next 5.
altrhough just wanted an opinion if my syntax or logic was wrong cuz it did not work
prolly cuz of the new update perhaps 🤷♂️
why is visible: false not working?
i got it, because i am using it in a button hover control
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
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 )
Do you mean switchzing between different menus?
{
"[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
Yes, in a similar way, I open the main menu (with a custom form), click on the button and switch to the profile and there is also a separate form there.
Hmm, how do I say this?
Do you want to open the second form, without using script api twice?
I saw a system that claimed to switch between user menus using the text §y§r at the beginning of the menu name. But the code above, as I understand it, should work something like this.
Yes. Try it, and tell me if that is what you aim for. It ables you to have vanilla form, and your custom ones.
You open each with different prefixes.
In my case, its @zelisce/chest_form or no prefix for vanilla
Yes, this is what I need. I'll try to create something tomorrow 🙂
Nice. Hit me up with any questions if you got any later on!
Thanks! I'll try not to lose you in the chat.
is it possible to rotate an image by 45 degrees?
afaik its not
so i have to rotate manually on the png file?
it is so crucial for some projects but sadly havent found any way to do so
yes
i hate json ui
Unless you tweak with animations but this is something I can explain, nor have time to try if it even works.
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 ^
but this doesnt change that it cant rotate by 45 deg
Via JSON UI no, but it is a way to do it with one image file.
my minimap is lacking that feature and i dont think i need an animation
So no. It is likely not possible to rotate it.
what if instead of rotating the whole map you rotate the player?
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)
?
just words?
yes
thanks btw
so this is a correct syntax?
"requires": "($left and not ($up or $down))",
yeah that would be (l && !(u || d))
thanks again
also you can just do "texture": "('textures/minimap/locator_' + $viewdirection)"
-# just to prevent using a lot of variables
damn
mhh but viewdirection has the color code to hide from the text
wont it create problems on the png file name?
nope
mhh ill try
just rename to locator_§u §d §l §r
i dont know why the game is crashing
is it too much a 700x700px image on a 7x7px space?
try making it smaller and see if it stops crashing. if it stops; too much.
json ui doesnt like big images but 700px by 700px doesnt seem too bad
how do you do this??
do you get the bloc color by script??
it seems i have had hit another dead end, is it possible to make an element take the size of a sibling label element?
n%sm
n is the percent
you are the GOAT
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
p
my eyes 🔥🔥
~ hidden said
"dont give part of the code if you want someone to helping resolved. "
|| joke ||
huh?
try
{
"binding_name": "#form_buttons_length",
"binding_name_override": "#maximum_grid_items",
"binding_condition": "once"
}
yes
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
did you use collection panel and collection indexes in each button?
How do I reverse the colors?
Is a collection panel a normal panel or stack
And is it because we can’t put collection_name in type: panel??
collection panel is collection panel
its a type
you put collection name in 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
Yeah I know but does it behave like a normal panel or stack??
Like panel.
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
Alguien sabe como hacer que una UI tenga barias texturas y sepuede canbiar de una a otra?
english please
I recommend looking at examples at: https://github.com/Mojang/bedrock-samples/blob/main/resource_pack/ui/
well i have
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
Does anyone know how to make a UI have multiple textures and switch between them dynamically?
its quite simple actually
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
yeah ive made button grids
i just found out that u can actually use #gamertag in hud screen
nvm xD
© 
Nothing haha. Sorry for the ping
How do I make an image semi-transparent and have an animation that starts from the center and covers the entire screen?
How can i start on custom ui forms? Like those Minigames Selectors in servers
server_form.json
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
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:
Does anyone know how to make a UI have multiple textures and switch between them dynamically?
Im sorry, It's not my choice :V
Okay
Its work, thank you so much. I've been in this problem for almost 2 days XD
You could make it so that the UI has its texture value controlled by a variable and then control that variable with require and the condition of the texture change.
hii
How many pixels is MinecraftTen height?
I know default one is 10px
nvm lol
https://github.com/Cermada/missing-bedrock-rp-files/blob/main/font/
maybe you can check it here?
It's hard to recognize sinze it's use ttf
nope? these are plain png's
example ^^
MinecraftTen
is it 12px i guess? 10px font + 2px padding
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
you gotta account for the padding no?
I think this size is accounting for padding. Like default font has height of 10px accounting for the padding
oh alright
MinecraftTen does feel a bit squished even in default size. I might also be wrong about the size :)
It's weird... If 10px/lines... Then why is it when i set the panel size to 190px.. it's only showing 16 lines, instead of 19 lines
I mentioned I might be wrong about it or it takes more space with new lines
I mean when i use default font it's all fine
Maybe because of padding??
It seems if you only have one line it has height of 10px. Each new line has height of 12px
So yeah because of padding
Ok i've tried many times, so each new line is not exactly 12px... It's goes from first line as 10px and second line 11px -> 11.3px -> 11.5px -> 11.7px and so on.. (Not really EACH new line tho)... They're just not equally padded
##WHY MOJANG
I don't think it matters that much
why do you need that information tho
wow
is that real time map or pre rendered map?
in real time rendering map
like you can go far away but still see areas that arent loaded
That's the addon if you want to try it https://www.curseforge.com/minecraft-bedrock/addons/explorers-world-map
Could someone help me?
cool
any info?
I need help on this
Is there a way to do it?
yeah
Do you know how? Could you please help me?
And when should it all happen?
when I type ts with the title command title
So title?
if when using /title @s title ts
sure
let me finish eating and will help zou then
Okay, but if I don't reply it's because I'll be busy soon.
Have you done any coding beforehand?
Well, if you're only referring to the UI, then I don't have anything there.
So what you need is to change the title a bit. Make it a panel with two children. One being the vanilla title and second one being the "animation"
And conditionally render both
https://wiki.bedrock.dev/json-ui/json-ui-intro#animations
here is a tutorial on how to create animations
if you manage to code something by yourself, good. if not i can help
Okay, I'll try it, but could you tell me exactly which folders I need?
resource_pack/ui/
Do you recommend that my file be in mcui or json format?
is there mcui format?
only json i think
I don't know, someone told me that yes
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.
hmm. you can use the same animation but you will have to create the element in the title anyways
To be honest, I understood almost nothing after reading it.
did you try coding at least?
practice helps a ton with json ui
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?
what bridge
V2
This xd
yeah i dont use that
