#JSON-UI General
1 messages · Page 37 of 1
can someone tell me how i open a custom ui
to make a UI for the hud_screen that will be changed/updated based on current events, i can do that using titles/chatmessages only right?
Cool af, and I'm extremely excited to see just how many more addons are made thanks to this tool.
🫡
this... will save me days of making UI's for my upcoming blocks and features in my exe addon
Glad to hear that
Yeah.
Is it possible to increase the chest layout?
for example, I want a double trunk
@oak verge
well, chatmessages will be a bad idea bec of the spam will happen and i dont think it is possible to make it not visible, so the only one i should use is the titles,,
Uhh you can.
yes, just take a look at the double chest UI size
It's very possible both in chat screen and in hud screen.
not with the current tool
like an invisible chatmessage?
sure, cuz i will make 2 separate addons ( a thirst addon - a temperature addon ) both of them will have their own UI so i need to make them work fine together,
// chat_screen.json
{
"messages_text": {
"type": "panel",
"size": [
"100%",
"100%cm"
],
"modifications": [
{
"array_name": "bindings",
"operation": "remove",
"where": {
"binding_name": "#chat_visible",
"binding_name_override": "#visible"
}
},
{
"array_name": "bindings",
"operation": "insert_front",
"value": [
{
"binding_type": "global",
"binding_name": "#chat_visible"
},
{
"binding_type": "global",
"binding_name": "#text"
},
{
"binding_type": "view",
"source_property_name": "(#chat_visible and not (('%.6s' * #text) = 'coddy.') and not (('%.5s' * #text) = 'bruh.'))",
"target_property_name": "#visible"
}
]
}
]
}
}```
I want to expand the entity's inventory, do you have any tools?
Hide the text if it starts with coddy. or bruh.
It also possible to hide the text if it includes a specific text.
but, will it show empty on the chat? ( like it has an empty bar showing up )
lemme finish first.
? @mental crystal
expanding entities inventory can be done by editing the vanilla entity codes, and then increase the entity inventory size and adjust it with UI.
check "im_the_real_king_of_clouds" chest addon
yes, I know, but I don't know how to adjust it with the json ui, if I increase the entity's inventory, it doesn't increase in the game
where?
thanks
this go without saying, but do get permission if you are planning to use it
Do you know how that icon works, when you put the mouse over it, text appears on the side?
// chat_screen.json
{
"messages_text": {
"modifications": [
{
"array_name": "bindings",
"operation": "remove",
"where": {
"binding_name": "#chat_visible",
"binding_name_override": "#visible"
}
},
{
"array_name": "bindings",
"operation": "insert_front",
"value": [
{
"binding_type": "global",
"binding_name": "#chat_visible"
},
{
"binding_type": "global",
"binding_name": "#text"
},
{
"binding_type": "view",
"source_property_name": "(§z + #text)",
"target_property_name": "#new_text"
}
{
"binding_type": "view",
"source_property_name": "(#chat_visible and (not ((#new_text - 'coddy.') = #new_text)))",
"target_property_name": "#visible"
}
]
}
]
}
}```
// hud_screen.json
```js
{
"chat_grid_item/chat_background": {
"bindings": [
{
"binding_type": "collection",
"binding_name": "#chat_text",
"binding_name_override": "#text",
"binding_collection_name": "chat_text_grid"
}
{
"binding_type": "view",
"source_property_name": "(§z + #text)",
"target_property_name": "#new_text"
}
{
"binding_type": "view",
"source_property_name": "((#text = '') or (not ((#new_text - 'coddy.') = #new_text)))",
"target_property_name": "#visible"
}
]
}
}```
It's like a non-clickable button, but it shows a message when you interact with it, or put the mouse over it.
Why me 😭
Try typing in chat the word coddy. it won't show up as long as that text includes there.
lol
Tooltip?
yess
y'know the basics of json ui? And also, usejs "<any name>.common.hover_text": { "property_bag": { "#hover_text": "TEST" } }
I don't know if I know the full basis, but I know how to use the json ui, I've already modified the form, so I would say yes.
just that?
Yeah, put it in the controls of your hover of your buttons, then add that in the controls of it.
If I want to use this, do I just need to set an offset to position and place it inside the controls of my custom form?
Or whatever.
ok
Put that in a panel first then put offset and put that hoeve text in the controls of it.
well, i have no idea how it works but i will figure it out later when i start working on the addons,
I have a problem with Progress Bar
The custom Progress Bar just wont appear
I followed the exact code fromhttps://www.youtube.com/watch?v=_J5Bi-krhw8
Code: https://github.com/LeGend077/json-ui-resources/blob/main/custom_progress_bar.json
Preserve Title Text: https://wiki.bedrock.dev/json-ui/preserve-title-texts.html
Music:
Sweden, Minecraft - C418
#minecraftbedrock
Fixed it
how would I make an image that covers the entire screen
Does someone know why this doesn't work?```json
{
"paperdoll": {
"type": "custom",
"renderer": "live_horse_renderer",
"property_bag": {
"#entity_id": "#entity_id"
},
"anchor_from": "center",
"anchor_to": "center",
"size": [ "50%", "50%" ],
"offset": [ 0, -10 ],
"bindings": [
{
"binding_type": "collection_details",
"binding_collection_name": "form_buttons"
},
{
"binding_name": "#form_button_text",
"binding_collection_name": "form_buttons",
"binding_type": "collection"
},
{
"binding_type": "view",
"source_property_name": "(#form_button_text - '.paperdoll')",
"target_property_name": "#entity_id"
},
{
"binding_type": "view",
"source_property_name": "(not ((#form_button_text - '.paperdoll') = #form_button_text))",
"target_property_name": "#visible"
}
]
}
}
I'm doing form.button(entity.id + '.paperdoll') from the script
For some reason it only does work when I only pass the entity id without .paperdoll as the button text and replace (#form_button_text - '.paperdoll') to just #form_button_text
Probably because it treats it as a string instead of numbers that paperdoll requires?
not so sure about that you can maybe try to multiply it by 1
you need to pass the Entity ID directly, since #entity_id needs to be an string
So it's the other way around that I said?
Ohh so he should do §z thingy then.
aww :(
you can use #form_button_texture for that lol
Ohh btw, I used grids in 1.21.70 and it's broken asf
and I just discovered that divider is counted as buttons too
bro, mojang uses the same #form_button_text binding for that ☠️
"mojang doing hacky things" lol
at least I think it will help in terms of performance
BRUHH? Aww man lmfao
I love how they still updated json ui when in future they're gonna use ORE UI
Especially the hud screen locator bar
json ui 🔛🔝
Ngl it kinda a look goofy when I tried it.
renderer ☠️
About renderer, is there a way to display cursor in camera mode?
Since if I activate 2 the original cursor is invisible
I mean when you're in /camera the cursor isn't visisble.
well, the cursor is also a renderer
So I don't think it's possible, maybe it would be best to create another cursor using titles
sigh chat screen, here I come
Can I get this UI?
no sorry
entity.id is a string
Never thought of that
I did work, thanks
how do i make a custom ui visible on screen
How do i make a slot like where i cant place items
wdym? Like can't place by hand but still placable using commands or scripts?
yep
a slot where you cannot put items by hand.
Hotbars?
just wanna clarify you wanna be able to hold the items tho you can't put items in the hotbar if the inventory is opened?
ahh just edit the hotbar grid of the inventory screen.
I actually forgot how to remove the rest but this one removes one slot of hotbar in the inventory from the right.
// inventory_screen_pocket.json
"hotbar_panel/hotbar_grid": {
"size": [ 224, 28 ],
"grid_dimensions": [ 8, 1 ]
}```
// ui_common.json
```js
"hotbar_grid_template": {
"size": [ 144, 18 ],
"offset": [ -9, -5 ],
"grid_dimensions": [ 8, 1 ]
}```
just experiment a bit.
ohh I remember now, so for the inventory screen pocket, the default grid is 9, 1 and size of 252, 28, just decrease 1 in grid and 24 in size. Per slot.
For the ui common the default size is 162, 18 and for grid dimension it's 9, 1 same case just subtract 1 in dimension and subtract 18 in size. Per slot.
i was trying to make a simple panel like the effects screen, but dont know how to enable/make it visible on screen. Can someone help? Code:
"namespace": "test",
//---------------------------
// Controls
//---------------------------
"test_background": {
"type": "image",
"size": 10,
"anchor_from": "top_left",
"anchor_to": "top_left",
"offset": [ 4, 4 ],
"texture": "textures/ui/mob_effect_background"
},
//---------------------------
// CONTENT
//---------------------------
"test_content": {
"type": "panel",
"controls": [
{ "[email protected]_background": {} }
]
},
//---------------------------
// Screen
//---------------------------
"main_screen": {
"type": "panel",
"controls": [
{ "[email protected]_content": {} }
]
},
"[email protected]_screen": {
"close_on_player_hurt": true,
"$screen_content": "test.main_screen",
"$screen_bg_content": "common.screen_background",
"$screen_background_alpha": 0.4
}
}```
On the container slot, add "enabled": false. Although it doesn't work if player shift-click the item..
Custom screens is not allowed.
You are only able to build onto the already existing screens.
so replacing the previous code like this should work, right?
"namespace": "test",
"hud_square": {
"type": "image",
"texture": "textures/ui/Black", // vanilla texture
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"size": [ 64, 64 ],
"offset": [ 0, 4 ]
},
"hud_text": {
"type": "label",
"text": "hud text",
"anchor_from": "top_right",
"anchor_to": "top_right",
"offset": [ -4, 4 ]
},
"root_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": [
{ "[email protected]_square": {} },
{ "[email protected]_text": {} }
]
}
]
},
}```
and adding a texture called Black
No remove the namespace since you are modifying an already existing screen.
ok
do i have to remove the outer pair of curly brackets too
?
i still have to put it in _ui_defs.json ,right?
@sick shell
if it is not a vanilla name file, yes
the file is named test.json
i think
how do i activate/display it on screen though
Why does this not work? "size": [ "100%", "100% - 100%sm" ],
Wait, wrong line
Now its correct
The element just dissapears
I'm using minato's chest editor UI
since I know nothing about JSON UI 
And I just want to make a slot where I can't put anything

Ohh
Thanks!!!!!!
It's a crafting result slot
I shouldn't be able to place items there
but you can shift click item there
So be careful
Anybody?
heyyyyy
i cant take thee item from the slot
since its a crafting result slot, i should be only not able to place items
it is indeed not interactable
cant even take the item from the crafting result slot
lets start making my hydration addon UI,
this is necessary right? 
"thirst_renderer":{
"type":"custom",
"size":[1,1],
"renderer":"thirst_renderer",
"layer":1,
"bindings":[{"binding_name":"#show_survival_ui","binding_name_override":"#visible"}]
},```
{ trying to make the thirst bar render like the vanilla hunger bar }
This UI is getting too complex 😭
So im trying to basically do what was done before with Text-sidebar_0 (and 1, 2, etc...)
Where a variable is detected "Text-hotbar" and the title is shown exactly in the position of where the hunger bar would be (hunger bar removed)
I tried duplicating it and replicating the workflow but I can't get it to work, it just makes the entire UI break and become invisible.
Thirst renderer? That doesn't exist tho
( new UI element for the hud screen )
huh? Never seen that even in preview.
nanana its a custom UI
hello, is there a way to center elements in a scrolling panel ?
here is my code :
"buttons_grid": {
"type": "stack_panel",
"size": [400, 130],
"orientation": "horizontal",
"anchor_to": "center",
"anchor_from": "center",
"controls": [
{
"[email protected]_panel": {
"$show_background": true,
"size": ["100%", "100%"],
"$scrolling_content": "selector.bt_panel",
"$scroll_size": [5, "100%"],
"$scrolling_pane_size": ["100%", "100%"],
"$scrolling_pane_offset": [0, 0],
"$scroll_bar_right_padding_size": [0, 0]
}
}
]
}
its nothing about the vanilla minecraft UI things, its for my thirst addon ( i will call it "MMMM WORTOR" )
Try centering the contents of the scrolling panel not the scrolling panel itself.
Ohh then it's not a valid renderer
It's not as simple as 123
i know, json-UI is more complicated than the math class
Nahh I find it interesting and somewhat "easy"
anyways,
this is a valid texture UI element, thing
"thirst_image":{
"type":"image",
"texture":"textures/ui/thirst_background",
"size":[9,9],
"layer":1,
"alpha":0.65
},```right?
Yes.
alright, next: making the UI element appear only on survival and the offset will be changed depending on the game UI ( pocket/desktop )
Use the centered gui pocket and centered gui panel to put your thirst bar
overall, this shit will not work at all right?
{
"namespace":"hud",
"thirst_renderer":{
"type":"custom",
"size":[1,1],
"renderer":"thirst_renderer",
"layer":1,
"bindings":[{"binding_name":"#show_survival_ui","binding_name_override":"#visible"}]
},
"thirst_image":{
"type":"image",
"texture":"textures/ui/thirst_background",
"size":[9,9],
"layer":1,
"alpha":0.65
},
"centered_gui_elements_at_bottom_middle":{
"type":"panel",
"anchor_from":"bottom_middle",
"anchor_to":"bottom_middle",
"size":[ 180,50 ],
"controls":[
{
"thirst_rend@thirst_renderer":{
"offset":[ -1,-40 ],
"anchor_from":"bottom_left",
"anchor_to":"bottom_left"
}
}
],
"bindings":[
{
"binding_name":"#hud_visible_centered",
"binding_name_override":"#visible",
"binding_type":"global"
}
]
},
"centered_gui_elements_at_bottom_middle_touch":{
"type":"panel",
"anchor_from":"bottom_middle",
"anchor_to":"bottom_middle",
"size":[ 200,50 ],
"controls":[
{
"thirst_rend@thirst_renderer":{
"offset":[ -1,-40 ],
"anchor_from":"bottom_left",
"anchor_to":"bottom_left"
}
}
],
"bindings":[
{
"binding_name":"#hud_visible_centered_touch",
"binding_name_override":"#visible",
"binding_type":"global"
}
]
},
"not_centered_gui_elements":{
"type":"panel",
"controls":[
{
"thirst_rend@thirst_renderer":{
"offset":[ 2,2 ],
"anchor_from":"top_left",
"anchor_to":"top_left"
}
}
],
"bindings":[
{
"binding_name":"#hud_visible_not_centered",
"binding_name_override":"#visible",
"binding_type":"global"
}
]
}
}```
Don't do that use modifications
it doesn't work
"buttons_panel": {
"type": "panel",
"size": [
"100%",
"100%c"
],
"anchor_to": "center",
"anchor_from": "center",
"controls": [
{
"buttons_grid": {
"type": "grid",
"grid_item_template": "server_selector_form.custom_button_panel",
"grid_fill_direction":"horizontal",
"grid_rescaling_type":"horizontal",
"size": [
"100%",
"100%c"
],
"anchor_to": "center",
"anchor_from": "center",
"factory": {
"name": "buttons",
"control_name": "server_selector_form.custom_button_panel"
},
"collection_name": "form_buttons",
"bindings": [
{
"binding_name": "#form_button_length",
"binding_name_override": "#maximum_grid_items"
}
]
}
}
]
}
sorry for flooding
"centered_gui_elements_at_middle_touch": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_back",
"value": [
{
"[email protected]_renderer": {}
}
]
}
}
}```
@untold dawn
so this thing will make the thirst bar thing appear on the player hud screen right?
can someone tell me how to make a custom ui appear on the screen please?
did you read the documentation btw? I can't help you rn
sure'nt
Totally custom UI isn't possible you need to use any existing ui and us ethat as parents of your UI
overall, should i remove this thing from it?
"type":"custom",
"size":[1,1],
"renderer":"thirst_renderer",
"layer":1,
"bindings":[{"binding_name":"#show_survival_ui","binding_name_override":"#visible"}]
},```
or adjust it a little bit,
Yes because it's not valid at all.
my code looks like that :P
"hud_square": {
"type": "image",
"texture": "textures/ui/Black", // vanilla texture
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"size": [ 64, 64 ],
"offset": [ 0, 4 ]
},
"hud_text": {
"type": "label",
"text": "hud text",
"anchor_from": "top_right",
"anchor_to": "top_right",
"offset": [ -4, 4 ]
},
"root_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_front",
"value": [
{ "[email protected]_square": {} },
{ "[email protected]_text": {} }
]
}
]
}
}```
i should make a new panel in order to make it works ig ( negative UI skills )
basically the example inside the documentation
Yeah
are you sure you put it in hud_screen.json??
That works for me tho.
uh i had to name the file like that?
Yeahhh
uh, this is fine or fucked up?
{
"namespace": "hud",
"thirst_renderer": {
"type": "panel",
"size": [1,1],
"layer": 1,
"bindings": [
{
"binding_name": "#show_survival_ui",
"binding_name_override": "#visible"
}
]
},
"thirst_image": {
"type": "image",
"texture": "textures/ui/thirst_background",
"size": [
9,
9
],
"layer": 1,
"alpha": 0.65
},
"centered_gui_elements_at_middle_touch": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_back",
"value": [
{
"[email protected]_renderer": {}
}
]
}
]
}
}```
"$custom_size": [
440,
135
],
"variables": [
{
"requires": "(#form_text = 1)",
"$custom_size": [110, 135]
},
{
"requires": "(#form_text = 2)",
"$custom_size": [220, 135]
},
{
"requires": "(#form_text = 3)",
"$custom_size": [330, 135]
},
{
"requires": "(#form_text = 4)",
"$custom_size": [440, 135]
}
]
how can i modify custom size value depending on the form text value (it doesn't work for the moment)
even with "1" in the form body, the custom size remains the same
Don't use numbers, try a text
It's kinda hard to del with nunber
Also you can't use binding in variables
Umm, put the thirst image in the controls of the third renderer also make the size of renderer to 100%, 100%
oh.. my idea was to reduce the size of the scrolling panel so that the elements would be centered
is there an alternative to center the elements within the scrolling panel ? the anchors don't work
(my "code")
like so?
"thirst_renderer": {
"type": "panel",
"size": ["100%","100%"],
"layer": 1,
"controls": [
{
"[email protected]_image": {}
}
],
"bindings": [
{
"binding_name": "#show_survival_ui",
"binding_name_override": "#visible"
}
]
},```
i think i need this as well "[email protected]_screen"
in the hud screen,
Uhh, no.
i know tho
#1350977369137221694 
How can I make it so the second child element from an stack panel adjusts its size depending on how big the first element is?
The stack panel has a static size but the first child element depends on its content
I want the second child element to have a different size depending on that
But 100% - 100%sm doesn't work
Try "fill"
Quick Question, how would i check the value of a #text field and if its one value, lets say 50 i display "Yes" and if its 100 i display "No"
is it possible to get rid of the space in chat im trying to make a dynamic chat rank system but im not good at json ui
anyone know how to reduce a lag in serverform?
because I have plenty server form ui and component inside
It did work, thanks
I'm not too good at bindings, so what I would do is creating 2 labels and only display one under certain conditions
Like (#text = '50')
whats the ui file name of common_buttons ?
ui_template_buttons.json
Does anybody know how to fix it when a button that is supposed to not be visible in a grid is still pushing the other buttons?
It doesn't happen with stack panel
Grid strictly follows grid_dimensions, they don't work like stack panels.
is it possible to change the offset of the "X" or exit button on a small chest? in the image i want to lower the button down to the corner or smth
Then I'll have to use an alternative for making the buttons dissapear
Like making them have 2 controls and only the one with size 0, 0 will be visible
hide the original close button and use common.close_button instead
"$show_close_button": false
do you perhaps have an example?
(Didn't work)
fixed it, Thanks!
I know of a method 🤷🏼
Please enlighten me with your wisdom
Take your time
I think that's because small_chest_panel does not exist in that file
you cannot. everything gets loaded even if it's not visible
yikes
well, efficiency is the key
it freezes the game for about milliseconds
I don't wanna be that person but.
im not begging for help or forcing everybody to help me,
its just a self promotion
yeah totally right as you just did crossposting on #add-ons and deleted the message afterward.
at least i didn't keep it there
just little reminder that if nobody able to help, you'll have to figure it yourself
not just doing that
in that case, where can i learn json-ui? i cant find anything useful on the docs,
that's a good question — You don't.
try/failed?
it's not documented officially, even mojang themselves don't want anyone to do anything with it
they don't really support people doing json-ui stuff
last time i did that the game crashed 9 times
i see,
you can
theres another method of rendering forms 1 at a time so the ones in the background arent loaded at all
what's that?
how could i add that
why is this happening? the image size is not correct for some reason
its fine with the tb:20.0, but anything below 20.0 will make it large
maybe some binding and size issue
I'll try to fix it,
are you trying to create thirst icon bar?
ye
if so, i have a template for you: https://github.com/LeGend077/json-ui-examples/blob/main/custom_heart_or_hunger_like_progress_bar_icons.json
its a progress bar,
you use the template to create similar progress bar, justchange update string variable and texture path
which i already did, and it has that issue
then it should not have any problem. ig you messed up some other stuff
maybe check your panels and image sizes and your bindings if they're working correctly
check it out:
"custom_progress_bar": {
"$update_string": "tb:",
"type": "image",
"texture": "textures/ui/thirst_background",
"size": ["11.75%","11.75%"],
"anchor_from":"center",
"anchor_to":"center",
"offset":[59.5,105],
"controls": [
{
"progress": {
"type": "image",
"texture": "textures/ui/thirst_bar",
"size": ["100%","100%"],
"layer": 1,
"$one": 1,
"$max_health": 20.0,
"clip_direction": "right",
"clip_pixelperfect": false,
"bindings": [
{
"binding_type": "view",
"source_control_name": "data_control",
"source_property_name": "((#preserved_text - $update_string) * $one)",
"target_property_name": "#health"
},
{
"binding_type": "view",
"source_property_name": "(($max_health - #health) / $max_health)",
"target_property_name": "#clip_ratio"
}
],```
change 1 to 1.0 in $one
and you should use pixels instead of percentages for the bar
same issue
"100%p"?
what's your textures look like?
this,
it's a full texture?
yes
uhm I don't recommend using clip ratio for 'icon bars'
I highly recommend usniig this
its more like a line, not icon bars
afaik that what the clip ratio uses
the texture looks like this, its a line of bars,
since its just the same texture repeated, you can just use one texture for empty, half and full to create a stack of 10 icons controlled by bindings.
If you only want to use clip ratio then check your data control and bindings. also you can do tb:20, tb:19 etc, instead of tb:19.0
well i think clip ratio is easier to deal with so I'll try to fix it ig
hm okayy just make sure you don't pass on floats (tb:19.0, tb:20.0) because floats are weird in json ui
well i tried changing the "$max_health": 20.0, from 20.0 to 20 only and it broke
so i have to use 20.0 for it to work, ig
I mean for the title, not the variables
should i use words only?
this -> tb:20 instead of tb:20.0
without the : or something?
.
the same issue,
weird. try setting proper size of the bar in pixels instead of percentage
like so ig "size": ["100%px","100%px"],
No.. the size of your image, for example"size": [20, 100]
ah,
same issue
well I can't really tell because I cannot test it rn. If you send the code maybe I can check it
hmmm everything is fine
then, why it doesn't work properly
you are doing tb:19 instead of tb:19.0 right?
both has the same issue
ah try setting the absolute size on both the full and empty bar
im guessing that % is messing up your texture size
lets see,
well, I changed the background size from % to 100,100 and removed the size from the bar image
still, the same issue
what does it look like ?
the same bugged thing
why are you setting size 100, 100 if your image's size is 125, 14
just for testing, ig
that is why it's stretched and not correct...
so i should use "size": [125,14], for the background and "size": ["100%","100%"], for the bar?
yeah
it, was the issue
yeah i knew it lmao, just tweak it's size a bit to get it correct now ig
i see how it works now,
i will change the thirst bar texture anyway
from - to
ty for helping, i appreciate it
Nice, no prob
hmm,
where should i use this variable "requires":"($desktop_screen)" to make the image showing only on desktop screen? ( classic/pocket )
inside of the "root_panel"?
guys what problem ?
u have to import the ActionFormData
import {ActionFormData} from '@minecraft/server-ui';
[Scripting][error]-TypeError: cannot read property 'subscribe' of undefined at initialize (main.js:13)
at <anonymous> (main.js:187)
Even when I use the compass the form doesn't work.
well, u better go to #1067535608660107284 and ask there bec this is a script issue
put in the panel and add the "ignored": "(not $desktop_screen)"
in the root panel? or in the image panel thing?
Your panel only.
so i have to make a new panel that will have a controls of the image,
alright let's try that

uh
tt = double test
"tt": {
"type":"panel",
"ignored":"($desktop_screen)",
"controls":[{"custom_progress_bar@custom_progress_bar":{}}]
},```
Remove not...
the UI is no longer visible on both desktop and pocket
then I dunno what's the problem it always works fine with me.
try with "ignored": "$pocket_screen"
the "custom_progress_bar" is an image, not a panel so i have to make a new panel in order to use the ignore thing right?
you can use ignore on anything
with that being said,
this should work right?
"custom_progress_bar": {
"$update_string": "tb:",
"type": "image",
"texture": "textures/ui/thirst_background",
"size": [79,9],
"anchor_from":"bottom_middle",
"anchor_to":"bottom_middle",
"offset":[59.5,-42.5],
"ignored":"($pocket_screen)",←```
yes
lets see,
i used that in a binding wohoo
uh, the image is still visible in both desktop and pocket
should i use bindings?
remove ()
still visible on both,
hmmm
how about with bindings?
Send the binding
"bindings": [{"binding_name": "#show_survival_ui","binding_name_override": "#visible"}],
this thing make it visible only in survival mode,
which is needed in my addon,
use #hud_visible_not_centered
Can't you just put that in modifications of the centered gui touch and not not centered gui?
edit it ig,
i prefer making the anchor and the offset separated
uh, this should work
"tt": {
"type": "panel",
"$ignore_desktop": true,
"$ignore_pocket": false,
"variables": [
{
"requires": "$desktop_screen",
"$ignore_desktop": false,
"$ignore_pocket": true
}
],
"controls": [
{
"desktop_hud@custom_progress_bar": {
"ignored": "$ignore_desktop",
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"offset": [59.5,-42.5]
}
},
{
"pocket_hud@custom_progress_bar": {
"ignored": "$ignore_pocket",
"anchor_from": "top_left",
"anchor_to": "top_left"
}
}
]
},```
yes it works!
but each time u change it from pocket to desktop or from desktop to pocket it will not be changed instantly, u have to reload the world in order to get the right offset.
Thats why bakedpotato said to use a binding
its not a big issue tbh
like who will change the screen display from desktop to pocket ingame?
anyways,
how am i going to change the offset of the oxygen bar? without adding the full vanilla code*
What are you doing is scuffed there is a better way of doing that.
at least it works ig,
anyways,
"centered_gui_elements_at_bottom_middle/bubble_rend_<0/1>": {
"offset": [ 180, -50 ]
}```
or middle_touch
so i dont really have to write the full code
Yeah. Writing full code makes it incompatible with others
that's why modifications exists.
"centered_gui_elements_at_bottom_middle/centered_gui_elements_at_bottom_middle_touch/bubble_rend_<0/1>": {
"offset": [ 180, -50 ]
}```should work?
No.
change <0/1> with actual number to 0 or 1
my brain went off for a bit,
"centered_gui_elements_at_bottom_middle/bubble_rend_0/bubble_rend_1": {"offset": [ 180, -50 ]}?
No.
ya i see how it works now,
This one shows in full code to be
"centered...": {
"controls": [
{
"bubble_rend_0": {
"controls": [
{
"bubble_rend_1": {}
}
]
}
}
]
}```
I made the thirst bar background as small as this.
nvm*
mhm
why the right label not showed?, but the icon/image showed, how to fix this?,
is that my toggle night vision pack 😲
solved
how am i going to add 2 different titles there?
"((#text - 'tb:') = #text)",
it should hide both tb: and ob: so how am i going to add the ob: one?
extend the minus
uh, how exactly?
how am i going to add 2 different titles there?
"((#text - 'tb:' - 'ob:') = #text)",
it should hide both tb: and ob: so how am i going to add the ob: one?
lets try it,
it works, now one final step to finish,
which is in here #1351896422370508930 ( not self promotion or forcing anybody for help )
How to hide buttons in a grid?
I tried just making them not visible but they still keep pushing the other buttons
I also tried setting a dynamic size but it didn't work either
This is what I have rn
Afaik, you can't
Use otger types of panels
But then it would just put the buttons in a single row
Use multiple
I guess
I think I got a workaround for it
I just added more buttons at the start so it has an entire empty row
And then reduced the grid size by the button's height
Actually it required double the button's height for some reason
the issue is inside of this section
"bindings": [
{
"binding_type": "view",
"source_control_name": "data_control",
"source_property_name": "((#preserved_text - $update_string) * $one)",
"target_property_name": "#health"
},
{
"binding_type": "view",
"source_property_name": "(($max_health - #health) / $max_health)",
"target_property_name": "#clip_ratio"
}
],
"controls": [
{
"data_control": {
"type": "panel",
"size": [0, 0],
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string = #preserved_text) and not ((#hud_title_text_string - $update_string) = #hud_title_text_string))",
"target_property_name": "#visible"```
it should detect numbers in the title tb:0.0/1.0/2.0 etc, but when i try to type a number without the tb: it will fill up the thirst bar
i forgot this
"$update_string": "tb:",
is it possible to get the current size of the element?
uhm no unless you're using #size_binding_x/y binding
Don't those bindings only control the size?
how can i delete the player list part
and what is the png of the background and button of the forms
?
{
"namespace": "pause",
"info_panel": {
"ignored": true
}
}
"namespace": "pause",
"info_panel": {
"ignored": true
},
alr did
pause_screen.json??
you put in that exact file name?
yh
then I dunno, it works with me.
if there is the wisteria title its the right file
@mental crystal for this?
Is there anyone who knows a way I can test the resource pack without having to re-enter and exit the world every time?
nicee thx {::::
- does not work on preview for now, just a heads-up.
.80?
Hello everyone, is there anyone offering a custom UI design service for a set price? If you're interested, please send me samples of your previous work and your pricing in private messages.
Like that
Can I have a list of json label font type? and also is MinecraftFive a font type? I cant see it working.
MinecraftFive isn't a font type, only MInecraftTen
@mental crystal i need ur help here #1351975164929249322
default
rune
unicode
smooth
MinecraftTen
or MinecraftSeven
but thats just default i think
how to make the color symbol work for bindings?
hehehe memory leak with bindings go brrrr
what
Yo did u use my thing
nah its mine now
Just accidentally caused a memory leak with bindings somehow.
performance gets absolutely eradicated and chunk loads very slow too
no idea how did i do it but yeah
bindings does indeed can cause memory leak
this
"thirstbar_effect_background": {
"$update_string": "xHydTB:",
"$update_text": "xEhydTB:",
"type": "image",
"texture": "textures/ui/thirst_background_effect",
"size": [79, 9],
"bindings": [
{"binding_name": "#show_survival_ui"},
{
"binding_type": "view",
"source_control_name": "thirstbar_effect_control",
"source_property_name": "(#preserved_text - $update_text)",
"target_property_name": "#visible"
},
{
"binding_type": "view",
"source_property_name": "(#show_survival_ui and #is_visible)",
"target_property_name": "#visible"
}
],
"controls": [
{"thirstbar_effect_progress@thirstbar_effect_progress": {}},
{
"thirstbar_effect_control": {
"type": "panel",
"size": [0, 0],
"bindings": [
{"binding_name": "#hud_title_text_string"},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not ('@' + #hud_title_text_string = '@' + #preserved_text) and not (('@' + #hud_title_text_string - $update_text) = '@' + #hud_title_text_string))",
"target_property_name": "#visible"
}
]
}
}
]
},```is showing and hiding, but when i hide it, it will no longer visible again
@normal moat heres the code u asked for.
I have no idea ngl
i will be working on the system of the thirst while waiting for someone to fix it
@placid geode look, maybe this could be the issue of the forms that sometimes they doesn’t render on low and mid end devices
That happens?
lol yeah.
Oh wow
Guys, does anyone know how to hide the message that a player entered the world and left, via json UI?
multiplayer.player.joined=§c
multiplayer.player.left=§c
I want to hide the black background of the players message when they enter and exit the world
You could just have JSON UI Detect the text and not pass it to the UI
"chat_grid_item/chat_background": {
"bindings": [
{
"binding_type": "view",
"source_property_name": "(('§␛' + #text + '§r') - ('§␛' + $notification_flag_0e34fd) = ('§␛' + #text + '§r'))",
"target_property_name": "#visible"
}
]
}```
Where can I find documentation on the dialogue json?
;^; potato 🥔
hey i have some questions
is there a way to set a stack panel to go from bottom -> top
instead of its default going from top -> bottom
I don't think so, I've never tried to do that
that kinda screws my java chat thing up
because then on update my messages get pushed up
no, It worked
anchor it to the top it will be expanding down, anchor it to bottom it will be expanding up
anyone know why the hp text wont update?
source_control_name to data_control not progress/data_control
also add resolve_sibling_scope if thats needed
i found a button mapping somewhere where it uses tab key to toggle the button. my problem is it doesnt work well with toggle view binding. how can i make this work?
"$toggle_view_binding_name": "toggle",
"$button_mappings": [
{
"from_button_id": "button.scoreboard",
"to_button_id": "button.menu_select",
"mapping_type": "global"
}
],
"size": [20,20]
},
Is there a way to conditionally display a ✓ if the #form_button_text is equal to a certain value?? I'm using HeroBrians & LeGend's chest UI and i want to show a ✓ if the stack size = 64 and not the number 64
Is it possible to remove the @ in the chat when tagging a player? I want to remove the @
does anyone have a simple pack that adds a custom form i can look at?
yeh a couple at https://skyls.de/samples
A Personal Code Sharing Website With Various Tutorials For Minecraft Bedrock JSON UI, Scripting API And More!
of my extension xd? I would have to look into their api
yeah if you're working with Ace editor before, i think this might be feasible.
Acode uses ace editor and slams a big plugins support for it, kinda like VScode.
Anyone know how to convert an int value to a float?
I'm trying to mult a number by 1.5 but its flooring the multiplicative before
i.e 85 * 1.5 = 85
I don't think there is?
so not possible?
Is someone know what button is this? I need the pressed button name
You might need to divide it with something
use a variable with your float value
"$float": 1.5,
85 * $float
button.gathering
Thank you🙏
how can i change the texture of an inventory slot in a ui
ive been desperately searching for like 3 days but i geniunely cant find anything 😭
its probably really simple but im failing miserably so end my suffering
i tried overlaying it with an image panel but it didnt render
1 specific one
for a custom inventory
im not trying to change the texture of every slot i just want a slot of a different color for my particular ui
this was added on preview, not used tho?
No way they added #is_spectator_mode binding
is there a way to get a MalformedResponse from a modal in the "@minecraft/server-ui" 2.0.0 beta?
in the past i used to add a normal button in the modal to get that response
but they remove it
Yes
Is it possible to rotate an element with animations?
I don’t think it’s possible to rotate an element at all(?) if it is someone pls fact check me
Wait actually no, it must be, the yellow splash text rotates
How?
I tried with normal buttons but didn’t worked
Still I found out another better way to do what I was trying to achieve with this
No.
Splash text is a renderer.
though making text rotated is kinda possible back then but now it's just no.
they removed or make it unfunctional at some point.
Is it possible to create a sort of custom autocorrect for the chat menu?
"show_hair_option_anim": {
"anim_type": "offset",
"from": [0, 0],
"to": ["-5%", "18%"],
"easing": "in_quart",
"duration": 0.25
}
I have three animations, and they are the same, they move the item down with the next item, is it possible to make the “from” of the animation take the current position of the item?
if I click on “Eye” now, it pulls from its initial position, and it should pull from the position it is in now
how does one use clip ratio?
i'm having issues with it where it just doesn't do anything, i've changed it so many times 😭
clip_ratio only accepts floats between 0-1
and they are somehow inverted
it makes sense cus 1 represents fully clipped/cut
with some malfomed bindings
this malformed response is caused by search bar in the GrimUI which requires you to manually catch (malformed for forms, but still valid) packets with custom server software in order to retrieve its value
help??
are these buttons
they re all buttons:
- Cabelo
- Olho
- Tom de Pele
and i want:
- Offset Animation start from the current item position
Anyone know what's this panel or control name? The exit game confirmation
popup_dialog.json
it is used for server forms too and some other places, so keep that in mind
Oh okay, thanks🙏
Does json UI support conditional text replacement?
yeah
Does this work for chat
-# he is referring to the input section
hmm.. input section, generally- no.
text replacement is possible but not conditional
Damnit
I wanted to create resource sided shorthands for some commands
Like /gms would translate to /gamemode survival
Is there no way to do it, for example a custom localized lang file?
No, i guess. but you can create something like a button that inserts text into chat input box.
So what im seeing here is there is no way to read player chat input via only resources?
Yeah, afaik.
you can use bps and scripts, that would be easy if you can
I know but then I wouldn't be able to use it in the pack I'm making
I mean, you can read the input but making it conditional and modifying is a bit hard and limited
Output in input to an unused binding and compare that?
you can try different stuff, i don't really know what would be the outcome
Appreciate the info regardless
Tbh, I dunno how to read but to forcefully put values in chat is what I know lol
Yeah the read part was the important part tho
Is there no element in the chat window that holds player input?
Like surely the UI must reference it somewhere
basically, every textbox has a binding called #item_name (property_field) which returns the current text inside it
Could I not compare #item_name to a value then?
you can.. thats how search bars work
Then return a different value from the factory if both match?
Putting a value after comparing it is what I have no idea about.
All I should need then is the method to forcefully put stuff in the chat
@mental crystal
You said you knew this part right?
It seems like all the components are here
if I can still find the file.
In theory this could work no?
So it's a bit janky, so when I was trying to plan making the clickable chat text and it work, I cna display texts when hovered, for the chat, I made a new element, a chat panel, since in chat theres a property bag where its where the valeus are put in the chatbox.
So we can read chat is what you're saying?? (IDC if it's a little scuffed as long as it works)
Read and write
That's what we need
so.
IF #item_name = value then
Factory: value to #item_name
End
I'm para coding to make sure I understand the logic.
Hello, I need help with bindings - I have couple custom json ui's form server forms. Like here:
"binding_type": "view",
"source_property_name": "(#title_text = '§l§uMenu Timer')",
"target_property_name": "#visible"
}
But I would like make that if there is no custom title - it will display default server form. Is there any way to achieve that?
to not have any confusions, "#property_field" is the actual name for it, it is set to #item_name in ui_common file so we just use #item_name instead of #property_field
That makes a lot of sense
I just need help to test the concept as I can't currently get MC on the device I'm on
That and I'm extremely rusty
add bindings to the vanilla one. (example: (not (#title_text = '§l§uMenu Timer')))
cause couldn't something like this be useful to developers of those techy resources packs?
You'd essentially have custom /commands for ui
Thanks! it worked!
And if I would like to add multiple bindings, so like this: "(not (#title_text = '§l§uMenu Timer') and (not (#title_text = '§l§uTimer')"
speaking of custom commands....
and what's the purpose?
Shorthands for commonly used commands
This is gonna be a global resource pack usable anywhere
eh?? what's the purpose of commands if the commands can't run anything?
It's resource packs what'd I expect?
instead of /gamemode C just type /gmc
It'll autocorrect itself to the right command and save time in the long run
Soo just like tab?
A bit like tab but for many different commands
there's a reason some servers do the same with plugins
It's convenient
Plus I could also use these commands to bring up different UIs if that's ever needed
/compass could render a compass on the hud
I just like the idea of being able toggle stuff in chat
That's if it works tho
And I haven't got the tools to code or test it atm
"source_property_name": "(not (#title_text = 'menu1')) and (not (#title_text = 'menu2')) and (not (#title_text = 'menu3')) and (not (#title_text = '§l§uMenu Timer'))",
It's not working. It's only shows properly the first menu ('§l§uMenu Timer'), but if I click another button in form which should go to menu2, the menu2 form is broken like both custom and default form are layered
add one ( at the beginning
that one kinda possible i think
just bind the thing to the command error that going to show up
Okay, it worked after I added () for all string
Thanks!
anyone??
not possible
nah. only global_variables.
Is this still workable tho?
no.
How do I remove the inventory name?
So my idea isn't possible
most probably, not possible.
find it, remove it. "inventory_label": { "ignored": true }
or just use § in naming the entity
This is not in the code, where can I put it?
so when like the buttons are pressed, they play offset animation?
try using image ig
nvm, i already found a way, thxx
But now I have another problem: why does the animation run only once and when I click on the button again nothing happens?
the anim has to be reset
how??
"show_hair_options": { // Show the Options like: Modelo and Cor
"anim_type": "size",
"from": ["100%", "15%"],
"to": ["100%", "36%"],
"easing": "in_quart",
"duration": 1.5,
"play_event": "button.show_hair_button",
"end_event": "button.hide_hair_button"
},
"hide_hair_options": { // Hide these options
"anim_type": "size",
"from": ["100%", "36%"],
"to": ["100%", "15%"],
"easing": "in_quart",
"duration": 1.5,
"play_event": "button.hide_hair_button",
"end_event": "button.show_hair_button"
},
"hair_hide_button": { // I have 2 buttons in my panel, one will hide when the other one is shown
"anim_type": "offset",
"from": ["1000%", "0%"],
"to": ["0%", "0%"],
"easing": "in_quart",
"duration": 0.1,
"play_event": "button.show_hair_button",
"end_event": "button.hide_hair_button"
},
"hair_show_button": { // I have 2 buttons in my panel, one will hide when the other one is shown
"anim_type": "offset",
"from": ["1000%", "0%"],
"to": ["1000%", "0%"],
"easing": "in_quart",
"duration": 0.1,
"play_event": "button.hide_hair_button",
"end_event": "button.show_hair_button"
},
these last two animations are for the buttons, since one has to disappear for the other to appear, but I think this animation needs to be reset as well
is end_event a thing?
anyways
animation_reset_name does the thing
play_event only run once
but reminder, this one plays again and again when button is pressed.
how can i use?
@frigid drift ?
same thing u did on play event
and also
its for the button not on animation itself
for example
"preview": {
...,
"offset": "@namespace.in_preview",
"animation_reset_name": "preview.back",
...
...button {
"pressed_button_name": "preview.back"
}
i forgot if theres $ on pressed button name or not but i believe theres no dollar sign
"show_hair_options": {
"anim_type": "size",
"from": ["100%", "15%"],
"to": ["100%", "36%"],
"easing": "in_quart",
"duration": 1.5,
"play_event": "button.show_hair_button",
"animation_reset_name": "button.show_hair_button"
},
something like this??
thats an animation right?
afaik animation_reset_name can be used in panels text or some
"animtext": {
"type": "text",
"label": "test",
"offset": "@namespace.animation",
"animation_reset_name": "anims.show",
...
for panel
anims.show is button name
once the button is pressed, it runs @namespace.animation
...namespace
"animation": {
"anim_type": "offset",
"from": [0, 0],
"to": [15, 0],
"easing": "in_quart",
"duration": 1.5
},
How does one make a stack panel go from the bottom to the top instead of the normal vertical way?
nvm
now i'm having another issue
yep it seems so
how to use dynamic property in json
What do i change to get the offset for the buttons to be more on screen
I need it in the top left btw
Fallout mashup pack world!!!
I can tell that’s tenpenny tower and the revere satellite dish array
How can I add an image to a server form?
YES
I had gotten the pack just to use its textures for my fallout addon
Duuuude. Dynamic property is only scripts it and can't be accessed outside of it.
You asked this multiple of time and I answered you multiple times too
just get the value stored in the damn dynamic property and transfer to readable by json ui.
:v
Oh hi
"0@server_form.crafters_button": {
"$icon_size": [8, 8],
"$button_size": [16, 16],
"$offset": [0, -50],
"collection_index": 0
}},
{
"1@server_form.crafters_button": {
"$icon_size": [8, 8],
"$button_size": [16, 16],
"$offset": [100, 100],
"collection_index": 1
}
}
Why is the id of button 2 "0"?
wdym by button 2?
There are 2 buttons here
But the id of the buttons is "0"
I want the 1st button to be "0" and the 2nd button to be "1"
Bro bunun buttonlarin offsetle kac saata yaparsin ayni hizaya getirmek icin
How else can you do it?
collection index does not work if parent is panel. use type collection_panel in crafters_map_panel
Senden collection_panel kullanmani istiyor type
Problem solved, thank you
Aga ingilisce konuş ben oylesine yazdim abi
Yaptigim harita uide bunun gibiydi ben sadece collection panel kullanmadan yaptim
Bunu ne icin yapiyorsun?
Bi kişiye öneri icin ztn koddan anlamişsindir kim oldugunu
Tamam anladim
How can I make buttons invisible?
animated buttons and stuff go brrrr
Cool
Super Circle-ly
Indrustry ui addon or whatever its called?
Or custom?
Looks super nice
Gives me like a consele type vibe
you should also change the panorama or maybe add a static image?
it's literally right there at the bottom right.
it is. . .
Havent seen it in so long and didnt bother to look there
Well looks amazing, I just dont like the look of bedrocks one
tried but people doesn't like it so removed it. this was more focused on performance rather than intensive UI.
Looks more like other games ones now
I love static look
Since panorama requires you to have a full 360 view of a location and I felt like it doesnt much good for my fallout addon
so I used static image
I don't exactly like custom image in the background because of performance reasons.
Yea true
I dont have any performance issue with this one
Minecraft itself doesn't really like a large images even just a simple texture pack
The only issue is from vanilla minecrafts new ui for play
That gives intense lag for me every since it came out
in the new version there is less but still bad
i don't really have any lags on it tbh
just little 50ms longer loading time
doesn't lag whatsoever, works fine on my phone so i don't really care that much.
I only had lag on my laptop and ps4 but on mobile it worked fine
and on a godang fridge it worked fine
That was a joke btw, I dont think there is a fridge edition yet
My first, fully made by me custom script form with changed texture and positioned text label and buttons! I must tell it here 😄
(It's not pretty, but still I did it myself)
is it possible to have progress bars on server forms
evil gmail icon
It's for some project, I hate it, but still I must use it 😛
do yall have samples on using progress bar on server forms?
or can i just use preserve title text bindings on server forms
What is even the use of preserved text in server forms? there is nothing by which you can update data unlike title, actionbar, etc. in hud screen.
so what will be the way for it to use progress bars in server forms?
You can create a progress bar in server form but it will not update on the same form screen (execpt animation)
yup i just want to show provided progress number per form
like for example i will open one form only with specific number provided inteded for that bar
basically create a progress bar and bind clip_ratio property of image to any binding
how about the text or the data of it? is that possible?
you can use a dummy button to get data using #form_button_text
or just use body text
oh so i can use #form_button_text as a data for my bar?
and also do i need to pass #form_button_text on my bindings areay first before putting it into the data control of the bar?
like for example binding_***: "#form_button_text"
you don't need data control
oh got it
"type": "image",
"size": [70, 6],
"layer": 1,
"clip_direction": "left",
"clip_pixelperfect": false,
"texture": "textures/ui/experiencebarfull",
"bindings": [
{
// get button binding
},
{
"binding_type": "view",
"source_property_name": "#form_button_text",
"target_property_name": "#clip_ratio"
}
]
just make sure that clip ratio is a value from 0-1 so you have to use floats
okay okay tysm
what basically button binding contains?
the bindings of the custom button of server form?
to make it easy, you can use #form_text binding
which is form.body('hello')
can i use form.label instead? cus i think thats a new one and also i have to use form.body for info things
you can but that's same as using buttons.. you still have to get its specific collection index
#form_text
"progress": {
"$max": 100.0,
"type": "image",
"texture": "textures/ui/experiencebarempty",
"size": [70,6],
"controls": [
{
"pf": {
"type": "image",
"size": ["100%", "100%"],
"layer": 1,
"clip_direction": "left",
"clip_pixelperfect": false,
"texture": "textures/ui/experiencebarfull",
"bindings": [
{
// get button binding
},
{
"binding_type": "view",
"source_property_name": "(($max - #form_button_text) / $max)",
"target_property_name": "#clip_ratio"
}
]
}
}
]
}```
{
"binding_name": "#form_text"
}
okay thanks
Hey folks, if I wanted to have a panel with dynamically placed buttons on (I would pass in an X,Y coord) do I need a button factory??
Well this was my first commission and a project in JSON UI.
it was ass so i changed it to this after taking actual refrence
Tekstures from second are sooo nice. Thank you guys, that you are in this community 😅
the guy who paid me to do showed me how his other UI's looked
OniionCraft?
I think i shouldnt say this but ehh 🤷
How I can make custom progress bar inside server form? And best way would be to use scoreboards. But I'm having troubles with the code from LeGend tutorial about custom progress bar
instead of title binding, you just use any other binding available in server form.
.
But when I'm using body for info. Can I set this up for button name? Like if there is button 65 it will make progress bar to 65% value?
you can pass data through a button, and then get it's bindings using collection index
Hello
"collection_panel": {
"type": "collection_panel",
"size": [],
"collection_name": "form_buttons",
"controls": [{
"button@server_form.dynamic_button": {
"collection_index": 0 // buttons index that you have sent info from
"bindings": [
{
"binding_name": "#form_button_text", // now you can get this binding to use it anywhere
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "collection_details",
"binding_collection_name": "form_buttons"
}
]
}
}]
}
should work ig
One message removed from a suspended account.
wdym by scroll-able?
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.
put your images in scrolling panel
One message removed from a suspended account.
"$max_value": 100.0,
"type": "image",
"texture": "textures/ui/experiencebarempty",
"size": [70, 6],
"offset": [0, 20],
"controls": [
{
"progress": {
"type": "image",
"size": ["100%", "100%"],
"layer": 1,
"clip_direction": "left",
"clip_pixelperfect": false,
"texture": "textures/ui/experiencebarfull",
"bindings": [
{
"binding_type": "collection",
"binding_collection_name": "form_buttons",
"binding_name": "#form_button_text",
"binding_name_override": "#progress_value",
"binding_condition": "(collection_index = 2)"
},
{
"binding_type": "view",
"source_property_name": "(($max_value - #progress_value) / $max_value)",
"target_property_name": "#clip_ratio"
}
]
}
}
]
}
"custom_progress_bar@server_form.custom_progress_bar": {
"collection_index": 2
}
}
I have something like this, it shows progress bar, but it's not working. Can you help me more with that?
It's combination of your hud progress bar and your current idea, but still it doesn't work
welp
I would say use #form_text
just set its first 2 characters as your progress bars data and then get its first two characters. in your body, subtract the first two chracters so they dont show up in body text
@clear lantern like this
"custom_progress_bar": {
"$max_value": 100.0,
"$one": 1.0,
"type": "image",
"texture": "textures/ui/experiencebarempty",
"size": [70, 6],
"offset": [0, 20],
"controls": [
{
"progress": {
"type": "image",
"size": ["100%", "100%"],
"layer": 1,
"clip_direction": "left",
"clip_pixelperfect": false,
"texture": "textures/ui/experiencebarfull",
"bindings": [
{
"binding_name": "#form_text"
},
{
"binding_type": "view",
"source_property_name": "(($max_value - (('%.2s' * #form_text) * $one)) / $max_value)",
"target_property_name": "#clip_ratio"
}
]
}
}
]
}
I have this now,
{
"form_text": {
"type": "label",
"text": "#form_text",
"anchor_from": "top_left",
"anchor_to": "top_left",
"color": "black",
"offset": [8, 8],
"size": ["100% - 16px", "default"],
"controls": [
{
"custom_progress_bar": {
"$max_value": 100.0,
"$one": 1.0,
"type": "image",
"texture": "textures/ui/experiencebarempty",
"size": [70, 6],
"offset": [0, 20],
"controls": [
{
"progress": {
"type": "image",
"size": ["100%", "100%"],
"layer": 1,
"clip_direction": "left",
"clip_pixelperfect": false,
"texture": "textures/ui/experiencebarfull",
"bindings": [
{
"binding_name": "#form_text"
},
{
"binding_type": "view",
"source_property_name": "(($max_value - (('%.2s' * #form_text) * $one)) / $max_value)",
"target_property_name": "#clip_ratio"
}
]
}
}
]
}
}
]
}
},
Under I have buttons. But it's still not working. This is only place, in this server form, where #form_text is used twice
tbh cannot say anything right now because I cannot test stuff
Sure, it's not like I need it asap. Just please if you have some spare time in your time try help me please. Thank you for you insight so far 😄
sometimes there is weird stuff if a string starts with a number, you can try setting it in the end and try. I will test later
ay youre missing a bracket after $one
nvm lmao
Does anyone have sprites of the ore ui textures?
... It worked, so I get progress bar at 65%, but in text I still can see number 65 at body
amazing. to remove the 65, do this:
{
"form_text": {
"type": "label",
"text": "#text",
"anchor_from": "top_left",
"anchor_to": "top_left",
"color": "black",
"offset": [
8,
8
],
"size": [
"100% - 16px",
"default"
],
"bindings": [
{
"binding_name": "#form_text"
},
{
"binding_type": "view",
"source_property_name": "(#form_text - ('%.2s' * #form_text))",
"target_property_name": "#text"
}
],
"controls": [ ... ]
}
}
Sooo, after I've changed to your code to delete 65 number, it deleted also my full text. 🥲
(('@' + #form_text - ( '@' + ('%.2s' * #form_text))) - '@') you can try this. idk if it will work or not lol
It worked, thanks very much!
any sample of progress bar inside server form? cant manage to make it work lol
or at least server_form.js lol
Someone please help me make a custom start screen
managed to make one lol
anyways
What are the texture file names for the buttons in start screen?
Like the Settings, Play, and Realm
(#form_text - ('%.10s' * #form_text))
Why not working this code ?
('%.10s' * #form_text)
this code work
Make sure your #form_text doesn't start with a number
How I can scale server form with all things inside of it at once? I made texture for background, set up size etc. but after some checks it can't be good visible. I don't want to again do all things
Do it have some hover transition or is it just that I can't see clearly?
Yes.
But how? Hover states are pre-initialized.
secret.
Ok
json ui creator gatekeeping
totally not me
although it's apart of my update so it'll be out on github open-sourced as usual.
probably next few hours
actually i might gatekeep it tbh
okay, it's your choice ig
how you can gatekeep open source json-ui? Or you mean that this update won't be open source?
how to use or get button text from a dummy button in server_form.js? i dont want to use form_text since its an important element for me to use
i want to have a dummy button wherein number is written on that button for progress bar purposes
or if not i can use body text but how in this situation possible https://discord.com/channels/523663022053392405/1356145319158480896
would prefectly fit for april 1 lmao
though, still. ill release that as an update
not gatekeeping it though
lol no
but yeah, it'll be part of the update
i still need some fixing and there. unfortunately the color anim doesn't work for some reason so I'll have to use a duplicated hack.
it's just only label.
up chat
or just where can i read about binding operators? like *, -, and, or, and more
an image inside a button with an animation that resets on hover/click
i guess
How can I add a hover_control to a button?
Nearly but different.
Button mappings somehow able to "run" the said string, so with that. you're able to use that on animation reset property.
While that looks like simple, animation part isn't really. since variables just doesn't exactly work well and had to result making my own button from scratch.
oh wait
i think thats the method i used on my animated hover text thing
its a little buggy and sometimes does not reset the anim for whatever reason
how to use preserve title text on images? cant manage to bind one it still shows up even tho im not running any titles
"main_panel": {
"type": "image",
"$qbg": "qbg:",
"size": [140, 60],
"texture": "textures/ui/hud_tip_text_background",
"anchor_from": "top_right",
"anchor_to": "top_right",
"offset": [-5, 5],
"alpha": 0.5,
"controls": [
{
"qbg_data": {
"type": "label",
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string = #preserved_text) and not ((#hud_title_text_string - $qbg) = #hud_title_text_string))",
"target_property_name": "#visible"
}
]
}
}
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "qbg_data",
"source_property_name": "(#preserved_text - $qbg)",
"target_property_name": "#visible"
}
]
}
i am NOT doing this right
i wanna show image but its not working
dont put your data control inside the controls of an element that can become not visible
so
"qbg_data": {
"type": "label",
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string = #preserved_text) and not ((#hud_title_text_string - $qbg) = #hud_title_text_string))",
"target_property_name": "#visible"
}
]
},
"root_panel": {
"type": "image",
"$qbg": "qbg:",
"size": [140, 60],
"texture": "textures/ui/hud_tip_text_background",
"anchor_from": "top_right",
"anchor_to": "top_right",
"offset": [-5, 5],
"alpha": 0.5,
"bindings": [
{
"binding_type": "view",
"source_control_name": "qbg_data",
"source_property_name": "(#preserved_text - $qbg)",
"target_property_name": "#visible"
}
]
}```
still visible even tho title not activated
awebo.
-# Mine does work prefectly, haven't seen any issues so far.

"source_property_name": "(#form_button_text - ('%.8s' * #form_button_text))",
How can I set this to take after line 1?
So 2. 3. 4. .... Lines
up chat
wdym?
We need some property_bag to track this.
Can I set this to take text after "\n"?
yeah, you can do this. ('a' + '\n' + 'b')
"source_property_name": "(#form_button_text - ('('a' + '\n' + 'b')' * #form_button_text))",
Is it like this?
give example of what are you trying to do
Button_text = "123\n456\n789"
İ need "456\n789"
How are you Legend?
fine
yeah you can
just subtract the first part
I would say, reserve the first 8 characters for subtracting for each button so its consistent
Is it possible to set it to take everything after the "\n"?
Because it would be better if I did it this way
hmm if the position of \n is changing then no.
where can i read about bindings operators stuff like *-+% smth like that
can we change a inventories texture while it’s open?
What I can do with the Ghost button? I have 3 server_forms -> 2x custom and one for default long_form_panel. Custom ones are visible after type title and it works just fine. The issue is, that in one of the custom form I've used image from button collection index 2, which is not used anywhere. BUT when I tried using basic form it shows me ghost button. How I can get rid of it?
Here is my code for image taken from button:
"apps_icon_3_display": {
"type": "stack_panel",
"size": [64, 64],
"offset": [-101, -61],
"anchor_from": "center",
"anchor_to": "center",
"collection_name": "form_buttons",
"controls": [
{
"apps_icon_image": {
"type": "image",
"size": [60, 60],
"bindings": [
{
"binding_name": "#form_button_texture",
"binding_name_override": "#texture",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_name": "#form_button_texture_file_system",
"binding_name_override": "#texture_file_system",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "(not ((#texture = '') or (#texture = 'loading')))",
"target_property_name": "#visible"
}
],
"collection_index": 2
}
}
]
}
onggah
Pls anyone 🥺
oh wow, implemented that button thing so quickly
Is it input panel?
button
but how you managed to track hover state? hover_control is preinitialized, so we need some property_bag value to track it
How can I hide this?
my UI offset is different from the touch screen and the pc screen, how am i going to connect it to the toolbar or the hunger bar?
https://cdn.discordapp.com/attachments/1253486152611004427/1357357850556497980/image.png?ex=67efe982&is=67ee9802&hm=93d24915a04b3625deb89eb7ab81f498ddab6136eaa21a5af24e89354e0dc4af&
o touch screen, it is correct, but that isn't the case for the pc screen
How to add custom hud elements? Any tutorial?
Whats going on with my anchord_offset_value, it works with a hardcoded value but fails on the substringed text value
I'll give it a go, pretty sure it was one the plethora of things I've tweaked, but my brain is fried today. Much appreciated
well slap my thigh and call me Susan!! turns out it wasnt one of those things i tweaked!! some seriously odd results though!!
the cross and box are as expected! not sure why the tick and diamond ahve shifted down that far, i was excepted them to be offest from the top left 
are you using stack panel?
There are all normal panels, but it does use a button factory, if that makes a difference
yao, im getting some issues with the vanilla hud screen elements, more specifically the bubbles renderer, im trying to use the vanilla anchor_from&to and offset, but its simple not rendering correctly at all, so am i have to make it manually or something?
vanilla bubbles renderer:
"bubbles_rend_0@bubbles_renderer": {
"offset": [ 180, -50 ],
"anchor_from": "bottom_left",
"anchor_to": "bottom_left",
}```
and i try to use its anchor and offset, it doesn't work correctly.
there are like 6 bubble renderer on all the screen lol
anything i use from the vanilla doesn't work correctly
2 for centered_gui_elements_at_bottom_middle, 2 for centered_gui_elements_at_bottom_middle_touch, and 2 for not_centered_gui_elements
maybe you are changing one that is not visible
i know about those,
for example, this one right here
"heart_rend@heart_renderer": {
"offset": [ -1, -40 ],
"anchor_from": "bottom_left",
"anchor_to": "bottom_left"
}```will make the hearts appear on the bottom left, but quite higher
centered_gui_elements_at_bottom_middle/
i hate that with passion
the armor and hearts has the same anchor and offset, so maybe the vanilla UI isn't correct or something?
see,
"armor_rend@armor_renderer": {
"offset": [ -1, -40 ],
"anchor_from": "bottom_left",
"anchor_to": "bottom_left"
}
//
"heart_rend@heart_renderer": {
"offset": [ -1, -40 ],
"anchor_from": "bottom_left",
"anchor_to": "bottom_left"
}```both has the same anchor and offset
every hud UI is hardcoded ig
just renderers
yeah lol
is it correct tho? like is there a better way to do it or something?
"centered_gui_elements_at_bottom_middle":{"modifications":[{"array_name":"controls","operation":"insert_front","value":[{"[email protected]_renderer":{"anchor_from":"bottom_middle","anchor_to": "bottom_left","offset":[40,-42.5]}}]}]},
"centered_gui_elements_at_bottom_middle_touch":{"modifications":[{"array_name":"controls","operation":"insert_front","value":[{"[email protected]_renderer":{"anchor_from":"bottom_middle","anchor_to": "bottom_left","offset":[60,-42.5]}}]}]},
"not_centered_gui_elements":{"modifications":[{"array_name":"controls","operation":"insert_front","value":[{"[email protected]_renderer":{"anchor_from":"top_right","anchor_to": "top_right","offset":[-3,12.5]}}]}]},```
i did,
Should I be using stack panels??
i have moved up the bubbles and the horse hearts
"centered_gui_elements_at_bottom_middle/bubbles_rend_0":{"offset":[180,-61]},
"centered_gui_elements_at_bottom_middle/bubbles_rend_1":{"offset":[180,-61]},
"centered_gui_elements_at_bottom_middle_touch/bubbles_rend_0":{"offset":[200,-61]},
"centered_gui_elements_at_bottom_middle_touch/bubbles_rend_1":{"offset":[200,-61]},
"not_centered_gui_elements/bubbles_rend_0":{"offset":[-2,23]},
"not_centered_gui_elements/bubbles_rend_1":{"offset":[-2,23]},```
test it with a skeleton horse underwater
( i am currently doing that btw )
also, for no reason this doesn't work
"not_centered_gui_elements":{"modifications":[{"array_name":"controls","operation":"insert_front","value":[{"[email protected]_renderer":{"anchor_from":"top_right","anchor_to":"top_right","offset":[-3,12.5]}}]}]},
it should set the element to top_right, not center
more specifically, the anchor is not anchoring there
the offset is working, but not the anchor, im wondering why?
Certainly getting closer!! i'm guessiing its my arrangement of Stack_panels, grids and panels
nvm i have changed the whole system,
but it still has some parts that isn't working correctly for some reason
@placid geode sorry for the ping but, i need help fixing this unnecessary bug