#JSON-UI General
1 messages · Page 44 of 1
yeah, people actually bug reported this but turned out was flagged as WAI and they mentioned about settings adjustments on their changelog.
wai?
"Works as intended"
basically it's intentional.
been like that since i think couple of .100 previews, they left a feedback page that does absolutely has nothing on it so people can't post a feedback
it's still here in latest preview.
I doubt that they're gonna fix this though tbh, i mean look at sounds settings.
it's been like that for years now.
they added it to make people angry so they have now reason to change it to new design because current sucks
change my mind
they added it because the json UI team needed a way to somehow milk mojang before it switches to ore ui
i code json ui in one line
Whats the ninesplice to the inventory?
funnily enough, if you manage to open the chat screen and do /ride. You can move around while still in death screen
just in a boat or horse tho
interesting
yeah indeed
the bug where players can get stuck in death screen after pressing respawn, that was once fixed when the screen was still json ui, now came back because of ore ui
can use other entity renderer?
for example armorstand in smithing table, i want to take anim time only
How do you display multiple titles?
uhh idk
preserve title text https://wiki.bedrock.dev/json-ui/preserve-title-texts
Could anyone help me with adding ui to forms pls?
I'm pretty sure that i placed the load order correctly because the optional addon has an alternate texture too and it displays properly.
Emmm.. This channel is for User Interface (UI), not for blocks
sorry it's because i was messing with json that i thought it was the right place. my apologies
Np
hey, someone can tell me why my button is not showing the pressed texture? 🤔
And theres some way to prevent button closing the form?
idk but what im doing is calling the form again after clicking a button
Yeh, ik, but it should be another way than that
just have it open another form
like the same form
nvm someone ready told u
Welp, no other ways than that then.
I have a complicated but geometrical animations (resizing, moving, rotating animations)
My designer was gonna do the animation and send it to me but the issue is that the animation would take 60 frames
If I convert that into a flipbook animation (which is the closest thing to an animation in minecraft), 60 frames is HUGE and will take so much space in the texture pack
But since this is geometrical, would it be possible to use json ui's animations? As I said, the animation is geometrical, so I just need translation, rotation etc
Another thing I'm worried about is that I am bad at making animations myself- I'd only be good replicating existing animations
In that case, is it reasonable to let the designer make the animation anyway and I'd start trying to mimic every frame of that animation into json ui animations?
I don't know what to do and all of this is because json ui doesn't support GIFs which have MUCH less size than 60 separate frames..
nope rotations arent a thing
youd just have to use flipbook
or some entity thing and display it
Ohhh smart
hmmm flipbook vs asprite
What would the binding be if i wanted to get the first 10 characters of the title for a label ?
something like this
('%.10s' * #title_text)
https://wiki.bedrock.dev/json-ui/json-ui-intro#format-specifiers
no. that part ik
i mean the full binding
btw, you mean server form title?
... noooooo hud title
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_type": "view",
"source_control_name": "#hud_title_text_string",
"source_property_name": "('%.10s' * #hud_title_text_string)",
"target_property_name": "#text"
}
]
try this
doesnt work
idk whats wrong with dis
oh wait try that again, i forgot the binding_name
btw, are you using preserve title text?
still dont work
.
if so can you send your current code?
uh its kinda kinda to long i show u a short snippet which is just repeated
{
"bar_0@health_bar": {
"size": [
0,
9
],
"uv_size": [
0,
9
],
"$condition": "§h§0§0",
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_type": "view",
"source_property_name": "(not((#hud_title_text_string - $condition) = #hud_title_text_string))",
"target_property_name": "#visible"
}
]
}
},
{
"bar_1@health_bar": {
"size": [
5.5,
9
],
"uv_size": [
5.5,
9
],
"$condition": "§h§0§1",
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_type": "view",
"source_property_name": "(not((#hud_title_text_string - $condition) = #hud_title_text_string))",
"target_property_name": "#visible"
}
]
}
},
thats just reapted to make it longer
hmmm idk but you can use this as your guide
{
"mana_text": {
"$update_string": "mana:",
"type": "label",
"text": "#text",
"layer": 1,
//"shadow": true,
"controls": [
{
"data_control": {
"type": "panel",
"size": [
0,
0
],
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_name": "#hud_title_text_string",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string = #preserved_text) and not ((#hud_title_text_string - $update_string) = #hud_title_text_string))",
"target_property_name": "#visible"
}
]
}
}
],
"bindings": [
{
"binding_type": "view",
"source_control_name": "data_control",
"source_property_name": "('%.25s' * #preserved_text - $update_string)",
"target_property_name": "#text"
}
]
}
}
this shows the first 25 characters of the title text
that dont work for me 😭
i wonder what will happen to server-ui after oreui
🤷
how to fix this?
//button image layer = 10
{
"image": {
"type": "image",
"layer": 10,
"size": "$icon_size",
"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"
}
]
}
}
//hover layer = 100
"[email protected]_text": {
"layer": 100,
"ignored": "$default_state",
"property_bag": {
"#hover_text": ""
},
"bindings": [
{
"binding_name": "#form_button_text",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "#form_button_text",
"target_property_name": "#hover_text"
}
]
}
idk I have this and it works
increase hover_text "layer" even more
i tried 2000, still the same result
so it's probably because of how you put hover_text and image, since i didn't get where you put it
ill send it later, im not at home atm
layers order need to be in your second controls:[]
-# inside it, not like how the comments show
does MessageFormData uses long form
modal_dialog_popup from popup_dialog.json
thank you
What do I need to add again to make a button return it index value?
in ActionFormData
nvm I got it
Hello, I created a button in JSON UI in the chat_screen. Is it possible to run a command without clicking on it?
If I had 20 labels, each with 20 binds, would making one common label that they all call from improve performance?
I see Hex colors chat message in a server someone know how to reproduce something like this ?
many, many custom glyphs
or each letter has vec4 for r,g,b,a value to set it through UI - I dont think so
it would look
t(0.5,0.2,0.1,1)h(0.2,0.6,0.5,1)i(0.5,0.2,0.1,1) and so on...
or entities
how entries in chat screen
or wait is it even chat screen?!
wym just split up chat text, apply it to entity in message and display entity
Feel like this is an entity ngl
it certainly does not look like bedrock's text renderer to me.
It has java's italic font, Uses java's item stats.
it's likely that a custom entity that summons behind the player (pretty much the same technic where you put a chest behind the player and make them open)
rendered by the UI which is something you can do. (commonly used on server forms, but work with other screens too.)
"gradient" while the first "a" is ironically off
is there any sample code of a personal sidebar that can be updated every second without a use of titleraw?
How to run right click with only RP
hi there, do someone know if is possible to make the common.close_button selectable by console? I play on PS and it doesnt allow me to select it, but on PC it works fine to close the window
is there a way to change the color of text shadows?
Is there any way to completely disable third person perspective?
Uh how?
idk tho, but it locks third person perspective 😂
/camera @s set minecraft:first_person
like this??
Exactlyy
So this permanently set the player's perspective to first_person?
yes
awesome
[UI][error]-----------------------------------------------------
Unknown properties found in def[hud_title_text] from namespace[hud]
- Unknown property [orientation]
----------------------------------------------------
[UI][error]-----------------------------------------------------
Unknown properties found in def[hud_actionbar_text] from namespace[hud]
- Unknown property [texture]
----------------------------------------------------
after modifying hud_title_text and hud_actionbar_text, how can i ignore this error?
turn off debug
Then you're trying to override Minecraft's Json-UI objects, you sometimes can have a merge effect, that is, annotations and unoverrided properties of the initial object are still there. To fix that, override both orientation and texture properties with default values (empty string should be enough)
Does anyone knows how to make this button opens the how to play section only when doubl_pressed {
"namespace": "general_section",
"how_to_play_button@settings_common.section_toggle_base": {
"$toggle_view_binding_name": "how_to_play_button_toggle",
"$glyph_texture": "textures/ui/how_to_play_button_default_light",
"$glyph_color_texture": "textures/ui/how_to_play_button_default",
"$glyph_size": [ 15, 15 ],
"$button_text": "menu.howToPlay",
"$toggle_property_bag": {
"#panel_title": "menu.howToPlay"
}
}
}
I thought it was normal if you're on pc
because pressed button texture only appear if you using touch control and hold the button
I dont think so ,im on pc and it doesnt show
have you tried it on touch mode?
Nope
then, you should try it
as I know, keyboard & mouse control doesn't show the pressed button texture (except Ore UI)
except a few button does show a pressed button texture like dropdown
Oh i see
It's just that button actions get executed on mouse down event (mouse up for OreUI)
So the form in this case closes before the button can show it's pressed texture
If you make a button that does nothing, you can actually see the button's pressed texture
Oh , ok thanks
oh hey thats me
ahah hi
how do i remove the "an error has occurred."
i had to move my text above, because if i dont, they get overlapped
man offset is so confusing
is there a way to modify start_screen buttons
Someone can tell me what is the toggle_hover referenced as binding in toggle???
Hi all. How to get item name color like §f or someting, want to change the texture depending on the color of the item name
is there a way to render an entity with a fixed x rotation?
What type of renderer are you using?
Paperdoll, live, etc.
Because im pretty sure you can choose a starting rotation for some of them
Well, I want a static image of an entity. I have tried to use the live horse renderer but I couldnt get it to following the cursor, and when I tried the paperdoll I couldnt get it to display the entity.
Ah yeah. Im not too sure about horse renderer stuff, I haven't used it before, and I doubt stuff like "rotation_x" and that would work
yeah i tried the rotation x but it wouldnt budge
the rotation of camera did...
but i need it to face the right side.
if it would work, can you display paperdoll as an entity?
i dont really know how to display paperdoll as an entity
I have a tpack that has /ui and /textures
Is it possible to put /ui in its own texture pack and /textures in another texture pack?
I'd say sorta?
If you were to use/generate a player then apply a custom geometry to the player.
Then you'd use the player id to render it in the ui
Imma say yeah? I can't really see why it wouldn't allow that
guys, how can I divide the text of the button?
cuz using "\n" set the text to standart one
If you set the max size to like ["90%" , 20 ] (or some sort of size) itll wrap iirc
I dont think so. You type in the texture path like textures/...
and the root is always the same resource pack so possibly not. Unless you can change the root
Theres no size on the text
I see. thanks!
Add it then..? :p
Ill try
I think you can override textures. To say for sure, you would need to test it.
"max_size": ["90%", 20]
Gotcha
Also can you check our dms?
It works, thanks
Yeah np
How can I make a "stamina" bar like this?Or better yet, boy, how do I connect it to my SCRipt? How do I do it so that it depends on a scoreboard and the stamina bar goes down? I don't know, can anyone give me an idea?
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
https://discord.com/channels/523663022053392405/1406920017785913405
its work to preserved $actionbar_text
can someone explain to me what a collection is
You can attach more than one title, for example, I have an active interface with one title, but I have a stamina that has another title, but when I run another title, the previous one is deleted and removed The content
Do you perhaps know what the #entity_type: "player" | "npc" binding does?
Nope
I shot you a message. Would love to work with you.
can any talented server form UI developers DM mé, im looking to pay decent money for some custom forms:)
This UI help channel has literally become a hiring server.
this server should add one
it would benefit it alot
no
also ive started a commission with someone already so ty to like all 10 people who dmed me 😭 🙏
Please read the rules
This discord isn't suited for finding or offering paid work. We can't moderate these transactions, so we ask that you move to a more suitable place.
For a casual discord community, consider joining Skill Share: https://discord.gg/sZ7fkcN.
Find incredible people. Make beautiful things. A home for crafting your career in the Minecraft industry.
faq not rules
no need to take discord this seriouly gango, what im doing doesnt affect you
tbf he's got a point
What element handles the item currently held in the cursor in inventories?
I feel like im being blind xD, i cant figure out what it is
If I remember correctly it's flying_item_renderer
How to hell change item tip background texture in UI side, rn i'll find 3 file which uses this texture
Changing to mine custom named texture didn't work
textures/ui/purpleBorder should be were its at iron do u mean changing the texture path name but not edit the texture?
.
Is there any other version about this modal form?
as I know, there's a one button version and also three button too. But I'm not sure how to get it and what script should I use.
They made MessageFormData only for 2 button layout
You cant
sad 😔
Use action form
why rejecting calmly
it's part of popup_dlalog, it's recommended to clone them instead of overriding vanilla
It is a love confession
How do you open a custom chest_screen? For example, when it has the name jobs.paliers, it opens with a behavior pack or a command.
it uses nine scale so you would prob js modify it
lmao
i wouldn't reject that 271Trillion
You know, that's a corruption money 💀
oh nvm
How can I add the score here or is it not possible?
i can use percentage for offset right?
so basically i want to offset a stack panel that has a height of 100%c into 100% or the endmost of the stack panel (for anims purposes), how can i do that?
it works with -100% but not in a way that it offset up until the end of 100%c
{
"itemstack": {
"type": "stack_panel",
"size": ["100%", "100%c"],
"offset": [0, "-100%"],
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"factory":{
"name": "buttons",
"control_ids": {
"button": "ec_spin.itemvis"
}
},
"collection_name": "form_buttons",
"bindings": [
{
"binding_name": "#form_button_contents",
"binding_name_override": "#collection_length"
}
]
}
}
"dynamic_button": {
"type": "stack_panel",
"$size|default": [
48,
32
],
"$text": "#form_button_text",
"size": "$size",
"variables": [
{
"requires": "(not (($text - '§T§Y§P§E§1§r') = $text))",
"$size": [
64,
32
]
}
],
why is size not working? am i using the wrong variable?
if only
Definitely agreeded with ur point abt
is there a way i can use nineslice for flipbook images
eg animated frames that are sized 18x18
Are dynamic interfaces a thing that exists?
Is it possible to change the texture of an element based on a variable?
I have a cursor following input panel, inside of a scrolling panel, does anyone know if theres a way to make it so it isnt clipped inside?
Maybe try "allow_clipping": false on the input panel
how to make nineslice json file
Looking for custom server form dev again, 2 people have cancelled, can pay. Dm me
Oh yeah forgot about that, I’ll give it a try thanks
Isn't this from dingsel's tutorial
My grid has extra buttons until it reaches button 6, which is the maximum, what do I do?
"grid_buttons": {
"type": "grid",
"grid_rescaling_type": "horizontal",
"anchor_to": "center",
"anchor_from": "center",
"size": [96, "100%c"],
"maximum_grid_items": 6,
"grid_dimensions": [3 , 3],
"collection_name": "form_buttons",
"grid_item_template": "many-npc.dynamic_button"
}
£60 per 🤗🤗🤗
Damm
Not worth
😢
F
????
Try adding the bindings for maximum grid item rather than setting them directly
?
{
"binding_name": "#form_button_length",
"binding_name_override": "#maximum_grid_items"
}
If you mean you don’t want it to go bigger than 6, half the stuff you have on there doesn’t even do anything lol
thanks, I was too lazy to do 1 bindings lol
finnafinest hasn't narced on you yet? That's crazy
love the 7,628,646,548,813th server form that looks like recolored ore-ui
how can i replace server form button's texture image with something else if it's texture is missing? (not by replacing the missing texture image)
like bindings if possible
no idea whats this
fr 😭
Actually he did, the first time xD
The layout is just like the one in the video. Just re-textured
that's interesting
maybe it's reason why I saw many similar ones
however speedrunning it it around 1/1.5h is not that bad
🔥Topics covered in this video:
JSON UI Variables
JSON UI Sizes and Scaling
Bindings in JSON UI
Server Forms
Custom Buttons
🔗Links :
Last Video Part: https://youtu.be/zWecyvsbKHY
Join My Discord! : https://discord.gg/tzrmH56JXC
My Website And Code: http://skyls.de
JSON UI docs : https://wiki.bedrock.dev/json-ui/json-ui-intro.html
Vanilla ...
You can see from the thumbnail
He also made a tutorial on texturing the form
yea its similar
everything I see here is
and dingsel video at the bottom instead of ffmpeg
lmao
lol
Any ideas to fix those stripes between characters?
excel in minecraft before gta 6 😳
You're trying to display the world through this!
That's awesome
Why not use squares
Are all these buttons?
nope they re glyphs
basically yes im trying to do a map where you can just go and see how you world look like and find biomes
i don't think you can do anything about it
That's what i came up with for now
I think you can get rid of those spacing between lines adjusting "line_padding"
i alredy tried but it fixes it only vertically
i prefer having squares than having stripes
how do you prevent hover_text_renderer from overflowing off the screen
Im not home rn
Maybe allow_clipping: false
no that didnt work.
like it doesnt fit inside the window of minecraft
Show me your screen
Maybe your text too big
Happens in craftersmc
Sometimes you can't read some items cuz of big text
source code ? please
Simply, you can use body text (or I called it Description Text) as the score
anyway, Is it possible to display 20 line in scoreboard? and does the scoreboard can read the 20th index (index 19)?
I haven't tried that myself
why not trying with custom emoji glyphs? it's the only way to get text overlapping, which can fix those stripes issue
{
"profile_grid": {
"type": "grid",
"collection_name": "players_collection",
"grid_item_template": "hud.profile_name",
"debug": "yellow",
"maximum_grid_items": 1,
"size": [
"40px",
"100%"
]
},
"profile_name": {
"type": "label",
"text": "#gamertag",
"debug": "red",
"size": [
"100%",
"100%"
],
"bindings": [
{
"binding_type": "collection",
"binding_collection_name": "players_collection",
"binding_name": "#gamertag"
}
]
}
}
any clue why this does not display the gamertag?
It alredy uses glyphs
i see, maybe making it a little bit bigger?
as i saw a pack that adds block glyphs but those glyphs are bigger than normal, by 2 times the standard text size
that kinda sucks, just use images on a grid
to hopefully help it perform better and you can customize the padding between
can yall tell me if players_collection only works in the pause screen?
It works in hud screen as well
but my goal is to make them small
but i think they re fine honestly
does it work in server forms?
No
WOW smart people
Do you save the color and position of each block? Does it update after breaking a block in a distant area?
is this glyph font?
Does render custom blocks?
Much more optimised than that
Doesn’t render blocks
Fr
Yes
What?
Wecuz funni
||pênis?||
💀
What's the variable to get the actionformdata title text?
#title_text
thanks
this isnt working what should i do?
"$titletext": "#title_text"
(ping me)
im going crazy json ui is so ass
How are you using it?
i need to read the title text to make the characters of the body of the actionformdata smaller
I meant the code
Try adding the binding for it
{
"binding_name": "#title_text"
}
Yeah
nope text is still the same size, no errors
i just used
new ActionFormData()
.title(`§T§Y§P§E§4§rWorld Map`)
You won't really get any errors
Sometimes using bindings in variables doesn't work as intended
so there is not a fix for that?
It always return small
in game it never does
number changes the scale of the text and the type is to make the font small yes
yes the main label
i need to change the .body() not the .label()
In your code i dont see "font_size": "$font_size"
How about using some property bag values and bindings
There are #font_type and #font_scale_factor bindings right?
I think no
I've seen them in vanilla files but didn't try before
yes
i need it to make base forms also work when my addon is installed and also change size couse 75k characters in a form might make some device crash
why are bindings that hard to use?
Try using this and see if font scale changes
"property_bag": {
"#font_scale": 0.15
},
"bindings": [
{
"binding_type": "view",
"source_property_name": "#font_scale",
"target_property_name": "#font_scale_factor"
}
]
yeah it works fine
Well, then you have a solution to your problem
Do some logic in the source property name to achieve what you want
You can add more values in the property bag
wait a second what do you mean by logic
i do have to do the same thing as "requires" but in property name?
Yes but you'll need to modify that to do something similar to if else
fontscale: "(not (#title_text - '§T§Y§P§E§4') = #title_text) ? 0.15 : 0.30"
something like this in the property bag?
You can define property bag value like this:
"#§T§Y§P§E§2": 0.6
Then in source_property_name: "('#' + '%.15s' * #title_text)"
It should work but I'm not sure
Ternary operator doesn't exist in JSON UI
what is that %.15s *
Gets the first 15 characters from title text
json ui is so weird
can i ask you why 15 characters?
§ counts as 2 characters so §T§Y§P§E§2 is 15 characters
oh
Thanks a lot mate
Did it work?
yes
Honestly I wasn't so sure because of the § character
Glad it worked
@manic dragon
"property_bag": {
"#§T§Y§P§E§1": [
"20%",
32
]
},
"bindings": [
{
"binding_type": "view",
"source_property_name": "('#' + '%.15s' * #form_button_text)",
"target_property_name": "#size"
}
],
"size": [
"100%",
32
],
for size it doesnt work like that right?
can json ui access entity properties?
Nope
What’s the best way to learn json ui?
Reading docs, samples and trying out new stuff
And reading vanilla files
where do i donwload good auto completions for json ui in vscode?
Can anyone help me with my UI problem
How can I add a scrolling panel so it can support how many buttons i wanted
https://marketplace.visualstudio.com/items?itemName=LeGend077.json-ui-auto-completions
https://marketplace.visualstudio.com/items?itemName=Dingsel.bedrock-ui
Extension for Visual Studio Code - This extension adds some auto completions for Minecraft Bedrock JSON-UI creators to faster their work.
I heard minecraft 1.21.110 will break some json ui code. Is that true?
How can I define the color of my custom bar?
"custom_bar": {
"type": "image",
"texture": "textures/pokemon/ui/ore-ui/buttons/button_header_light",
"size": [128, 8],
"color": "#color",
"clip_direction": "left",
"clip_pixelperfect": false,
"$max_value": 100.0,
"$min": 1.0,
"$string": "('%.10s' * #form_button_text)",
"bindings": [
{
"binding_type": "collection",
"binding_collection_name": "form_buttons",
"binding_name": "#form_button_text"
},
{
"binding_type": "view",
"source_property_name": "($min * ($string - '~'))",
"target_property_name": "#value"
},
{
"binding_type": "view",
"source_property_name": "(($max_value - #value) / $max_value)",
"target_property_name": "#clip_ratio"
},
{
"binding_type": "view",
"source_property_name": "(('%.10s' * (#form_button_text - $string )) - '~')",
"target_property_name": "#color"
}
]
},
Just change the texture
I'm avoiding using +1 texture '-'
without the bindings it works without problems, with the bindings it doesn't work
i dont think u can use #color like that lol
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_type": "view",
"source_property_name": "#hud_title_text_string",
"target_property_name": "#text"
}
] this is a binding to apply title text to my label but how can i edit the text before applying?
bruh,-,
Worse still, it was working, in the title, the only thing that doesn't work is the form.
Hi guys, how can I disable the esc function in server_form.json?
i dont really touch UI. But does someone know if i can enable the crosshair for specific entities when riding them?
You can just use /hud I’m pretty sure
Is there any tools that can help me slicing a string 🤔
Slicing like what? A texture?
text slice using bindings
Dunno ig
brah
Omg i thought of the same thing. A website that will make slicing text way easier. That would be cool
I think you have in main screen content element in server form button mappings. Delete those and you won't be able to exit forms
No one has ever built it?
fine. I'll make my own
ummm... any docs available?
nvm, found it
It's called Text Formatting, but I called it text slice 🤦♂️
that should work
oh, someone already make this on javascript. I guess this is not needed
is it more advanced?
Something that will make stacking multiple information inside one button more feasable
Can someone please help me with issue with server forms progress bar? It's in post
im interested, can you explain a tad bit more please?
Nope. It still gives a basic output
hmm, if it would be more advanced it would be very helpful in development.
might start a project like this if nobody would do it
Maybe tomorrow I'll continue advanced this
I am sick btw
Oh yeah, can you give me any example about string formatting? Maybe I can create one of thoose
So far, this is what I can make. Idk if this correct
Omg I though it was a Job application for a moment 😭 💀🙏
haha, I'm too lazy to style this form
maybe I'll keep this to jumpscare other people :p
Okay thanks 👍
I'll show the progress in #off-topic
ty bro
Looks fine
umm, is it possible to add that screenShot button to the hudScreen?
no, just use a physical or virtual f2 key
Does anyone know what carousel_label is?
I saw it in ui_common.json but couldn't use it
rotatable text? not sure
it is Legacy, so not sure if it is usable
It's not usable I think
seem so, no screen is calling it
Also no other screen has any element of this type
a text that used to be rotatable. though it was used probably during early json-ui days, but eventually it got replaced by renderer.
Was it used for the splash text?
i think they're pretty much been removed or something since they don't work anymore and throws a content logs that this type of element does not exist.
Yeah, they are.
I've seen someone rotated text with this element type before, but that's like couple of years ago.
Yeah I was thinking about using it for rotated text. But ig there's no luck with this
literally no one used that cus that wasn't even used below 1.0.0 versions
thats probably just paper doll tricks
does json ui bindings support text as boolean? like (($var1 or $var2) = true)?
you mean strings "true" and "false"?
like i cant add a button to the hudScreen just to take a screenShot.
at least i can do something to take a screenShot, but making it useable in my idea might be impossible
not possible
-# my idea was taking a screenShot from the game and use it ingame, like those java mods but for bedrock, yeah i think thats near impossible,
yes, something like that
and I need confirmation about this
would be easier and faster if you would try it yourself tbh
for some reason i ignored it lol
i dont quite understand this lol
me neither
I'll fix this tomorrow. json bindings is a bit weird
Can anyone tell me why this isn't working?
"health": {
"type": "image",
"$value1": "[inCombat]",
"$value2": "[inSafe]",
"size": [
218,
25
],
"texture": "$texture",
"bindings": [
{
"binding_name": "#hud_title_text_string"
}
],
"variables": [
{
"requires": "((#hud_title_text_string - $value1) = #hud_title_text_string))",
"$texture": "textures/ui/xubis/health/healthInCombat"
},
{
"requires": "((#hud_title_text_string - $value1) = #hud_title_text_string))",
"$texture": "textures/ui/xubis/health/healthSafe"
}
]
}
have you tried using bindings before?
as far I know, ((#hud_title_text_string - $value1) = #hud_title_text_string)) will return a boolean. but I'm not quite sure this is work in variables
I recommend to use string formatting for this case
it would be something like this
Bindings don't work inside variables array
Do it with bindings only not variables
pls help me
why is the text not displayed on the buttons
"type": "stack_panel",
"size": ["100%", "100%"],
"orientation": "horizontal",
"anchor_from": "center",
"anchor_to": "center",
"collection_name": "form_buttons",
"controls": [
"text": {
"type": "label",
"text": "#form_button_text",
"layer": 32,
"color": [1, 1, 1],
"offset": [0, 0],
"anchor_from": "top_middle",
"bindings": [
{
"binding_name": "#form_button_text",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
}
]
}
}
is this a grid button?
no
and, is that golang?
java
ok, there must be something with the button text
I took this as a basis https://skyls.de/samples/ui5/RP/ui/server_form.json
A Personal Code Sharing Website With Various Tutorials For Minecraft Bedrock JSON UI, Scripting API And More!
because there was no time to create from scratch
can I see the whole code of "custom_button"?
I think I know
and what is the mistake?
"text": {
"type": "label",
"text": "#form_button_text",
"layer": 32,
"color": [1, 1, 1],
"offset": [0, 0],
"anchor_from": "top_middle",
"bindings": [
{
"binding_name": "#form_button_text",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
}
]
}
try moving this outside the "panel_name" and set the layer like 1000
ok, thanks. I'll try it now
it just for testing btw, if it still doesn't appear, that mean you need to change the entire custom button structure
because the text won't appear if there's no texture available
🤦♂️ took me long enough to realize
ok, let me modify the code a bit
brah
Thank you very much
at least it shows the text
I think I can fix it myself
Really quick the title bar is in hud_screen.json right?
Yup
It is possible to do something similar to a progress bar but have the red flag move based on the value of a variable?
It's possible, but you must create the texture for each progress
from 0% to 100%
I see, that's not what I want.
🤔
yea there is, however its really anciet and idk if anyone have idea how to do this
without ^
If you use binding it can be done using #anchored_offset_value_x
wouldnt it go beyond element width?
or well actually there might be some tricks to adjust it since its percentage
yea you can always adjust it a bit
tes
whats the difference
OHH, the color of the bar
red one is better
Yep² 😅
Thank you for your response sir
np sir
tho i have a question to everyone
do i need to use toggles to open a screen after clicking a button in pause screen?
i want to use a button but how do i open a screen clicking?
nvm mojang has common_toggles.light_text_toggle which is a button but as a toggle so no need to code a button toggle from scratch
Where do i edit the position of the title bar in hud_screen? I found 76 results but im not the best at json ui so idk 😭
{
"hud_title_text": {
"offset": [ 0, -19 ]
}
}
i think thats how
Yeah they have templates like that
These are based on light_template_toggle. So that'll give you much more control
Found it! Line 2122
hud_tip_text_background, is this the background of the title bar?
is that the inventory screen background image?
I assume its used in multiple other area's though right?
I think so yeah
Hm cool!
Is this right too?
you mean as a texture file or json ui element?
Ah cool! Tysm
Hi, how can I set a custom hover text instead of #form_button_text ? For example : set the text to "Test" if I have "$hover_text": "Test" and if I haven't use the default value which is #form_button_text
"[email protected]_text": {
"$hover_text|default": "#form_button_text", // Currently not used
"bindings": [
{
"binding_name": "#form_button_text",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "#form_button_text",
"target_property_name": "#hover_text"
}
]
What's the difference between MinecraftTen and MinecraftTenEmoticon fonts?
Maybe the creeper face in some letters
Tried with capital and small A but no creeper face. Or it requires a special character?
Only thing I noticed is that the size is a bit smaller than MinecraftTen font
where did you see "MinecraftTenEmoticon"
Saw it in a warning in vscode
It was something like this: Value is not accepted. Valid values: "smooth", "MinecraftTen", "MinecraftTenEmoticon".
it is only mentioned here
C:\Program Files\WindowsApps\Microsoft.MinecraftUWP_1.21.10101.0_x64__8wekyb3d8bbwe\data\resource_packs\vanilla\font\font_metadata.json
So it's just MinecraftTen?
probably
Wait it's possible to use any custom font in Minecraft?
i got mixed answers asking that, someone said yes while another said no
this is poppins
that is a ttf font?
yes
how?
i haven't looked into that stuff
weird
be warned that custom .ttf fonts is experimental.
you can load up packs that uses custom .ttf font, but the game will have to be restarted for it to fully apply.
since the game will cache it, turn it into spritesheet for whatever reason.
you can replace the existing .ttf fonts but it will be there permanently until you clear the cache.
ngl that seems like a pain
it is, that's why it's experimental.
you can't even get the font_metadata.json in the sample pack, and there's absolutely 0 document on this thing too.
you can only get that file by the game assets itself.
i will stick to glyph if that so
it doesn't even have the font folder
yeah that seems like a better choice
gotta use something that isn't experimental in the UI space tbh but yeah. not worth it
i had a site that turn ttf to glyph but i lost it
can't load the packs in the server-side anyway since you need to restart the game for it to cache and use them.
the game will NOT cache anything if you apply it right now so yeah
mc glyph generator
yeah, thanks
also be warned about glyphs too.
lol
you can't use big fonts on this
or literally anything that is beyond 256x without making them extremely big for whatever reason
yeah, i played around a bit with that idea trying to remove the gap between letters
i did a funny thing with it when i don't even know about JSON-UI
a question about a bad idea i had.
i have a script api addon that cancel chat messages and perform some changes to each letter, how bad can performance get if this was done in json ui, if possible to start with
you just make the glyphs about 2048x and fill it with black color just to make a transition thing
this however, lags or even crash people devices alot.
shouldn't be bad.
chat messages are based on factory.
it is a lot of conditions
this means that element does not exist until you say something in the chat.
you just use that template element and replace stuff whenever you feels like it and the performance wouldn't drop.
also when the chat is completely faded out, the said template element gets eradicated from the memory anyways.
so performance wise, it's shouldn't be bad unless people just spamming, even though if they're spamming. the default chat is limited to 30 total messages on display. can be changed to 5 or 20 if you like it
alright, but that logic is to advanced for my json knowledge, lol
i struggled to even make it in js
the replace logic part in JSON-UI is possible pretty easily but each letter may require some complexity.
it doesn't feel laggy or anything either so i guess there's that.
the complexity is in the condition part, it depend on the letter and it forms, the letter after and it forms, the letter before and it forms
unfortunately only few people knows it since this is some cutting edge thing and you know people ain't gonna share that either.
yeah, it'll work like that in JSON-UI except bindings.
i'd probably do it in script side rather than UI side
yeah, i had the script version for a long time, but that event is still beta after all this. and people needing it to work in servers they don't own
yeah honestly it is too much of burden.
how
now this just looks odd 🤣 but also kind of works...
It actually looks pretty cool
this is it on GUI SCALE -2 (1440p)
full screen reference
not sure what i'm planning on doing with it yet though
Probably using string formatting to loop through each letter. Then using property bag values to get a replacement for the letter. And then adding that letter to a string which will be empty at first and each replacement letter will be added to it after each iteration.
There might be an easier way. But that's what I can think of for now.
feels not performant
There's probably better ways to do it which I don't know of
helllo why this is no hide first button?
"button_grid": {
"type": "grid",
"size": ["100%", "100%c"],
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"grid_item_template": "bc_panel_back.banner_list_entry",
"grid_rescaling_type": "horizontal",
"collection_name": "form_buttons",
"bindings": [
{
"binding_name": "#form_button_length",
"binding_name_override": "#maximum_grid_items"
},
{
"binding_type": "view",
"source_property_name": "(#collection_index > 0)",
"target_property_name": "#visible",
"binding_condition": "none"
}
]
},```
#collection_index > 1
okay wait second
still the same
{
"binding_type": "view",
"source_property_name": "(#collection_index > 1)",
"target_property_name": "#visible",
"binding_condition": "none"
}
]
@hardy lily no
this works {
"binding_type": "view",
"source_property_name": "(#collection_index > 0)",
"target_property_name": "#visible",
"binding_condition": "none"
}
but
i must give it to another place
@hardy lily i have next problem
because
i have a empty space between buttons
"banner_list_entry": {
"type": "panel",
"size": "$button_size",
"controls": [
{
"[email protected]": {
"size": ["100% - 5px", "100% - 5px"],
"anchor_from": "top_left",
"anchor_to": "top_left",
"offset": [2.5, 2.5],
"layer": 1,
"$pressed_button_name": "button.form_button_click",
"controls": [
{ "default@bc_panel_back.button_image": { "$state": "default" } },
{ "hover@bc_panel_back.button_image": { "$state": "hover" } },
{ "pressed@bc_panel_back.button_image": { "$state": "pressed" } }
],
"bindings": [
{
"binding_type": "collection_details",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "(#collection_index > 0)",
"target_property_name": "#visible",
"binding_condition": "none"
}
]
}
}
]
},```
code
`
is it grid?
this is panel i guess
try adding bindings inside the button panel
something like this:
"bindings": [
{
"binding_name": "#text_button",
"binding_type": "view",
"source_property_name": "(not(#text_button = ''))",
"target_property_name": "#visible"
}
]
doesn't work
i pasted it everywhere and doesn't work
i think the problem is something else
uh
help me please 😭
Wtf is that pfp 🙏
Uhh sure lemme see
❤️
Try this
"button_grid": {
"type": "grid",
"size": ["100%", "100%c"],
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"grid_item_template": "bc_panel_back.banner_list_entry",
"grid_rescaling_type": "horizontal",
"collection_name": "form_buttons",
"bindings": [
{
"binding_name": "#form_button_length",
"binding_name_override": "#maximum_grid_items"
},
{
"binding_type": "view",
"source_property_name": "(#collection_index == 0)",
"target_property_name": "#visible",
"binding_condition": "none"
}
]
}
the button is deleted but i have empty space
Could you send the full json file?
"button_grid": {
"type": "grid",
"size": ["100%", "100%c"],
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"grid_item_template": "bc_panel_back.banner_list_entry",
"grid_rescaling_type": "horizontal",
"collection_name": "form_buttons",
"bindings": [
{
"binding_type": "view",
"source_property_name": "(#form_button_length - 1)",
"target_property_name": "#maximum_grid_items"
},
{
"binding_type": "collection",
"binding_collection_name": "form_buttons",
"binding_collection_prefix": "1"
}
]
}
Try this
@elder lava
there is no button now
My knowledge about forms is limited since I don't mess with it sorry
okay no problem
I do things like these
and u can't help me?
Yea, my knowledge about forms is limited :c
Not sure if this is it but try adding "binding_name": "#collection_index" where you have binding_type: collection_details
doesn't work
I can't @ mods :/
can someone finally help ?
am i dumb or are you trying to make the grid invisible?
youre checking the grids collection index, and set based on it its visibility state
I set invisibility to 1 button
but you have it in the grid not the button
{
"binding_type": "view",
"source_property_name": "(#collection_index > 0)",
"target_property_name": "#visible",
"binding_condition": "none"
}
that needs to be in the button element
"banner_list_entry": {
"type": "panel",
"size": "$button_size",
"controls": [
{
"[email protected]": {
"size": ["100% - 5px", "100% - 5px"],
"anchor_from": "top_left",
"anchor_to": "top_left",
"offset": [2.5, 2.5],
"layer": 1,
"$pressed_button_name": "button.form_button_click",
"controls": [
{ "default@bc_panel_back.button_image": { "$state": "default" } },
{ "hover@bc_panel_back.button_image": { "$state": "hover" } },
{ "pressed@bc_panel_back.button_image": { "$state": "pressed" } }
],
"bindings": [
{
"binding_type": "collection_details",
"binding_collection_name": "form_buttons"
},
{
"binding_name": "#collection_index",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "(#collection_index > 0)",
"target_property_name": "#visible",
"binding_condition": "none"
}
]
}
}
]
}, ```
I forgot that I already have it
show me how it looks ingame
exactly
you cannot do that
with grids you cannot make an element invisible by simply using the visible property
what should i do?
I havent done something like this
but my idea would be
to set the size to 0,0 instead of visible false
Use Dynamic grid
hm?
okay i try
a grid without the dimensions
You can hide buttons in it and the grid will adjust
@oak verge isnt this grid dynamic?
how do I change the size of the button with collection > 0?
idk you would need to experiment with bindings somehow
okay i have an idea
is this definitely possible?
try maybe with enabled instead of visibile
and let me know if it works
yeah nvm it is
i might be confusing his problem with another
{
"binding_type": "view",
"source_property_name": "(#collection_index > 0)",
"target_property_name": "#enabled",
"binding_condition": "none"
}```
???
if so it doesn't work
why binding condition none?
try without
or with always
Yeah, I have the exact problem with this
but I simply resolved this by making different factories
instead of normal grid, I use prefix grid
still the same
can you show me?
let me search it
okay
"[email protected]_button": {
"bindings": [
{
"binding_name": "#form_button_text",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "(not ((#form_button_text - '§x§z') = #form_button_text)))",
"target_property_name": "#visible"
}
]
}
ym?
wait, I kinda forget with my own code
oh, I'm using a different approach
"custom_dynamic_button_panel": {
"type": "grid",
"size": ["100%", "100%c"],
"offset": [2, 0],
"grid_rescaling_type": "horizontal",
"grid_item_template": "server.custom_button",
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"factory": {
"name": "buttons",
"control_name": "server.custom_button"
},
"collection_name": "form_buttons",
"bindings": [
{
"binding_name": "#form_button_length",
"binding_condition": "once",
"binding_name_override": "#collection_length"
},
{
"binding_type": "view",
"source_property_name": "((#collection_length * 1) - 1)",
"target_property_name": "#maximum_grid_items"
}
]
}
This is what I use
alternatively, you can use this:
"dynamic_button": {
"type": "stack_panel",
"size": ["100%", 32],
"orientation": "horizontal",
"controls": [{}], //your current custom button controls
"bindings": [
{
"binding_name": "#form_button_text",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "(not ((#form_button_text - '§x§x') = #form_button_text)))",
"target_property_name": "#visible"
}
]
}
}
you can change whatever you want
ugh i need to take my frustration out
JSON is so dumb
stack_panel works completly fine,
grid crashes my client...
"type": "grid",
"grid_fill_direction": "horizontal",
"grid_rescaling_type": "horizontal",
"maximum_grid_items": 10,
"size": [
"100%",
"100%c"
],
"bindings": [],
"controls": []
isnt this how you add custom fonts
yes
thought so
its just annoying to edit the glyphs
thats why i dont make custom fonts
can someone explain to me how this is made (the buttons on the left n right)? is it possible to apply the same to chest ui (place buttons on a chest ui and move them using script)?
yeah it is possible
how would this be make?
Its hard to explain
you just code a new button, apply a specific collection index and place it beside the chest panel
If i want to edit all the json textures seperately do i have to edit the texture file paths within their .json files?
Also where should i find all of the ui files nineslice code? From my zip searcher i could only find 3 "nineslice" throughout the entire ui sample file
"localize": false in "item_text_label" causes translation keys set by the script to be the item name to not be translated, I hope they fix this, it's really bad to have to use only English name when renaming an item by script
@weak cape, about that String Formatting I created before, I don't have any ideas left
simulating boolean using gate is kinda hard to code, so the result may not quite right
@manic dragon Can you check direct messages? I need help with something.
does anyone know how to get a flipbook animation to work
i have my sprite and i also took a look at animations in the vanilla ui files
// hud_screen.json
"slash": {
"type": "image",
"uv_size": [32, 32],
"uv": "@slash_animation",
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"texture": "textures/ui/animation/RPGslash",
"bindings": [
{
"binding_name": "#hud_title_text_string"
},
{
"binding_type": "view",
"source_property_name": "(#hud_title_text_string = '⌂')",
"target_property_name": "#visible"
}
]
},
"slash_animation": {
"anim_type": "flip_book",
"initial_uv": [0, 0],
"frame_count": 17,
"frame_step": 1,
"fps": 2.86,
"easing": "linear"
}
i am using the right symbol with the conditional rendering, and it fails.
i think this is the hud text tho, i feel like my animation is right
nevermind it works, my rp was off 😂
#1411942793609351178 everybody help me
wow look like simple
nevermind, I found another way
woah charlotte avatar so pretty
could you show me the end product?
I can't get the entity to appear. When I cut the string, the entity_id stops working. Does anyone have any idea what I can do?
"render_char": {
"type": "custom",
"renderer": "live_horse_renderer",
"size": [
25,
25
],
"offset": [
0,
0
],
"layer": 8,
"anchor_from": "center",
"anchor_to": "center",
"property_bag": {
"#entity_id": "#new_value"
},
"bindings": [
{
"binding_type": "global",
"binding_name": "#hud_subtitle_text_string",
"binding_name_override": "#text"
},
{
"binding_type": "view",
"source_property_name": "(('a' + #text - ('%.81s' * #text)) - '$')",
"target_property_name": "#new_text"
},
{
"binding_type": "view",
"source_property_name": "('§z' + #new_text - 'a')",
"target_property_name": "#new_value"
}
]
}
I kinda forgot how entity ids are generated but if it’s completely int based you might need to convert your binding to int
You can wrap everything and put (1 * (STUFF))
entity_id is a number in string format
So int won't work
Trying to do string formatting to extract the entity_id will make it an int which is not going to work
You'll have to pass the number without doing any operation on that so it remains in string format
Don't say that, it makes me sad, hahahaha.
That's just how it is :)
Is it possible to access properties of factory generated elements?
source_control_name doesn't seem to work in this case
no because it doesn't make sense to do so
why so aggressive
we can't
I'll just have to take a different approach then
Is there way to remove the normal healthbar while it also stay hidden still with other addons? "I'm using progress_bar_for_collections to hide it through modifications"
how would i make a loading screen?
big image with a flipbook anim
But horizontal
be a pro like me
id rather not waste my life away for a useless skill
no i already know the basics but i wanna make 1 cuz im bored
can someone help me with redirecting a file depending on the title text?
Redirecting file?
I just want my cosmetics json ui file to run/open up if I have the title text on an action form named “Cosmetics”
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "(not (#title_text - 'Cosmetics' = #title_text))",
"target_property_name": "#visible"
}
]
could you help me add it into my server_form?
i have been at this for hours i can't figure it out
the file name and namespace is both cosmetics
Assuming the form element name is ui inside cosmetics file
"form_selector": {
"type": "panel",
"anchor_from": "center",
"anchor_to": "center",
"controls": [
{
"edit1@form_type": {
"$text": "Mines",
"$content": "mines.ui"
}
},
{
"edit2@form_type": {
"$text": "Towers",
"$content": "towers.ui"
}
},
{
"edit3@form_type": {
"$text": "Cosmetics",
"$content": "cosmetics.ui"
}
},
{
"vanilla@vanilla_form": {}
}
]
},
the bindings are already there
"vanilla_form": {
"type": "panel",
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "((#title_text - 'Mines' - 'Towers' - 'Cosmetics') = #title_text)",
"target_property_name": "#visible"
}
],
i don't get it 😭
"form_selector": {
"type": "panel",
"anchor_from": "center",
"anchor_to": "center",
"controls": [
{
"edit1@form_type": {
"$text": "Mines",
"$content": "mines.ui"
}
},
{
"edit2@form_type": {
"$text": "Towers",
"$content": "towers.ui"
}
},
{
"edit3@form_type": {
"$text": "Cosmetics",
"$content": "cosmetics.ui"
}
},
{
"vanilla@vanilla_form": {}
}
]
},```
```js
"vanilla_form": {
"type": "panel",
"bindings": [
{
"binding_name": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "((#title_text - 'Mines' - 'Towers' - 'Cosmetics') = #title_text)",
"target_property_name": "#visible"
}
]
}```
do you see anything wrong with this?
what's in the cosmetics file
i will send you in in dms
okay
What's the image called for the scrollbar?
"scrolling_content": {
"type": "panel",
"size": ["100%", "100%c"],
"controls": [
{
"tmc_form_dynamic_buttons_panel": {
"type": "grid",
"size": ["100%", "100%c"],
"grid_dimensions": [3, 50],
"grid_item_template": "tmc_form.custom_button",
"grid_fill_direction": "vertical",
"grid_rescaling_type": "horizontal",
"factory": {
"name": "buttons",
"control_name": "tmc_form.custom_button"
},
"collection_name": "form_buttons",
"bindings": [
{
"binding_name": "#form_button_length",
"binding_name_override": "#maximum_grid_items"
}
]
}
}
]
},
"custom_button@common_buttons.light_text_button": {
"$pressed_button_name": "button.form_button_click",
// "size": ["33.33%", "33.33%"],
"size": [64, 64],
"$button_text": "#null",
"$button_text_binding_type": "collection",
"$button_text_grid_collection_name": "form_buttons",
"$button_text_max_size": [
"100%",
20
],
"bindings": [
{
"binding_type": "collection_details",
"binding_collection_name": "form_buttons"
}
],
}
My grid has 3 columns. I want the buttons' size be a third of the form at all times; meaning I need to use percentages instead of pixels.
I tried 33.33% and it put all the buttons on top of each other. When I go back to [64, 64], it goes back to being normal but still didn't achieve my goal of adjusting button size based on form size (form size is also percentage and changes on how big the minecraft screen is)
The button width is 33% that's okay
But if you set height 33% it'll not work
Set it to 100%x
height? so but isn't x for width?
should I make it 100%y instead?
100%x means it'll set height to current width value
So that's what you should use
ohh okay
Workss tysm!
Got another question 😓
"scrolling_content": {
"type": "panel",
"size": ["98%", "100%c"],
"offset": ["2%", 0],
"controls": [
{
"tmc_form_dynamic_buttons_panel": {
"type": "grid",
"size": ["100%", "100%c"],
"grid_dimensions": [3, 50],
"grid_item_template": "tmc_form.custom_button",
"grid_fill_direction": "vertical",
"grid_rescaling_type": "horizontal",
"factory": {
"name": "buttons",
"control_name": "tmc_form.custom_button"
},
"collection_name": "form_buttons",
"bindings": [
{
"binding_name": "#form_button_length",
"binding_name_override": "#maximum_grid_items"
}
]
}
}
]
},
I've always known that I need to wrap a child with a panel to add padding and that's what I did
I was able to add left and righ padding of 2px, but when I try to add top padding, the grid gets cut from the bottom and the top padding doesn't get added at all:
"size": ["98%", "95%c"],
"offset": ["2%", "5%"],
The thing with % is that it'll adjust the value according to the parent size
I suppose the parent of scrolling_control has something with %c for its height
So it's adjusting its size according to its child element
Using vertical offset of a % value doesn't work in this case
Here is the parent:
"ui": { //form panel
"type": "image",
"texture": "textures/tmc_form/background",
"size": ["50%", "80%"],
"controls": [
// other children
{
"[email protected]_panel": {
"anchor_to": "top_middle",
"anchor_from": "top_middle",
"$show_background": false,
"$scrolling_content": "tmc_form.scrolling_content",
"$scroll_size": [8, "100% - 50px"],
"$scrolling_pane_size": ["100% - 4px", "100% - 2px"],
"$scrolling_pane_offset": [0, 0],
"$scroll_bar_right_padding_size": [0, 0]
}
}
]
},
$scrolling_pane_size I change this maybe?
Nah that's probs just the scrollbar
ohh wait scroll_size is size of scroll bar
Okay I'll try this
YEP it worked
imo they should've called it scrolling_content_size
I think it should've worked even without changing the scrolling pane size
something's going on behind the stage with $scrolling_content which is probably what made it not work
Afaik the parent of scrolling_content is a panel so that's probably not it
It could be that the bottom padding was cut off a little bit by the scrolling panel
That'd explain why changing it's size fixed it
-# I'm not sure if that's the right wording
I see
I’m working with BedrockUI for Minecraft Bedrock and I’m looking for an easy way to preview and test UIs without opening the game.
Any tools or tips would be appreciated!
this is a website for nineslice preview
does anyone know if its possible to make a navigation screen similar to the creative with different categories, but without closing and reopening the UI (which would make it flicker)
is it possible to get text value of other element and use it somewhere?
like this
"hud_text_1": {
"type": "label",
"text": "Sample Text",
"anchor_from": "top_right",
"anchor_to": "top_right",
"offset": [ -4, 4 ]
},
"hud_text_2": {
"type": "label",
"text": "hud_text_1", // "hud_text_1" text value here: Sample Text
"anchor_from": "top_right",
"anchor_to": "top_right",
"offset": [ -4, 8 ]
}
I think you can use resolve_sibling property in the binding right?
So you can use #variable in other sibling controllers
how do i add the paperdoll to my form?
"hud_text_1": {
"type": "label",
"text": "#text",
"anchor_from": "top_right",
"anchor_to": "top_right",
"offset": [ -4, 4 ],
"property_bag": {
"#text": "Sample Text"
}
},
"hud_text_2": {
"type": "label",
"text": "#text", // "hud_text_1" text value here: Sample Text
"anchor_from": "top_right",
"anchor_to": "top_right",
"offset": [ -4, 8 ],
"bindings": [
{
"binding_type": "view",
"source_control_name": "hud_text_1",
"source_property_name": "#text",
"target_property_name": "#text",
"resolve_sibling_scope": true
}
]
}
damn thanks so much
i hope it'd be through resource packs instead
how can i is there a way i could use $texture like this?
because puttting it as this doesnt work
nvm i got it
i think it will be in both rp's and bp's
bp for some scripting features, i can agree
This works well:
"card_animation": {
"anim_type": "offset",
"easing": "linear",
"from": [0, -150],
"to": [0, 0],
"duration": 3
}
This doesn't do the animation at all:
"card_animation": {
"anim_type": "offset",
"easing": "out_cubic",
"from": [0, -150],
"to": [0, 0],
"duration": 3
}
Why is out_cubic broken? even though the vanilla tpack uses it just fine
Custom NPC UI next
Still got the NG unicode on your scoreboard ✌️😭💔🥀
does anyone know if theres cases of huge amounts of variables crashing the game?
I have a massively dynamic form that uses a lot of flags and it seems to be crashing every 1-100 form opens
"abusing too much may cause side effects"
Holy 🙏😭
Thats alot of flags
indeed, but the buttons need to be able to horizontally split all the way up to 6 buttons across
i dont think theres a better way to do it
👀👀
Omg, ore Ui? :0
it's not
does "cache_screen": false work on server forms
Help please 😔
it's false by default
boring time
thats a lot of controls
at least space your code out man
like
"title@npc_interact.title_label": {}
"close@npc_interact.x_close_button": {}
i dont think its broken, i think sometimes it depends on the element using the easing or you just can't notice it which is for a lot of cases with some of these easing types
any feedback on this, idk if i like the button texture
Okay I’ll try to increase the duration
is it possible to add new text type? like text but different fonts I could use sometimes in actionbar for example
Yes
.
adds new text, just like that?
There are some issues with using custom fonts like this
Like the pack has to be in the global resources, Minecraft has to be reopened to load the fonts etc.
Yeah add font information in the font_metadata.json and use it in font_type
btw that file was from an older version of Minecraft
I don't have the new one
I will still check it
at least I know its possible
darn dis thing is experimental then
oh well, at least got the answer for it
Yeah it's experimental
yeah, can't use it without restarting the game for it to cache first.
ngl this needs to be global is the worst part
the fact that you can permanently changing the default MinecraftTen font that will be like that the rest of your life until you reset the game.
needed it for sans/papyrus fonts for my dialogue system
guess I will still be waiting for your, btw uh since you lost your backups does this mean you lost your ui system too?
even if taking the resource pack out, this thing will be unchanged.
i rewrote it already since yesterday, but it's a font system first and not dialog system.
since the GUI im working on (actually showcased several times now) does use that system heavily.
wait does this meant to use font too at first?
yeah, not the actual custom ones btw just the normal modified fonts.
What's this about?
there's alot of unused fonts mojang didn't use so i did as reusing them
No.
basically this uses the same spritesheet font and not TTF font.
essentially, it works like plug and play.
so it works fine
no need to restart the game, put the pack anywhere you want
custom font still loads.
nice... one thing I need to check
does it break every update or it's chillin?
knowing this thing is uh
expermantel
it does not and fortunately, my system isn't experimental.
honestly since deltarune literally uses font colors as entirely different fonts, i might aswell use glyphs or something.
why colors have there own fonts 😭
A thing that converts string to actual custom fonts in real time without the needs to restart the game or any issues that custom TTF fonts has.
idk but they have 4 font colors... as SEPARATE FONTS
literally not recoloring the existing font whatsoever, just a entirely different font with same but different color.
I know toby's code is messy since undertale
but is it still there even in deltarune lol
Woah
Do you loop through the string and change the characters to different Unicode, modified glyphs I mean
It could be better, why not use 100% of the width for the text?
that's still 1 option that I made, maybe more
No, no loop. just convert it if it's detected.
Originally the system is gonna be pure JSON-UI, a actually working font system at certain point but I feel that it's not optimized so i went with server-side script instead.
Oh so the conversion is on the server-side
fyi the custom font IN the GUI are client-side.
like, that one i didn't convert it to server-side that time
i just wanna get a working prototype so i reused my old client-side custom font system as that.
I think I lack the knowledge to understand this properly
Btw where's this system used? In an addon?
tl;dr — crap ton of bindings.
unfortunately this system isn't used anywhere since, well. i didn't even release any addons ever since 2023.
Yeah makes sense it has a lot of bindings
and also i made alot of very experimental or cutting edge stuff, i.e proper text splitting, optimized percentage system etc
this included too.
aswell a search bar that works regardless of case.
You've been on this for a long time now
No wonder you did all of that
I was trying to make something like this
But I saw some errors after like 20 characters and the bindings were not optimized at all
yeah, ive joined this discord server for JSON-UI purpose and it seems that i do JSON-UI stuff for 4 years now.
yeah i faced that too and it's intentional thing really.
JSON-UI doesn't support character value conversion atleast what i find.
basically how it works is value turns into their perspective character that works like JS.
since that doesn't work, i had to add a check which character is which, replace it. and basically that's how my old custom font system works.
the big con is that the entire characters list has to be checked in a loop and that ain't performance friendly either knowing bindings does not play nice with it.
that's why i went to script/server-side instead.
the search bar is essentially the same except that i limit to 10 characters total and after that it's normal. or alternatively i could add extra variables that contains both uppercased and lowercased and it'll work surprisedly performance free.
Yep how I tried worked great until 20 character or so
After that it doesn't work properly and even stops at 40 characters or so
I was using a loop to get each character and using property bag to convert it to lowercase
for me, it works limitless but i made a limit due to performance reasons.
i think ive reached like 120~ at certain point and my phone can't handle it anymore so i call the experiment paused for awhile.
after the limit, the search goes normal so case sensitive is back after 10 characters.
120 chars is a lot. I don't think it needs any more than that
I'll try to optimize mine but might give up if things don't work out properly
my phone is low-end nowadays so i probably consider it as very optimized system that i ever done tbh
but, it seems that I don't have any use for it. yet.
fortunately, i made another search bar instead uses both of my cutting edge tech stuff and performance free aswell.
i just doing stuff like these in my free time tbh, since they're experimental and that, i tend not to use them for performance reasons
though i spend my time optimizing rather than new stuff, somehow i even optimized the settings screen to the point it reduces loading time by 25%.
I'm a bit late to JSON UI but I experiment with things in my free time. Ultimately it's going to be replaced
yeah, this is why ive moved to other stuff i.e texture pack btw
probably pixel arts and spritesheet stuff aswell.
They have a lot of stuff in the settings screen. It's hard to understand properly. But I managed to completely overhaul this screen. Although it increased the loading time a bit
i basically, well.
rewrote literally every screens.
including buttons, sliders and stuff aswell
so everything i do, i know where to find and fix it directly.
while making sure it has more customizability than vanilla, such as themes (really customizable btw), better slider looking, all toggles has their own descriptions, dropdown looking like something from sodium mod
all of this with 20% reduced loading time.
no wonder why most people calling my stuff very optimized somehow.
What actually effects the loading time?
I use fully custom buttons or toggles mostly and they seem to be good enough. Vanilla ones have a lot going on in them
