#JSON-UI General
1 messages ¡ Page 10 of 1
does anything inside of controls: [...] get placed on top the the element
not sure how to phrase it but
{
stuffHere,
controls: [more stuff]
}
would more stuff go on top of stuffHere
pretty much
the controls are the children of the element
ok thought so, thanks!
Anyone know why my chest_screen.json stopped working in 1.20.30? It was working fine before this update and I get no error logs. I check the repository and there were no changes made so what's up with that? Did they break something?
yeah, 1 sec I'll get the bug report for u
Really?
can i use json ui for marketplace packs?
Yeah, there are a few rules but they're not that strict so I wouldn't worry about it
Just don't mess with things like the player inventory
Hud screen changes, npc ui, server forms are all fine
adding custom menu in pause screen that triggers via a toggle button?
I'm not sure that would be allowed
ask your project manager though,they might know
Their solution worked
There exist 3 button states
Default, hover, pressed.
Why does the hover state show the whole time? I made the hover button a little bigger, however if i open the ui with the default buttons, i can already see the frame of the hover button. What can i do?
But i used these 3, but still how to fix this problem?
how do I specify the path?
ah so it got same as action bar and other vars
Json UI is created using json config files. It is used to edit vanilla UI. The current UI for the game is built using the json UI engine.
Scripting UI, or html UI, is a new, experimental kind of UI that uses HTML and the js scripting engine. Its pretty much completely undocumented, and not considered particularly stable.
The following can be used as valid values on JSON UI properties such as size, offset, and anim type elements:
⢠% the percent relative to the parent element
⢠%c the percent relative to the total width/height of the child element
⢠%cm the the percent relative to the width/height of the minimum size of all the child elements combined
⢠%sm the percent relative to the total width/height of the sibling element
⢠%x the percent relative to the total width; and %y for the height
⢠px can be used to refer the number of pixels inside strings
⢠+ / - can also be used to add or reduce the size accordingly as you want
Example usage:
"size": [ "100%", "100%" ],
"offset": [ "16% + 4px", "100%" ]
Can also be used in anim type elements and animate relative to the position using %.
"to": [ 0, "100%" ],
"from": [ 0, 0 ]
I might've asked it wrongly
I mean just the PNG for all panel
or just inventory at least
I just want to make a dark mode of it
got the cells done just need some more stuffs
nvm found it
How can I make a text split?
offset: [0, 50%]
or
"anchor_from": "center", "anchor_to": "center"
You can also use a stack panel and have the image and text as siblings so that they auto-adjust when one is gone
centered vertical stack panel where if image path = '' override #visiblity to set it false = text in middle
what? I gave 3 options to center an element?
center is default anchor.
you do not need to use center anchor unless the existing elements are using non-center.
secondly, you also do not need percentage in offset because it's literally useless if you're adjusting it into 3-5 more pixels
in what file can I change the size of the title cuz custom one is smol :< (on menu/home screen)
wot title
check out ui_art_assets_common.json
would it help to add size in there
you could modify the size in there
oh wow. I see they have a max size for it
It should apply to all screens that has title.
How can I make a text split?
I can you MP ?
exactly its not html lmao
nope just gave you exact steps how to create it
I'm French so I didn't understand
I have a label using a server form button text and was wondering how can I make it so it only sets the text as the first 2 characters of the text.
I have attached my label code
Getting Started
- Create a folder titled
MyUIAddOn - Inside of
MyUIAddOncreate amanifest.json(for more information on how to create amanifest.json: https://learn.microsoft.com/en-us/minecraft/creator/documents/resourcepack#building-the-resource-pack ) and a folder namedui. - Inside of the
uifolder create a file named_ui_defs.jsonand a file namedserver_form.json - Using your browser, navigate to https://github.com/Mojang/bedrock-samples/releases and download the Resource Pack for your version anywhere youâd like (not inside of your resource pack or the folders for Minecraft).
- Analyze
server_form.jsonfrom the newly downloaded Vanilla Resource Pack and the documentation here - https://wiki.bedrock.dev/json-ui/json-ui-intro.html - to find which objects and components you wish to modify. Donât modify those files directly, and remember, only modify whatâs needed as per best practices! (https://wiki.bedrock.dev/json-ui/best-practices.html#only-modify-what-is-necessary) - Once youâve analyzed what youâve needed, remember to edit the
server_form.jsonyou created in your pack to modify the behavior of that UI. The Objects, Components, and Controls you type and define here will override the default ones when the files merge. You may also need to create your own custom UI file within theuifolder of your add-on, and edit that as well following the guidelines as set forth in https://wiki.bedrock.dev/json-ui/json-ui-intro.html - Make sure that you edit
_ui_defs.jsonwithin yourMyUIAddOn/uifolder to point to any added files you may have created in step 6 that werenât already a part of the UI format. (You wonât need a new reference toserver_form.jsonin there, but you will need one tomy_server_form.jsonas an example.) - Trial, error and documentation. Make sure you utilize the search function here to look for posts that may solve your problem. Look at other examples of UI to get started.
Accurate?
This wiki is a knowledge-sharing website for Technical Bedrock, containing documentation, tutorials, and general how-to information.
This wiki is a knowledge-sharing website for Technical Bedrock, containing documentation, tutorials, and general how-to information.
@nimble jungle source add below
@nimble jungle
{
"binding_type": "view",
"source_property_name": "('%.2s' * #form_button_text)",
"target_property_name": "#visible"
Not really that accurate and it only focuses on server_form.json
It focuses on a single file as a STARTING point. Just to get a UI project thatâs ready for editing.
@broken trail dm excuse me?
?
Dm
"text": {
"type": "label",
"font_type": "MinecraftTen",
"localize": false,
"color": "white",
"text": "#form_button_text",
"text_alignment": "center",
"font_scale_factor": 1,
"size": [30, 20],
"offset": [0, 2.3],
"layer": 10,
"bindings": [
{
"binding_type": "collection_details",
"binding_collection_name": "form_buttons"
},
{
"binding_name": "#form_button_text",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "('%.2s' * #form_button_text)",
"target_property_name": "#visible"
}
]
}
a bit confused on how this works, is it something like this as this is not working
source_property_name must return true or false to set visiblity to true or false I think thats understandable
in you code this just takes first 2 chars and nothing else
compare it to something like
"(('%.2s' * #form_button_text) = 'te')",
if those 2 first chars will be "te", this element will be visible
otherwise it wont be visiblie you get it?
yeah that makes sense, im just trying to get the first 2 characters from the #form_button_text and have the text set as those 2 characters
ok so I managed to get it to work so it only returns the first 2 characters and set the text as that, but it only works if they are letters, and my first 2 characters are numbers so it wont work. How can I fix this.
This is my binding and im just setting the text as "text": "#text"
{
"binding_type": "view",
"source_property_name": "('%.2s' * #form_button_text)",
"target_property_name": "#text"
}
Nvm, figured it out
How do you guys set up your nineslice with form backgrounds? Because I have a layout like this:
âŹâŹ
âŹâŹâŹ
âŹâŹ
And I set up my nineslice size to 1 but the corners are not actually really visible which I really want.
Try [ 1, 1, 1, 1 ]
does anyone know the name of the bossbar texture?
not sure about that, since that's a custom renderer
whjt does that mean
idk much abt json
jst cause i was tryna make my bossbar look better a while ago, and now im stuck with this shtty texture, and idk the name to deleteit
deleting textures cause them to return missing textures instead
i thought they jst go back to the vanilla texture?
if textures exist in vanilla with same names
oh i see
oh wait
dumb quaestion
does anyone know how to change the font after a line break? like i want the title to be in MinecraftTen but the description should be in default font, just like in Hives Menu
Where can I find border texture?
ping me if you know
Must be two different sections/label with different fonts
@broken trail can you dm me? I asked something
can you tell me how to seperate the titles? inside the script
like menu.button('Only One Text','textures/ui/cancel')
how can i add another section to a button
I'm pretty sure the top one is static and the bottom one is dynamic controlled by scripts
@torpid nymph dm
the concept here is, use only one text string with substring somewhere at the middle
and duplicate them into 2 text controls with different fonts
I'm confused cus like how will you determine their length?
i have looked into the hive rp, and there is no such thing!? i cant find anything which seperates the text
its all in the server form right?
with bindings
@idle anchor Could you please ask me another question?
what
đ
what the heck is it with people pinging me out of nowhere this week?
i mean, i'm fine with pings, but with no prior context it's so confusing lmao
just a text substring (by using %.xs)
inside the script or inside the server_form
menu.button('Text1%.xText2','textures/ui/cancel') that didnt work :/
@idle anchor I wanted to ask you something via dm
I guess you don't check your dm at all
- DMs are not the place to ask for addon help
- I know next to nothing about JSON-UI, and thus, am not the right person to be looking for in the first place
I also do check my DMs, but I pay very little attention to message requests, which is what your question was showing up as.
If you scroll up a bit, I was actually messing with this earlier to get the first 2 characters of the button text
@nimble jungle dm please
Uhh can someone help me in making a simple ui?
However JSON UI is complex, it's not very easy. But it's interesting
what are you guys using to refresh your texture packs? i hate having to close and reopen my world, just to change my button size by 1 pixel
like is there smth like /reload but for texture packs?
There's nothing..
so like everyone here has to close and reopen their world to refresh their ui?
hell nah
Can anyone help me center it and make the buttons work?
@stiff urchin offset
thanks for nothing
I've messed with the offset so much, it never centers
I'm kinda confused how modifications work and where to use them? whenever I add them anywhere it says that it's not present but in the wiki it's definitely listed
isnt offset the only way? i mean offset is one of the most annoying things for me, but you need to change it like 10 times and then it should be good
Would it be possible for 1 actionbar text to show 2 UI elements?
Make one panel and put the conditional rendering there and put the 2 elements inside the controls of the panel.
hmm
How to get bossname in bossbar :()
example would be great.
I already have a thing where 1 text shows 1 element
Alright
"panel": {
"type": "panel",
"size": [] // size here..
// Do conditional rendering here...
"controls": [{}, {}] // Put both your elements here..
}
ahh briliant!
How can I put a background behind a simple text lable?
Put the background first then the label
The text on the label has different lengths
"bg": {
"type": "image",
"texture": "", // texture here..
"size": ["100%", "100%c"],
"controls": [{
"label": {
"type": "label",
"size": ["100% - 7px", "default"], // You should subtract the width until it fit because sometimes the label overlaps the image
"text": ""
}
}]
}
Ahh and the text can be at any lenght and it will just resize itself?
Yep
Nicee
Thanks alot!!
No problemò
What exactly is happening here?
Well the message background is super long
Its that black bar with left heyo
Because the bg uses 100%, just edit it:
"bg": {
"type": "image",
"texture": "", // texture here..
"size": ["100%c", "100%c"],
"controls": [{
"label": {
"type": "label",
"size": ["default", "default"],
"text": ""
}
}]
}
Wait
And what if I want the text to have a max length? before it goes to the next line
without using \n
@raven wigeon ⍠Just copy this again.
Then what would you do is put that bg element inside a panel with really specific size (Example: "size": ["20%", "100%c"] , Note: only edit the width of the panel) to specify the max text length size.
ah alright Im gonna try this
Ah it worked!
Last question haha, how can I make it fade out and when the text changes it reappears?
Huh?
You know how the title fades out after a time?
You could use anim_type wait and alpha, wait will wait based on input duration then next animation which is alpha fade out animation. You could search both of these anim_types in this server. GTG imma sleep.
whats the dressing room screen name in the files?
how do i pick the right size for the picture on top of a scorebaord, it always looks to big pr to small and isnt in the center
anyone that has use modifications care to help me out understand how they actually are used? I tried using them for some elements but it always errors out saying that modifications is not usable
modifications are what it does. it only modifies by inserting or getting rid of existing vanilla elements.
It's useful for making pack compatible with each other's.
aswell able to remove vanilla stuff (well you could just, put ignored on which elements you want to remove it)
how am I supposed to modify collections in my own forms then if those only work on vanilla elements?
you can fetch actual vanilla code from vanilla template and modify from there.
I don't think anyone need that modifications property since it was best for compatibility between UI packs
another than that, it's useless.
seems kinda stupid for me to create multiple grids needing to add each element if there is lots of buttons being passed to the form though to then just ignore them, modifications would have made sense in that use case
that's how it works honestly
If you don't want base vanilla code conflicts with each of your code since, well. it's overriding not actually modifying them, then you might have to rename the element and making sure it does not exist in the base vanilla code
vanilla conflits are nothing of my worry, it's the servers pack so we manage it ourselves anyway
i need to make an immitation bar that looks like the boss bar and when lvl will reset at new lvl, i know scripts moslty just not json ui customization
mcmmo like in java
@hexed briar Do you know hover_text?
I created hover_text, but it is the same as the text I added to the button. How can I change it differently?
they have about 10 accounts, it won't help
I've blocked like 4 of them
DW I have message requests thing on
same, still annoying though
It like a mail.
you can create ticket here if you want, since something like this are definitely not okay
I'm taking that as a last warning, if they did again then yeah some mods here gonna know it.
Glad to know itâs not just me
They were just in my dms (and twitter replies) asking for help with the same reason
they even admitted to skidding ui's đ
this dude somehow have that dedication just to ask literal everybody
Bro couldve figured it out by now if they didnt waste time DMing
Yeah
How do I edit the minecraft title screen?
whos doing JSON-UI Commissions?
When was the last time Json ui was updated like versions..., or is it not something that gets updated?
never
they do bug fixed sometimes but they don't update it
im not 100% sure but maybe @restive crag
How do I make a text box fade out like the chat and re appear when #text get updated? And then ot fades out again etc
Oh so like children's in stack panel fade out?
factory.
Oh yeah factories are a thing completely forgot about them!!
I never tried them with animations so hopefully it works.
yeah obviously you will need them to reload your elements.
But how do I add alpha animations to a panel?
Or will I add the animation to both the text and the bg and hook the factory to the panel?
Interesting my #text updates without needing to add a factory.
I think because #hud_subtitle_text already has a factory hmm
if u add animation to panel i believe it affects it children
The whole hud_title_text element are hardcoded that way.
They'll reload without factories.
actually nevermind, hud_title_text still uses factory.
Ah so I need to add a new factory for #text now?
Then add a alpha animation to the anims array and im done?
Why do u need to use anims array?
anims directly to alpha property will do it
"alpha_animation_example": {
"anim_type": "alpha",
"easing": "<string>",
"duration": <number>,
"from": <value>,
"to": <value>
},```
Because a panel element doesnt support alpha right?
Only image type does.
you can use anims property on elements to play multiple anim elements
Oh i completely forgot about itđ
No.
it can be used on label too.
Oh yeah that too
using alpha on panel or parent element may affect all children elements, atleast what seems occur to me before
though I believe this no longer does that since 1.19.10
Oh so I have to add it to each element seperatly?
yeah.
though if you planning to add alpha anims to it, no need for alpha property.
since anims will override alpha value so, yeah
Does this also mean 2 factories?
How do i use clip_children to split something then get that 2 value?
so no, you don't need extra factories for that
Clip_children are depends on your panel size.
So in summery factories also affect child elements? But animations dont.
yeah.
but the animations part, no.
Ah thanks alot!!
using animations in element is essentially the same thing as referencing elements
ye...?
that's your answer.
the size is your values.
clip_children is literally a mask to panel property, so it can only be rendered inside the elements.
But what about if its in the different position
that is depends on the parent element.
It says clip_children is an unknown property, is this some spelling error?
"informations": {
"type": "panel",
"size": ["65%", "100%"],
"clip_children": true,
"controls": [{
"head@form_bg_no_border": {
"type": "image",
"size": [120, 120]
}
}]
}
Misspelling.
clip_childrens
Oh alright
That's a bit weird, it still saying unknown property
?json-ui-documentation
how do i just put a solid color on panaroma screen
I think by just adding a big image behind everything?
"panorama_view": {
"color":[0,0,0]}
- Put any image type on your choice
- Use
[ "200%", "200%" ]on image size - Use
textures/ui/Whiteaas texture since you can change its color viacolorproperty - Use
colorproperty on which color you want to change - Apply the element and make sure it loads
- (Optional) if your background overlaps other elements, use
layerproperty with negative value. - Done.
kk
i use panaroma screen.json
and
{
"namespace": "panorama",
"panorama_view": {
"type": "image",
"size": [ "200%", "200%" ],
"texture": "textures/ui/White"
}
}
~~Guys so I tried to do string formatting which if I have abcd i will expect to get cd but this one just copies the original text, not cut it.
"text": {
"type": "label",
"text": "#text",
"size": ["100% - 10px", "100% - 5px"],
"bindings": [{
"binding_type": "view",
"source_property_name": "(#form_text - ('.69s' * #form_text))",
"target_property_name": "#text"
}]
}
```~~
Nvm I figured it out
i put type as image , and size as 200%
but i still see the paranoma
"Apply the element and make sure it loads"
You can't just put panorama_view and expecting it'll work out of nowhere
Check and look for any elements that references that
kk
"source_control_name" in binding, is anyone familiar with it?
I only know that it's used to retrieve variables like #toggle_state, #item_name, and #slider_value from a toggle, text edit, and slider.
It's also used to access binding variables from other panels that I often use as storage.
Are there any other uses for it, or what is its main purpose?
source control name fetches the bindings of the specific element(control).
it's main purpose is this ^ I don't think there is any other use
Can it retrieve properties if they are not in the same parent/screen?
Nope
nope, it has to be it's child or sibling (resolve sibling scope)
What can I do so that hover_text and button_text do not stay the same?
Actually, what does resolve_sibling_scope does?
I put text on the button, the same thing happens in hover_text, how can I separate this?
It allows source control name to select/choose a sibling, instead of control.
I took item_details from the chest ui file and connected it to form_button_text, but it looks the same as the name of the button, how can I separate it?
uh
đ
What
i mean idk?
The hover text looks the same as the text I added to the button, I wanted to ask how I can do it differently.
My English may be bad because I'm Turkish.
How to display offhand items in hud
So if child B has "resolve_sibling_scope": true, can it access properties from child A?
"*": {
"controls": [
{
"A": {}
},
{
"B": {}
}
]
}
Tell me how to separate these hover text and button_text texts, I've been looking for a week and couldn't find it.
instead of looking, you have to try
You can use string formatting
search it up in this discord channel. i discussed it previously
I tried what you said, but since the button text characters are large, the texts I added to the hover text appear in the button text.
Can you send me the link so I can check it out?
what link
I used string formatting but there are long texts
For example, I named 2 buttons, one of them (SkyWars) and the other (Survival Games). Now, which one should I use a string for?
('%.8s #form_button_text') If you say this, I tried it before
#1067870274894172260 message ig
Anyone recommend me a good json ui formatter
Can you explain a little bit what this does?
@normal moat Do I need to add this to the hover_text code?
because when I added hover_text to the code
@normal moat can you dm me?
this does what you asked i guess
also stop DMing
?json ui is tough
Welcome to JSON UI!
If you are reading this, there is a good chance that you were inspired by The Hive, Galaxite, or some other addon or server. Welcome! This is the right place to learn about these topics.
To get started in learning JSON UI, we recommend you check out the Wiki first: https://wiki.bedrock.dev/json-ui/json-ui-intro.html.
However, please be aware of these things:
- JSON UI is much tougher than other addon topics.
- JSON UI is 100% only documented from vanilla reference and reverse engineering. There are no documentation directly from Mojang.
- We will not give you step-by-step instructions on how to create UI from Hive/Galaxite.
JSON UI is one of the toughest addon topics, so please be patient. Try and attempt small tasks. Ask concrete, answerable questions. We won't spoon-feed you.
Bro I'm doing it but half of the text appears in button_text
@normal moat For example, survival games, future articles will be in hover text, for example.
But when I try it in SkyWars, half of the hover_text is written to button_text.
('%.14s * #form_button_text')
I set it to hover_text after 14 characters
But this does not happen with some buttons
đ I don't understand what you're saying
Then let me explain it to you visually in dm. My English is not enough to explain it properly.
I didn't want to post a visual here but I had to post it. I want to ask you about what you did and how you did it.
now you can understand
it is literally the thing I linked above
this is the most engrish I ever seen
yeah lol
no crossposting lad.
Any reason why %.10s rather then a larger number like %.50s?
Legit question
@limpid quarry looking at the text
Oh yeah, it adds spaces
Right?
I've just been working on some hud_screen stuff
Look, for example, the name of one button is (SkyWars) and the other one is (Survival Games). Now, when you add hover_text, it looks the same as the button text.
I want there to be hover_text after (Survival Games)
Would putting it to like .14 or
.15 solve the text issue for how many characters. Does that ruin other buttons.
(Survival Games)button_text (Click) hover_text
Oh
@limpid quarry That's what I do, it doesn't work on the button named SkyWars.
Interesting
The way it is done here works whether it is long text or short text.
I'm trying to solve this too
So your saying if you make the long text work then the short text doesn't. Same the other way, if short works long doesn't?
Then part of the text in the button will be placed in hover_text
So the name of the button (Survival Games) appears as (Games Click) in the hover text.
Oh so the extra words/letters are wrapping into the hover text? Huh
Oh I see
It's like splitting the text
And merging weird
It splits the text, so let it be a 10-character text, it splits it.
I don't understand what's here. It works for long text, it works for short text.
Chat gpt 4 I want to buy
Bing has chatgpt4 free use rn
OpenAi gpt4 costs a whopping 20$ a month and it's so so
@limpid quarry very expensive
I set hover_text to 14 characters
I didn't know how many characters to make the button_text.
Yes why I will use bing chat with gpt4 and it's free
Yeah 14 the amount you need for characters
@limpid quarry Some of the characters are 10 4 8, that's the problem for me.
The ones with 14 characters work easily, but the ones with 10 4 8 characters do not work.
Oh I see.
Legit just paste some of the code into Bing chatgpt4 that's free and then say your issue it usually has a solution
Use "creative" mode for coding
Or send me the code
I can ask
But yeah it's weird how so many little things effect each other, will be nice if oreui ever comes out
"item_details": {
"type": "custom",
"renderer": "hover_text_renderer",
"allow_clipping": false,
"clips_children": true,
"layer": 5,
"bindings": [
{
"binding_name": "#form_button_text",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "(#form_button_text - ('%.14s' * #form_button_text))",
"target_property_name": "#hover_text"
},
{
"binding_type": "collection_details",
"binding_collection_name": "form_buttons"```
this hover_text
"text": {
"type": "label",
"size": ["100%", 20],
"max_size": ["100%", 20],
"offset": [0, 8],
"text": "#visible",
"text_alignment": "center",
"bindings": [
{
"binding_type": "collection_details",
"binding_collection_name": "form_buttons"
},
{
"binding_name": "#form_button_text",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "('%.14s' * #form_button_text)",
"target_property_name": "#visible" ```
here button_text
Ok
I don't know what needs to be done to run ore ui in the game, but I know it works as ts.
Yeah it's suppose to be ts and react right?
Yes
.button("Survival Games Click")
(Survival Games button) (Click Hover)
.button("SkyWars Click")
(SkyWars button) (Click hover)
Chatgpt is really slow today probably a server issue. But it's slowly generating. It is talking about instead of Fixed sizing with the %.14s it mentioned dynamic sizing calculations for each button
I'm about to see what that might ne
Be*
So what does he mean? What should I do?
My problem is, how can I adjust the hover_text according to the buttons?
I'm waiting for it to generate
Check out the codes I posted, did I do it right?
Chatgpt 3.5 says
To achieve dynamic sizing based on text length for your button and hover text elements:Set the "size" property for both the button and hover text elements to ["auto", 20], or another suitable height, to keep the height fixed.Adjust the width of both elements to be dynamic based on text length. You can use ["auto", "auto"] or calculate the width based on the text length in your code. The exact implementation may depend on your JSON UI framework.By making these changes, your button and hover text elements will adapt their widths based on the length of the text they contain, preventing overlap or text cutoff issues for both short and long text.
Let me get chatgpt4
Could be totally wrong btw
Do I need to add auto to this now?
Chatgpt4 says it's not possible! Lmao
Well ai don't know
Try auto
And see I guess
chatgpt4 is crazy
Worth a shot if right, if not at least we tried
It really depends on the input
For the gpt
"auto", "auto"
auto. đ bruh
better read the documentation + chat gpt know nothing about minecraft dev
The word auto seems ridiculous to me, no one uses auto anywhere.
So whats the solution?
Lol fair
Gpt3.5 so confident lol
Trolls so good
Gpt4 is like bruh....
I did it according to the button's text, but it still didn't work.
Doesn't work for short texts
@limpid quarry where is gpt 3.5 you ask?
on your server?
No, I use the free 3.5 on openai app android phone
Don't you think 3.5 is old?
Yes it's almost 3 years outdated
It would be great if I could solve this problem.
Let me now make a python script to scrap data from the documentation :p
There will be no problem xd
I legit have to find solutions to my own problems here, I actually have to think hard, when I do script api, I can play dumb and people will answer when I'm tired of thinking.
Json so confusing to learn
I'm very confused. It accepts the texts after 14 letters, but it does not accept the texts with 6 and 7 letters.
Try different element like button since it has auto wrap features?
And tooltip maybe instead of hover text
.button("Survival Games Click") Here is the name of the Survival games button Click hoverin name
@limpid quarry no
Lol
@limpid quarry It needs to be done in such a way that it works in both short text and long text.
Yeah I have no idea, I'm trying to learn together so next time I can give the correct answer haha. I'm gonna keep trying for a solution.
Big Buda has spoken chatgpt 4 haha. "Iâm sorry, but I donât think there is a solution without changing the element type for your JSON UI issue. The hover_text_renderer element is not designed to handle different lengths of text dynamically, and the %.14s format specifier is not flexible enough to accommodate both short and long text. You will need to use a different type of element, such as a button or a tooltip, to achieve the desired effect. I apologize for any inconvenience this may cause you."
Anyways I've hit a dead-end
.d
I've been working for 2 hours and still can't fix it.d
oof
%14.s takes the first 14 letters
Now (#form_button_text) - ('%.14s' #form_button_text) I wonder if it will work if I put this in hover_text and try it?
Sup could anyone give me a hand with this?
I'm trying to make a Modal Form have a multiline input...
I've actually managed it in the past, but forgot how and lost the code - #old-json-ui message
// snippet from server_form.json
"[email protected]_text_edit_box": {
"anchor_from": "center",
"anchor_to": "center",
"size": [ "100%", 70 ],
"offset": [ 0, 5 ],
"$text_alignment": "left",
"constrain_to_rect": false,
"selected": true,
"can_be_deselected": true,
"focus_enabled": true,
"max_length": 24000,
"$option_place_holder_text": "#custom_placeholder_text",
"$text_edit_box_placeholder_content_binding_name": "$option_place_holder_text",
"$text_edit_box_placeholder_content_binding_type": "collection",
"$text_edit_box_content_binding_type": "collection",
"$text_edit_box_content_binding_name": "#custom_input_text",
"$option_binding_name": "#custom_input_text",
"$text_box_enabled_binding_name": "#custom_input_enabled",
"$text_box_name": "custom_input",
"$label_bindings": [
{
"binding_name": "#custom_text",
"binding_type": "collection",
"binding_collection_name": "custom_form"
}
]
}```
I'm very close. It works in-game but doesn't accept a default value like the normal modal text input
funnily enough I was stuck at this exact place last time too, until I eventually somehow figured it out
how is the joining server screen ui called?
What does the user interface depend on?
who can look at my player.entity.json? For some reason, animations from first person, trident, shield, etc. stopped being rendered.
Wrong channel.
"#custom_placeholder_text"
Does changing this to default text do anything?
Rather then the placeholder text that's there in ""
Example
"$option_place_holder_text": "Your Default Text Here", // Change this to your desired default text
I'm just guessing tbh
Ah well that's what it's called directly from the single line input, which should be the same I thought
I made hover_text 14 letters, but it didn't work in small fonts. What's the problem?
Survival Games works here, but it doesn't work in others.
If you know what the problem is please tell me.
hell o im running into the issue wher i cant get my buttons into a 2x 2grid what i cahing either makes the buttons dissapaire or makes them stacked on top of each other in my custom ui any fix
"student_button_custom@npc_interact.student_button": {
"size": [
"102%-10px",
33
]
},
"student_custom_dialog": {
"type": "panel",
"size": [
"100%",
"100%c"
],
"controls": [
{
"student_custom_dialog_stack_panel@npc_interact.student_custom_dialog_stack_panel": {}
}
]
},
"[email protected]_image": {
"type": "image",
"texture": "textures/ui/cartography_table_empty",
"size": [
20,
20
],
"offset": [
32,
32
]
},
"student_custom_dialog_stack_panel": {
"type": "stack_panel",
"texture": "textures/ui/cartography_table_empty",
"orientation": "vertical",
"size": [
"65%",
"90%c"
],
"offset": [
22,
90
],
"controls": [
{
"top_padding": {
"type": "panel",
"size": [
"50%",
2
]
}
},
{
"middle_padding": {
"type": "panel",
"size": [
"100%",
2
]
}
},
{
"buttons": {
"type": "stack_panel",
"orientation": "horizontal",
"size": [
"82%",
"80%cm"
], //buttons scale
"offset": [
32,
80
], //buttons positions
"controls": [
{
"actions": {
"type": "grid",
"size": [
"fill",
"default"
],
"grid_item_template": "npc_interact.student_button_custom",
"grid_dimension_binding": "#student_button_grid_dimensions",
"collection_name": "student_buttons_collection",
"bindings": [
{
"binding_name": "#student_button_grid_dimensions"
}
]
}
}
]
}
},
{
"bottom_padding": {
"type": "panel",
"size": [
"170%",
250
]
}
}
]
},
Is there anyone who can help me with this?
Please help me with this I need it very much
So I have a problem with displaying inf in strings for json ui. How could I be able to display it
@normal moat As you said, it is something you have done before and you know it better, I used string formatting, but if you look at the other articles, you will understand that the other articles did not happen.
custom crafting table is not compatible with unlockable recipes, right?
Hi, is it possible to find the size binding, like the element that the size percentage is based on
@here
Nice try lol
yo
@brave pewter
Please stop trying to ping everyone.
?
What do you mean by not compatible?
hmm, thatâs quite interesting
However, on the standard crafting table it is working perfectly.
I donât think this topic is related to JsonUI, letâs to somewhere like #add-ons
If I search in the search bar the item appears, but all the tabs are empty
Okay
Why
Guys is there a tool for ninescicing that shows like what position I'm editing
Really need it bad
- Because it doesnât work
- Because itâs gonna turn into spam
Guys is there a template where i could add icons to buttons?
Should I add a template to the button or do I need a template?
anyone know how fill blank grid?
Please tell me a solution to this, I did as you said, I just don't know why the others look like this. @normal moat
I just want to solve this problem. It doesn't say anything in the Survival games article, but it does in others.
what
I made text with button text and hover text, but it doesn't look good on others. How can I solve this? @restive crag
Does anyone know the code for the player list panel on the pause screen?
There are 2 parts, one right in pause_screen.json and one in scoreboards.json (list scoreboard)
I need player list and xbox profile on the pause screen
xbox icon
This is correct? The syntax.
"source_property_name": "(('%.4s' * #title_text) = "§c§o")"
"source_property_name": "('%.4s' * #title_text = "§c§o")"
looks correct
Thanks everyone:) I will try it later and if there is any problem I will let you know.
hii
Or anyone that can answer this question: Let's say I want to make my own version of a stonecutter, for example:
Do I make a block, then copy the stonecutter UI (or refer to it) under a new namespace, same as my block name?
What needs to happen to make interaction on my block call up the namespaced UI?
I would be great if someone did a simple tutorial on making something basic like that from something common... None of the wiki tutorials explain much...Learning this is gonna suck, I will have to deconstruct a lot myself in order to understand what came from where. Most reg people just want to make their own furnace or brewing stand... and people say... Json UI... but...really... a dev resources on one or two of these would help a lot of people get feet wet...
I have never used JsonUI before but I know some stuff, iirc you need to make the UI check for the name of the block if it equals to what you want and then make it appear
@hexed briar do you mind helping please?
Giant.. HOW
You can do that?
{
"crafting_screen": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_back",
"value": [
{
"test@custom_crafting.root_panel": {}
},
{
"[email protected]_screen_base": {
"bindings": [
{
"binding_name": "#crafting_label_text"
},
{
"binding_type": "view",
"source_property_name": "(#crafting_label_text = 'container.crafting')",
"target_property_name": "#visible"
}
]
}
}
]
}
]
}
}
I wrote this test script a while ago, I don't remember how functional it is
{
"namespace": "custom_crafting",
"[email protected]_screen_base": {
"$top_half_variant": "custom_crafting.crafting_panel_top_half",
"bindings": [
{
"binding_name": "#crafting_label_text"
},
{
"binding_type": "view",
"source_property_name": "(#crafting_label_text = 'test')",
"target_property_name": "#visible"
}
]
}......
please help me I've been looking for 6 hours #1157788205106597971 message
Please don't cross-post. đ
fwi when you're searching for ui stuff, I'd recommend looking for stuff either shane wolf or LeGend has posted
Pretty sure arcdustry and axoyl are also great at UI but Idk how often they post code here
Yeah, it's better too look at older posts before creating a new one, you might find what you're looking for
So what is the name of your crafting table?
"test"
How did you link the UI, is what I am getting at
By title, title is set via the crafting table component
"minecraft:crafting_table": {
"grid_size": 3,
"table_name": "test",
"crafting_tags": [
"cooking"
]
},
Was it this "source_property_name": "(#crafting_label_text = 'test')",
yes, that is a binding to set the visibility of the custom crafting UI
So for example, if you wanted to make your own custom map table.... similar?
Probably? You can only have up to a 3x3 grid though (the only grid_size accepted is 3 but you can hide some of the buttons).
might able to
again, already retired on json-ui
oh, sorry!
started ore-ui or something?
You canât use OreUI yet kirby
also having mental issues rn so can't really chat that much atm.
I make texture pack nowadays
i hope you start feeling better soon harlow!
that shouldn't stop you
true, i just modify the game files lmao
hopefully
hopefully!
Is it possible to increase the score limit on the scoreboard?
Would it be possible to add some sorta graph in actionform body? Just imagining a graph system with timeline for stock market type thing
I don't quite understand that, the player list is already in pause screen
cool ui thing I made because boredom
Boredom đ§
I obviously need something like that for controller use
I hate playing vanilla with controller, the ui sucks already
That's gonna like need a ton of mappings?
I also hate that too
nope
for me should be simple enough
mostly I have rewrote of them regularly so I could like. make something with ease
since I mostly have control over it so, yeah
I may make a template as I have a lot of pre-made ui stuff on my laptop but a bit busy. I'll post in #1072983602821861426 as I get some time from life.
It is just like Kirby showed, detecting the title and modifying the crafting grid.
Thank you. I would really appreciate that. I have a lot to learn and seeing how to convert something for my own versioni would be very helpful.
Can I create a new panel next to long_form_panel in the server_form.json file?
You can, yes.
Remove the form from the factory and instead put your own panel inside the screen content. Then in your panel you can add back in the form factory and add your custom panel next to it.
you really need to actually learn stuff instead of asking one specific thing each time that is actually very easy if you went thru with the basics, that's why most have blocked you already
- I didn't tag anyone here and ask for help. 2. I only asked what I didn't understand. What I did was giving an error. 3.If it bothers you, you can block me so you won't see my messages.
Thank you
Difference of JSON UI and ORE UI?
indeed I will
"I didn't tag (ping) anyone here"
yeah sure
definitely didn't ping me here even FROM the DMs.
You have never tried or has trial and errors, therefore it won't get you anywhere.
hence, you're asking for help everywhere even DMing people which surprisedly, against this server rules.
which, this is not cool. you're just asking to be blocked at the same time somehow muted or kicked here.
next time don't do that. If mods or admins gets involved, its on you.
Sorry for the tag,
How can I use container.crafting? I tried, but what the binding captures is actually the language result. It's quite frustrating if I have to make it in every language.
Help, why i cant use §?
{
"binding_type": "view",
"source_property_name": "(not(('%.4s' * #hud_title_text_string) - 'Test' = ('%.4s' * #hud_title_text_string)))",
"target_property_name": "#visible"
}```
uh you can just do this if you're not specific to the 4 letters.
(not ((#title - 'Test') = #title))
"(not(('%.4s' * #hud_title_text_string) - 'Test' = ('%.4s' * #hud_title_text_string)))"This is supposed to work only when the first four letters are "Test" regardless of the rest of the text, and it works but I can't use § to prevent it from showing in the text.
Can i use bindings on ignored?
no
Hey is there anybody can help me to display custom gui in geyser bedrock ?
so you want to remove the 'Test'?
just subtract it from the title
Are bindings like element display conditions?
Be specific
So, If I were to add a binding for is in creative the element only displays when the player is in creative
And when in survival the element is hidden
Use this binding to ur element.
"bindings": [
{
"binding_name": "#is_creative_mode",
"binding_name_override": "#visible"
}
]
You should delete it
When file says common, it mostly means it's just full of templates that the main UI use. But no, it isnt. And idk either, never played with marketplace UI before.
Nothing is gonna happen
langs are translated after the ui takes place, not before. You cannot use container.crafting, that is the default crafting table. My example uses "test". The binding is crafting_label_text
I find out yesterday that everything isn't running in once, its like gonna run line by line.
JSON-UI works by reading top to bottom.
it's store_data_driven_screen
this also means when there's specific lines that is uh, syntax errors or element is invalid, it'll be like 50/50 working screen and just it.
( e.g if my "world element' thing at line 500 but has some syntax error and such, only 0-499 lines will load. )
Thanks!
I also found out referencing something that doesn't exist crashes the game
Well in server forms, idk the case for other screens
nope that does not happen.
it should throw content logs error unless the element where it was referencing to has critical properties such as anims, yeah it'll crash.
It don't have anims on my case, it literally just crashes the game
mine literally doesn't.
For other screens i guess that's not the case
I don't have any crash issue with referencing failure on all screens.
Game crasher just by opening a formđ new /kick
I mean like i could send the file just to prove it?
even if you send the file, that'll help nothing because I don't do script.
again, if the element it was trying to referencing that has critical properties, it'll crash.
Not existing also included at 'critical properties' right?
Nope.
there's a lot of example of 'critical properties'
having anims property, referencing things in factory or grid
having wrong custom render ID
etc
hm grid is my case
so that's why.
you're referencing stuff on critical properties element so, that's the answer.
alright I see
that's why it was 'critical', since it has potentially to crash your game with any wrong step. so yeah
also clean the log folder often because you don't wanna have one of those 5gb log folder while editing #1067869374410657962
Moving on, I'm confused on how Mojang maintained the responsiveness of each screens.
Tried doing percentages stuff
Adding the ignored on this crashes the gameđ```js
"realms_subscription_panel": {
"ignored": true,
Ain't really workin'
@halcyon spear curse, everytime there's an emoji at a message, defowler will always be there
honestly what could you expect from a decade old data-driven UI?
it wasn't really that optimized since the beginning so
I add đ so my message seem less angry sounding
obviously devices are now upgraded or has more power on modern days so obviously it gonna run smooth
That wasn't I mean- nvm..
what
irelevĂ nt?
you're saying that #1067869374410657962 ain't data-driven?
3 messages above?
what I'm saying is, json-ui exists nearly decade and was already data-driven since.
so basically, it itself was already optimized hence the smooth responsive and better at maintaining larger things, after all it's a modern age.
json-ui was best at low-end hardwares so yeah, but ore-ui isn't really sure.
ore-ui just overheating my phone already and some people has performance issues over it
How can I set the search bar according to the button's name?
Can anyone help me making something responsive?
Basically I have stack panel set up like this.
"stack_panel": {
"type": "stack_panel",
"size": ["100%", "100%"],
// Other stuff here...
"controls": [{
"Elem_1": { "size": ["100%", "100%c"] }
}, {
"Elem_2": { "size": ["100%", "70%"}
}]
}
However the elem 2 isn't responsive based on user device size. It works on bigger screen but not small.
I'm finally make this
add more buttons
like 20/30
and let me know if something happens to this shine animation
im curious what will happen
Does anyone have a template to preserve the text? I'm trying the example from the wiki but it doesn't work
https://wiki.bedrock.dev/json-ui/preserve-title-texts.html
yea its here
Ignore this, fixed it ^^
I've moved further questions to a new post instead
Holy crap youâre actually doing it
json-ui my beloved
WTFFFF ITS BEAUTIFULL
My UI that uses chest GUI is broken in 1.20.31. Anything changed? I was detecting the chest container name
was working just fine in 1.20.10
I didnt use any behavior pack
it's a serverside scripting
the script works fine but the resource pack didn't detect the container name anymore
SHow your code:
How do I make my json-ui code like this?
Do you want to prevent others from stealing your JSON Code? Then, you can use this obfuscator to prevent others from reading your code, this is mainly recommended for Minecraft Bedrock Add-on creators.
Is it possible to create a button that produces a sound on hover or automatically activates when hovered?
Thank You
is it possible to place a button according to its name? (eg: a button named "Mail" will be placed on the far left in a panel and another button named "Apple" will be placed in a panel with the other buttons which are fruits)
Can we put bindings in variable array?
No.
Well sort of.
Yes you can put bindings in variable array but you can't use any operators on it.
i thought this website was down
if what you meant to,...
"variables": [
{
"requires": "$conditions",
"$bindings": [
// binding modules here
]
}
],
"bindings": "$bindings",
then yes
what you can't do is using binding outputs for "variables" condition checks
Can we put binding on requires?
No.
no
try combining them with different #visible's
In your code snippet is $bindings like a variable like const $bindings = ...?
it's like what you did with other properties, example: "ignored": "$conditions",
So it's like an array of conditions to ignore
how do i make player head show in hud like that?
(I have done basic stuffs like adding static image etc.)
can't figure out how to add player's head
nvm found the old thing
no
How can it be done?
normally only values work, but with "$bindings" as i showed here, you can use array
My post huh?
For example:
$myIgnores = [...]
"ignored": "$myIgnores"
yessir xD
does it display the head of another player's skin?, suppose there is another player near us it will display the caption, it is very cool if possible without edit entity.player
where can i learn json ui?
?Jason ui
You can learn more and get started with JSON UI here: https://wiki.bedrock.dev/json-ui/json-ui-intro.html.
Is it possible to study server_form?
Yeah, LeGend has a video about it
How do make the length of stack panel goes to the left side and not in both side? Because when sizing something, it sizes on both side,
What I'm trying to do is adding a text at bottom right of a screen, also the stack panel heavily relies on child size which is the labels,
Now I don't want to use panels because it's not responsive.
Yes, You can watch a video or I can assist!
Take a look! https://www.youtube.com/watch?v=3X9Oq2BvLck
Code: https://bstlar.com/~e/t-b-s-f-c
This tutorial shows how to make a form only show when the title is specific.
Github: @LeGend077
Discord: LeGend#1687
#minecraft
#minecrafttutorial
This is the guy you should be watching
Hi, do you recommend an application or a program to make the json-ui?
Your imagination is the only program i know
There's no specific tool for json ui
Well for China, MCStudio
I don't mean not specifically an application but something to create or how to test how something would look or can you explain to me how to use the offset I don't know what the screen size is
?json ui
You can learn more and get started with JSON UI here: https://wiki.bedrock.dev/json-ui/json-ui-intro.html.
Here's an example of adding a HUD image and text: https://wiki.bedrock.dev/json-ui/add-hud-elements.html#individual-elements
does anybody knows about ore ui
I've noticed that there's a .json file for a debug screen, but I'm trying to figure out if there's a button to access that screen, other than what it says in the file which is slightly confusing, to me, lol
User xKingDark
Okay, I think I understand...
The debug screen is accessible, butâonly if you essentially add extra coding, and essentially create a whole new button image and button code for it
Lolz
Where is the debug screen even located? The start screen, Pause screen, HUD screen?
It's in the UI folder, in the root of the resource pack folder
Yeah, I mean where is the UI used?
I'm not exactly certain, but I'm assuming it's almost like the hood, in the sense of you can enable it in game
There's certain code for it that states that it can display over game, basically
Which is why I'm assuming what I've stated
"access_button@common_buttons.light_content_button": {
Yeah, that's the one thing I'm having trouble finding, lmao
It has code that renders the game behind it, so I'm assuming it's something that you can enable while in a world or on a server
Just has no attached like, code for an actual button or whatever
Which is honestly one of the main reasons why I was confused
"debug_global_screen_panel": {
"type": "panel",
"clips_children": false,
"size": [ "100%", "100%" ],
"controls": [
{ "access_button@debug_screen.access_button": { } }
]
},
But basically all that has to be done is code has to be included that creates a button, and includes a button image, from an image that is in the files of one of the other folders
Does that json snippet seem useful to you?
It sounds like it would be on the main menu screen
Based on whatever debug global screen panel means
"$screen_content": "debug_screen.debug_global_screen_panel",
Hm
Wait, $screen_content would be essentially what it shows on the debug screen, correct?
Yes
"[email protected]_screen": {
"send_telemetry": false,
"screen_not_flushable": true,
"render_game_behind": true,
"is_showing_menu": false,
"low_frequency_rendering": true,
"is_modal": true,
"should_steal_mouse": false,
"render_only_when_topmost": false,
"screen_draws_last": true,
"always_accepts_input": true,
"$screen_content": "debug_screen.debug_global_screen_panel",
"$screen_animations": [],
"$use_loading_bars": false
}
}
Wait, is that all in the screenshot I sent you?
"debug_global_screen_panel": {
"type": "panel",
"clips_children": false,
"size": [ "100%", "100%" ],
"controls": [
{ "access_button@debug_screen.access_button": { } }
]
},
This seems to be where you inset your elements
â
Ty
I will try display the screen!
Kk
Wait
Where was this located?
In the same debug_screen.json file?
Yes
It is like a layer it works anywhere
In your snippet you changed content panel to debug global screen panel
A button and button image just have to be created for it, in order for it to actually be accessed, correct?
Or is my assumption/observation/inferring wrong?
Debug screen just like it said, debug.
This one was primarily used for preview/beta whereas it shows your device name, render name, game version, ram usage, frame per second, GPU/CPU and hardware info via on top-middle of your screen.
This was designed to be always displaying everywhere, and it always reloaded all time
you can use that debug screen and insert elements that cannot be unloaded.
Though that screen has alot of indev elements e.g a build you should never have it.
Well yeah, but am I correct in my assumption that to be able to access it in game, you could hook up a button and button image to it, and it would work?
It may work.
?
I don't understand what you mean by this
Illegal game builds that players like us wasn't supposed to have.
the developer build.
( as well we can't talk anything about dev builds here. )
Hm
Alright
I still don't quite understand how the debug screen can contain other game builds/versions, but okay
I didn't say that?
This
You said that, in response to me asking you to rephrase what you meant
That one was whole different bedrock client like beta/preview, this one was aimed directly for Mojang developers/marketplace stuff.
Debug screen was an tool for that build to have weird or debug stuff.
That's what I'm saying.
So you're trying to say that I shouldn't be looking into it, and shouldn't be trying to make the debug screen able to be accessed in game?
Not really, sure debug screen can only be used to only add elements that cannot be unloaded on stable/release versions
not all developer tools in there, even if it was, it won't be functional in stable/release versions.
Hm
and again, the 'illegal' builds I'm saying was just developer builds and no players should have it.
that one you're just asking to get banned here or likely gets DMCA'd by mojang ( a reminder that mojang employees is here this discord server. )
đ The game crashes when I remove the debug screen elements
When changing the image used for the button that you press for chat settings, when you have chat open, it doesn't change it when I have the pack enabled...
The pack installs correctly, and doesn't show any errors when installed
For the button image:
"type": "image",
"size": [ 14, 14 ],
"texture": "textures/ui/debug_wrench"
}```
For the actual button:
"$button_content": "chat.debug_wrench",
"$pressed_button_name": "button.open_chat_settings",
"$focus_id": "chat_settings_button_focus_id",
"$focus_override_up": "coordinate_dropdown_focus_id",
"$button_tts_header": "chat.settings"
}```
Incorrect referenced element name.
It should be chat.debug_wrench_image
Hm
Hm
Ohhh
Okay
Yeah
I understand now, thank you
Such a minor mistake, but can cause major issues apparently
yeah, everytime you referencing something, make sure the element name doesn't have any spell mistakes or wrong ones
otherwise yeah that happens.
Okay
Tysm
It still doesn't workđ
Lol
Idk what's wrong
Anyways
I'm going to sleep
In progress screen, does preparing global resource resource, loading a world, loading realm is there together? I hope not
it does.
Do you possibly know what should I edit just to modify the loading screen when loading a world or a server/realm?
I want to make the coordinates like this
x: 123
y: 123
z: 123
but the code is like this, I'm confused about how to make it, can anyone help me
"player_position": {
"type": "image",
"size": [ "100%c + 6px", "100%c + 2px" ],
"texture": "textures/ui/Black",
"alpha": 0.7,
"controls": [
{
"player_position_text": {
"type": "label",
"anchor_from": "bottom_middle",
"anchor_to": "bottom_middle",
"layer": 1,
"enable_profanity_filter": false,
"color": "$chat_text_color",
"text": "#text",
"shadow": true,
"bindings": [
{
"binding_name": "#player_position_text",
"binding_name_override": "#text",
"binding_condition": "always_when_visible",
"binding_type": "global"
}
]
}
}
],
"bindings": [
{
"binding_name": "#player_position_visible",
"binding_name_override": "#visible",
"binding_condition": "always",
"binding_type": "global"
}
]
},
Hm
Please donât cross-post your question, try to keep them in your post. đ
ouh, sorry i dont know
When it comes to UI textures, does Minecraft limit the pixel size that the image can be?
Like in the case of the chat settings icon, when chat is open
This is in the Bedrock OSS discord, but I made a post there on how to extract each coordinate from the text: #1115457940472746014 message
How could I change my title.png logo when loading into a mc world?
and is this the right code?
"hud square": {
"type": "image",
"texture": "textures/ui/title.png", // vanilla texture
"anchor_from": "top_left",
"anchor_to": "top_left",
"size": [ 64, 64 ],
"offset": [ 0, 4 ],
},```
Hey, so i got that info but I'm confused on how to pass it on different elements, I was thinking of a stack panel with 3 children, and that 3 children will use each coordinate binding of the parent, is this possible or is there other way? đ¤
You can make one element that acts a control and has the binding which contains all three coordinates. Then you can use the view binding and source control name to pull the coordinate binding you need directly
I would probably make the control element a sibling element and then set resolve sibling scope to true. That way you won't need to ensure the control element has a unique name in the namespace
Huh. I don't follow, how would that work??
You can make a blank panel element which only contains that binding (you can leave out the last one with the text). Say the element name is position_text_data. You can then have a text element with the binding:
{
"binding_type": "view",
"source_control_name": "position_text_data",
"source_property_name": "#x_coord",
"target_property_name": "#x_coord"
},
And then use that binding in your element to display text with it.
What is the use of position_text_data?
To have a binding that stores all the data. That way you don't need to redo the calculations/repeat the binding each time you want to get the coords
I still don't get it sorry, english is not my first language. So do I need to set this on the parent or set it on each children of the parent?
You only need to set it once. It can be the parent element, a sibling element (an element that is in the same control group).
Ohh so children's can use it? Got it.
@whole jasper bng bisa jelaskan apa yg dimaksud ini?
Does anyone have an example of code where it changes the image used for a button on one of the UI screens?
Would like to compare to mine that I have currently, for the chat screen
thanks, now I can create coordinates for the nether, this is very cool
How do you disable or enable it?
Just curious
disable or enable?
Yeah, both of those
i dont understand
How do you stop it from showing that, and how do you get it to start showing it
Disabling and enabling it
Do you have a method for doing that?
i dont understand, my english badđż
saya hanya membuat kordinat / 8 dan memasukan text kedalam root panel, dan apakah yang anda maksud positionnya muncul dengan toggle? - translate
yang ingin saya tanyakan adalah apakah Anda dapat mengaktifkan atau menonaktifkan apa yang ditampilkannya, dengan tombol atau yang serupa... atau seperti, apakah itu seperti sesuatu yang selalu aktif?
I hope you understand, lolz
mungkin bisa dengan toggle, aku belum mencobanya
OH, GREATâYOU UNDERSTOOD ME, LMAOO
Ty!!
Language barriers suck
This(https://youtu.be/K7UyzmmML-g?si=0qbMLdAEXt2ydTH9) should def be in the wiki
Today, I introduce you to the wild world of Minecraft: Bedrock Edition's JSON UI. Enjoy!
Timestamps:
0:00 - Intro
1:10 - UI Files
1:32 - Namespace
1:52 - Elements
2:32 - The Element Hierarchy
3:36 - Phrases
4:25 - "Controls" Property
5:12 - @ Copying
5:54 - Example File
7:24 - "Type" Property
9:08 - Outro
Playlist: https://www.youtube.com/play...
Easier to understand, if learning about the structures and stuff, and the way elements work, imo
In regards to buttons, the closest thing I can find to:
"elememt_name_goes_here"@common_buttons
...would be:
//---------------------------------------------------------------------------
// Common controls
//---------------------------------------------------------------------------
"empty_panel": {
"type": "panel"
},
"horizontal_stack_panel": {
"type": "stack_panel",
"orientation": "horizontal"
},
"vertical_stack_panel": {
"type": "stack_panel",
"orientation": "vertical"
},
"button": {
"type": "button",
"$focus_id|default": "",
"$focus_override_down|default": "",
"$focus_override_up|default": "",
"$focus_override_left|default": "",
"$focus_override_right|default": "",
"focus_identifier": "$focus_id",
"focus_change_down": "$focus_override_down",
"focus_change_up": "$focus_override_up",
"focus_change_left": "$focus_override_left",
"focus_change_right": "$focus_override_right",
"$focus_enabled|default": true,
"focus_enabled": "$focus_enabled",
"focus_magnet_enabled": true,
"$focus_wrap_enabled|default": true,
"focus_wrap_enabled": "$focus_wrap_enabled",
"$button_focus_precedence|default": 0,
"default_focus_precedence": "$button_focus_precedence",
"$button_tts_name|default": "accessibility.button.tts.title",
"$button_tts_header|default": "",
"$tts_section_header|default": "",
"$button_tts_control_type_order_priority|default": 100,
"$button_tts_index_priority|default": 150,
"tts_name": "$button_tts_name",
"tts_control_header": "$button_tts_header",
"tts_section_header": "$tts_section_header",
"tts_control_type_order_priority": "$button_tts_control_type_order_priority",
"tts_index_priority": "$button_tts_index_priority",```(cont'd.)
"sound_name": "random.click",
"sound_volume": 1.0,
"sound_pitch": 1.0,
"locked_control": "",
"default_control": "default",
"hover_control": "hover",
"pressed_control": "pressed",
"button_mappings": [
{
"from_button_id": "button.menu_select",
"to_button_id": "$pressed_button_name",
"mapping_type": "pressed"
},
{
"from_button_id": "button.menu_ok",
"to_button_id": "$pressed_button_name",
"mapping_type": "focused"
}
],
"$button_bindings|default": [],
"bindings": "$button_bindings"
},
"screen_header_title_panel": {
"type": "panel",
"size": [ "fill", 17 ],
"$screen_header_title_visible|default": true,
"controls": [
{
"store_header_title": {
"type": "label",
"size": [ "100%", 17 ],
"offset": [ 0, 3.5 ],
"ignored": "(not $screen_header_title_visible)",
"anchor_from": "left_middle",
"anchor_to": "left_middle",
"text_alignment": "left",
"color": "$title_text_color",
"$screen_header_title|default": "#screen_header_title",
"$screen_header_title_binding_type|default": "none",
"text": "$screen_header_title",
"bindings": [
{
"binding_type": "$screen_header_title_binding_type",
"binding_name": "$screen_header_title",
"binding_name_override": "$screen_header_title"
}
]
}
}
]
}```
âwhich is in the path of RP/ui/
had to put extra notes here â to properly reference the element, make sure look up the element namespace and use it properly.
namespace is optional when it comes into same file but, it's better to use that way.
I'm not trying to use it, I'm actually just at the moment trying to find where the common buttons are listed
There's no specific texture file for the pause button when in game, and I'd like to know why, or where it's pulling a texture from for the pause button
Button template has textures by default and heavily being referenced to all buttons.
There's 2 various of button textures, light and dark buttons.
Dark button seems to have larger customization than light button since light was already has preconfigured whereas dark does not.
In one of the GUI files, in RP/textures/gui/, there is a PNG with multiple different UI textures on it, but I'm not sure how that is used to pull the texture for the pause button from
If you're referring to touch mobile pause button on top-middle screen thing
I think the pause button is one of the darker ones
They're hardcoded inside the game files
Yes, mobile pause button
Do you happen to know what the screen is called where you're in-game?
which one?
Like, actively playing
in-game huds?
hud_screen
I've been looking for a while, and can't figure it out
Thank you, I'll take a closer look at that
and again, if you're looking for mobile touch controls thing, it's hardcoded and cannot be edited.
It's remotely not json-ui
What if I'm wanting to add a button?
Hud screen contains hotbars, hearts and most HUD related things
Or change the texture for one of those touch controls?
That's not how json-ui works.
And how come there are pictures connected to buttons on the chat screen, like the gear image friends, but you can replace the file of with a different image?
you can by changing the textures only.
You're mixing hardcoded things with json-ui right now.
Could you add a button as well, though, if you wanted to?
You can, but again
It won't be functional.
you can only use the existing button IDs
I understand that part, that's how you wouldn't be able to change the way the button looks when in-game
Bruh
Bedrock is so limited
You can't expect JSON-UI to be THAT customizable
Hm
We don't have official docs from Mojang whatsoever
If there's a button listed, is it possible to just add a texture to that listed button?
Like, for instance access.button
you're asking too much honestly
you can add custom buttons if you want
like add a custom textures, put a icon on it or put the whole elements on it
again, it won't be functional since you're "overriding/modifying"
not adding them, you can't add new stuff to JSON-UI and that's how it works.
you can change some screens into whole different other than vanilla if you want, again. it's just reskinning at this point
Okay, so I have one last question for now
you can't expect to somehow add a new button ID and expecting "hey this should give me a new screen"
that's not how JSON-UI works.
JSON-UI is already deprecated, don't expect more from it.
One thing that I'm seeing across a few different screen files, is elements with "@common_buttons" as the second part of it... could you maybe explain where the second part is derived from?
ui_template_buttons.json
Hm
I'll take a long look
Tysm
Okay, yeah, this makes so much more sense, now that I know what file that it's actually pulling from, lolz
U can actually make custom button ids
You can with visibility related property.
and 'play' animations.
though still, you can't create a new things from that e.g screens.
Does anyone know where I can find the experience bar texture? and what's the file name?
But if you can create a new button id, can you create a new button that does things for a screen that already exists?
I believe it's in "RP/textures/gui/spritesheet.png"
How can I modify the color format of §9?
How would I go about doing this?
#1160275807076368424
Might want to delete this before moderators see that message, You may get warned, I wouldn't want that to happen!
Can anyone tell me how to solve this problem of the book recommendations not appearing?
Nice! Glad you got it working đ
No
And stop pinging me
"title_message": {
"type": "label",
"anchor_from": "center",
"anchor_to": "center",
"font_size": "large",
"text": "#text_a",
"alpha": 1.0,
"bindings": [
{
"binding_type": "global",
"binding_name": "#hud_title_text_string"
},
{
"binding_type": "view",
"source_property_name": "(#hud_title_text_string - '%.3s')",
"target_property_name": "#text_a"
}
]
}```
Help
Is this supposed to return the text without the first three letters?
I'm pretty new to bindings.
You want to do (#hud_title_text_string - ('%.3s' * #hud_title_text_string))
Why dont work? everytime show unknow image
"glyph_text": {
"type": "image",
"texture": "#glyph",
"size": [
"100%",
"100%"
],
"anchor_from": "center",
"anchor_to": "center",
"alpha": 2.0,
"layer": 2,
"bindings": [
{
"binding_type": "global",
"binding_name": "#hud_title_text_string"
},
{
"binding_type": "view",
"source_property_name": "('textures/ui/Black')",
"target_property_name": "#glyph"
}
]```
@jolly rock
The value "$" Should not be Used?
that's right
@idle anchor Âż Âż Âż what did you do
what
The entire "bindings" rendered useless
$play_screen_size hardcode?
You can change it in ui_common.json find "base_screen"
It's in line 5995
wow, thanks