#JSON-UI General

1 messages · Page 16 of 1

west dawn
#

just make sure that the order how the buttons are added from the script is corect else it will hide the wrong buttons

lament kraken
#

I want to display these 10 'type's in another panel.

west dawn
#

buttons are in insertion order

lament kraken
west dawn
#

I dont quite get you

lament kraken
lament kraken
# west dawn I dont quite get you

I need to show 10 of the buttons that start with 'type:'. As you can see, the buttons are in the last order. I'm looking for a way to show those buttons

west dawn
lament kraken
west dawn
#

hm I never had to deal with 2 grids.. You sure you can not just use another stack panel

lament kraken
#

Is it possible to get only buttons that start with a specific letter using the stack panel? I tried that and didnt have any way to do that, so I chose the way to set the maximum number of buttons

west dawn
#

well you know how to conditionally render based of the button text right?

lament kraken
#

i can make the button invisible, but idk how to render specific buttons

#

Can you give me a little hint?

west dawn
#

its like conditionally rendering a form but instead you use the form_button_text

lament kraken
#

@west dawn can you please tell me smthing?

west dawn
#

add this to the button

lament kraken
#

like this third img

lament kraken
ebon trail
#

trying to learn from this dude w scripting and I did everything that he did including setting up the behavior pack with the script and an UUID and I turned on all experimental features just in case but it seems like it's not working aah

#

also in the end I saw the missing colon and parenthesis
case "minecraft:compass": customUI:show(source); break;

#

but it's still not working when i use the items

ebon trail
#

also copied this part for the Behavior pack manifest too

#

anyone pls helppp lol

restive crag
restive crag
ebon trail
ebon trail
true elm
#

ur building ui which is scripting thing this channel is for looks

ebon trail
#

ow alr

ebon trail
ebon trail
#

it works now:D

digital finchBOT
#
liamone3065

lmao

lapis holly
#

Is it possible to add a conditional dimension loading screen ?

#

like you would do with container ui

rocky quail
narrow palm
#

How to show a "new UI" to custom entities with more than 27 slots?

lapis holly
restive crag
lament kraken
#

Is there something like split('string')[n] in json ui?

#

abc:def -> I want to get 'abc' and 'def' respectively

sour grail
#
"abc:def".split(":")
#

It's a method of the string type.

restive crag
#

Huh

#

Anyways do you guys know how to increase the layer of text inside the buttons? I tried editing the layer new_ui_binding_button_label and it does not work.

rocky quail
lapis holly
#

Can you make it conditional ,somehow ?

rocky quail
#

like having 'Admin' tag and somehow the progress screen detecting it

rocky quail
hexed briar
#

json-ui can only read what UI has to.

#

so, nope. It's not gonna read server-side tags or scoreboards

#

your best bet is to use something that json-ui can read, e.g actionbar, chat or title

#

then use @s[tag=something] with it and there you have it

lapis holly
#

i am needing this for a project i am doing....it's immersion related and idk where else to ask as json ui isn't very properly documented

hexed briar
#

There's condition rendering. look for that

#

it should have some examples.

true elm
#

any one has a toggle demo .-

cobalt narwhal
#

is it possible to create several folders for script ?

lapis holly
oblique gust
#

Its locked on the left side even if the anchor is on the right

oblique gust
#

Looks better now

hexed briar
#

scoreboard?

cyan sparrow
hexed briar
cyan sparrow
hexed briar
#

so basically that's pointless if you gonna use more than 3 elements

#

Scoreboard has 16 maximum I think.

cyan sparrow
#

ok

last pollen
oblique gust
#

Its scoreboard

#

Case closed

cunning bridge
#

i am an idiot, i spent hours wondering why 260 + 7 = 266
i was trying to display an enchanted golden apple that had the aux value 260, and i have 7 custom items in my addon right? 260 + 7 equals 267? wrong because it displayed a golden apple with aux value 266. it turns out that the world i was testing my addon in had 1.21 experiments on, which added the trial key and totally missed the aux values, while the world i was retrieving item ids from didn't have it on. i hate json ui even more now XD

oblique gust
#

Nice top right bars

#

Maybe because the subtitle frame is responsive to the title,so you have to adjust both of them

nimble jungle
#

nah I figured it out, had to increase the panel size for my bars. I separated it from relying on the title element, but still needs something on the title to display but it doesnt follow any rules the title does

violet light
#

how do I add a dropdown menu

last pollen
#

#1067535382285135923

oblique gust
#

Where do i edit the dressing room button,i edited its panel but no changes

oblique gust
#

Made a solution

oblique gust
#

What do yall think guys

restive crag
oblique gust
oblique gust
#

Fixed the side buttons and the hover alpha

restive crag
oblique gust
#

so i changed it to light text and edited some

restive crag
oblique gust
#

Maybe

#

it will just ruin it if i add custom control to button template

oblique gust
#

Is this ok

restive crag
#

It represents it is the thing to play the game to

oblique gust
#

Aahhh lemme adjust

oblique gust
restive crag
#

Yep looks good

unique swan
rocky quail
#

or maybe resize it

unique swan
#

It would be nice if a suitable logo was added

oblique gust
#

Ye i think flat logo would be nice also

restive crag
#

©

oblique gust
#

I made it like this,is it fine?

#

Yes,watermark is my reminder what type of game im playing

hexed briar
#

go go gadget unfinished project

oblique gust
#

Your skin is iconic for me

#

is that your main

rocky quail
restive crag
#

Or custom items 👀

hexed briar
hexed briar
# restive crag Does this include all items?

Depends, for now this thing more of focused on custom items, maybe will support vanilla items aswell if it deems important to map designs.

For now, I'm not doing anything with this in foreseeable future.

restive crag
hexed briar
#

Might be both.

#

maybe lore too who knows

#

it's unfinished project and not gonna go into more details

cobalt narwhal
#

where can i found that for change image ?

last pollen
#

new ui i have been working on

nimble jungle
lament kraken
#

*js -> jsonui

sour grail
#

Doubtful, but I don't know. I know JS, but not the JSON UI.

#

I may have misread the original question. Apologies if I was incorrect before.

lament kraken
sour grail
#

Oh I see.

true elm
#

i need a toggle example

restive crag
last pollen
#

Is there any website to help do ui

last pollen
last pollen
#

like if you want to edit pause menu you wouldnt have to load into minecraft each time but see it on a website or something

true elm
#

can we do replace all

true elm
west dawn
#

Thought you guys might be interested in this. If this is the wrong place, just let me know
https://www.youtube.com/watch?v=zWecyvsbKHY

🔗Links :
Last Video Part: https://youtu.be/CWm-KU5ALOQ
Join My Discord! : https://discord.gg/tzrmH56JXC
My Website And Code: http://skyls.de
Music : https://www.youtube.com/watch? v=tEzYsaLm7nw&ab_channel=SimonChylinski-Topic | Breathing Break from the Riot Creator Playlist
JSON UI docs : https://wiki.bedrock.dev/json-ui/json-ui-intro.html
Vani...

▶ Play video
true elm
#

that has toggles?

west dawn
#

nah

#

just in general

true elm
#

lol i finished the video while u replied xd

#

but theres an issue

west dawn
#

yeh?

true elm
#

ur voice doesnt suit?match? ur account imo its diff

west dawn
#

and what can I do about that?

#

tbh tho I do have a new mic and might have to play with some settings

true elm
#

nah its fine maybe i imagined else xd

west dawn
#

yeh I know that feeling

true elm
#

i dont even like my own voice xd

#

when recored

west dawn
#

the voice that others here is different from the voice you have in head

true elm
#

sad

#

well i was looking for "how to toggel panel"

west dawn
#

I'd just look into modal forms and world creaton screen bc they are using it no?

true elm
#

i dont see any default ui that has that tho ppl have done it

#

i remb doing that year ago but i cant find it now with a img button we can toggel another panel

split notch
#

hello, can someone tell me how to hide this white border?

cyan sparrow
split notch
last pollen
#

what is $ in json used for again

chilly yacht
oblique gust
#

How do i edit the splash texts on texts,the identifier of it like splash.text=Hello

violet light
#

Did you use the npc dialog to do this?

oblique gust
#

no

#

Thats a server form generated through script

violet light
oblique gust
#

controller index: 0 to get the data of the first button,controller index: 5 getting the data of the 4th button

violet light
#

okay thx

violet light
#

how do I remove the white border that appears when we hover our mouse over the button?

oblique gust
#

Border is good for me

#

its just makes me feel that i am hovering something

violet light
restive crag
true elm
#

someone link me panel toggle ex.

violet light
cunning bridge
#

how do i make an element cover the entire screen?

undone marsh
whole jasper
#

what "%" can do in Json UI🤔

restive crag
#

Thus 7 % 4 is = 3

whole jasper
cunning bridge
west dawn
cunning bridge
west dawn
#

I'd asume with what you have told me

restive crag
cunning bridge
restive crag
cunning bridge
#

thank you very much, that's perfect

restive crag
#

I'd suggest searching common questions right here in the server: thumbsup:

cunning bridge
#

i did, spend like an hour searching random keywords in #1067869374410657962 and #old-json-ui XD

west dawn
restive crag
west dawn
#

thats not quite a reason on why it would exist

oblique gust
restive crag
violet light
oblique gust
gaunt apex
#

I don't understand at all what makes the texture look like this, is there something wrong with the file?

violet light
oblique gust
oblique gust
gaunt apex
restive crag
gaunt apex
hexed briar
gaunt apex
#

yes

hexed briar
#

that explains it

#

android 11+ restricts you from doing this so, pretty much impossible nowadays unless you're still using android 10 or less

hexed briar
#

it's more of script-api issue tbh.

#

json-ui is about modifying screens and elements, so it's kinda hard to change item textures magically to something else

gaunt apex
#

true

#

If you want to open the data directory, you have to uninstall the app Files

restive crag
restive crag
hexed briar
#

This doesn't mean that every apps will able to access that folder since they don't have a workaround and would follow google's policy instead of relying some exploits that will eventually be patched.

#

And sure did they patched it on more updated android 13+, I have to downgrade my stuff to use that folder as possible otherwise OS will update the stuff itself and remains patched.

#

Android 14 or upcoming 15? yeah good luck with that like they'll have some exploits for you to see android folder and stuff without using "Shizuku" ("root" but rootless)

restive crag
hexed briar
#

If you have previous android and upgraded over it from 10 to 11 etc, you'll able to downgrade if your OEMs provides you an option to use the local .zip update file instead using downloading OTA stuff

#

likewise, nope. you can't downgrade to any android version of your choice since the OEMs does not have so, nor either flashing is an option.

#

Pretty sure realme and xiaomi has ability to downgrade to original android version that your device came with, Samsung probably a no. others is "you'll have to find out"

gaunt apex
restive crag
hexed briar
#

you just don't get android 11+ new stuff aswell lower security.

#

you also may be missing alot of stuff too.

restive crag
#

Hmm i don't generally download that much stuff I think I'm safe

hexed briar
#

I like android 10, though it doesn't necessarily mean that I'll have to stick an older 2019 version of android, that's kinda like staying in windows 7 because 8-11 has bloatwares and laggy stuff

undone marsh
#

On any file app

#

Or for other devices it's possible to use FV File Manager

cunning bridge
#

i am so stuck right now, how to access the #form_text in a form button, i am trying to compare between #form_text and #form_button text to make certain elements visible, but i can't do that if the button doesn't recognize #form_text, i tried to save it in a variable and compare the variable with #form_button text but even that doesn't work, any ideas?

violet light
violet light
oblique gust
#

That's a lot of explanation and has different methods if you meant like tab selections or navigations

#

Theo said you can make toggle hide/show for it so that it displays the lists of buttons when you clicked the category

#

Mine was just opening different forms again for the selected category,while the first button on navigations is always highlighted or pressed

last pollen
#

how can i change #form_button_text text size?

rocky quail
restive crag
rocky quail
#

the one with the blue icon, it worked on mine (android 13(

restive crag
rocky quail
#

Nah, it'll clear the settings that prevents you from accessing the data folder. But if you're sketchy about it. Try looking it up on yt

hexed briar
#

Android will automatically update it no matter of what, but android 14 is pretty much patched.

#

if you have no "uninstall update" option then yeah you're out of luck.

#

you can get shizuku or get an android container instead

gloomy sluice
#

How can I edit the size of the menu of a ModalForm in jsonUI? is there any example?

true elm
#
  1. find the element id that is used for modal form
  2. edit the size property
gloomy sluice
true elm
#

for modal form i think its called custom_form_panel

gloomy sluice
true elm
#

?

gloomy sluice
true elm
gloomy sluice
cunning bridge
#

Can hover renderer text be localized?
i tried to set #hover_text in the property bag to a localization key, but it just outputed the key itself.

#
"hover": {
  "type": "custom_renderer",
  "renderer": "hover_text_renderer",
  "property_bag": {
    "#hover_text": "tile.cobbled_deepslate.name"
  }
}```
restive crag
hexed briar
restive crag
#

bruh 😦 it's a pain having to locate Minecraft file repeatedly when I want to make changes

hexed briar
#

well if you want more easy way then I suppose skizuku should do

#

grant it with zarchiver and you should able to modify minecraft folder with ease without restrictions

wind elm
#

where is this popup found in the ui?

whole jasper
wind elm
minor basalt
#

can i edit the style of inventory screen with just a png or do i need to do a json file and edit it

minor basalt
#

how do i stop my title image from being so small?

hexed briar
hexed briar
minor basalt
#

ok

#

so the button is showing, but the text and image isn’t

#

my friend was making this but he got off so im all alone besides this for rn

hexed briar
#

not sure what can i do with it since you're not giving me more details

minor basalt
#

like?

hexed briar
#

well im not even sure what the context of text and image not showing up

#

is this form text or button

#

But i digress.

minor basalt
#
    "my_super_custom_panel": {
        "type": "panel",
        "size": ["100%", "100%c"],
        "controls": [
            {
                "long_form_dynamic_buttons_panel": {
                    "type": "grid",
                    "size": ["100%", "100%c"],
                    "grid_dimensions": [3, 3],
                    "grid_item_template": "server_form.custom_button",
                    "grid_fill_direction": "horizontal",
                    "grid_rescaling_type": "horizontal",
                    "anchor_from": "center",
                    "anchor_to": "center",

                    "factory": {
                        "name": "buttons",
                        "control_name": "server_form.custom_button"
                    },

                    "collection_name": "form_buttons",
                    "bindings": [
                        {
                            "binding_name": "#form_button_length",
                            "binding_name_override": "#maximum_grid_items"
                        }
                    ]
                }    
            }
        ]
    }
hexed briar
#

are you sure that there's no syntax errors?

#

because the file you gave basically filled with it

minor basalt
#

i don’t know he’s quite dumb

hexed briar
#

Is that the whole form file?

minor basalt
#

no

#

theres alot

hexed briar
#

then idk what am i gonna do with that

#

im not even sure if this is syntax errors or not

minor basalt
#

the other one is for hud screen

hexed briar
#

isnt the form is a single file?

minor basalt
#

no im saying for the error

#

the other error is hud

#

i sent it in dm’s

restive crag
hexed briar
#

@minor basalt

#

is "main_gui" file exists?

minor basalt
#

no

#

he didnt send it atleast

hexed briar
#

well that kinda explains it i guess

#

its trying to referencing something that didn't exist

minor basalt
#

my title is the §3 one btw

hexed briar
#

hence the error.

minor basalt
#

i think he meant the main_ui

hexed briar
#

there's must be a file that contains a namespace "main_gui"

#

maybe it was misspelled like ui instead gui?

#

otherwise yeah, it's not gonna work because its trying to call something that didn't even exist.

minor basalt
#

he didnt send one

hexed briar
#

well i guess solved.

minor basalt
#

but the form opens normally

#

oh

#

nvm

#

look in custom_button

#

it has main ui

#

he meant that i think

#

how do i make it do that

hexed briar
#

namespace ≠ element

#

you can't reference something out of child elements

#

( aka element inside element )

minor basalt
#

im so confused

hexed briar
#

well idk?

#

namespace is basically the code name and stuff

#

its essentially your file main name.

minor basalt
#

he’s just trying to do a square button

hexed briar
#

server form goes by "server_form" in namespace

minor basalt
#

ik

#

i know that

#

i did this barely

#

but i know basic basic stuff

#

im just needing to know how to put the text on the button

hexed briar
#
{
        "form_button@common_buttons.light_text_button": {
          "$pressed_button_name": "button.form_button_click",
          "anchor_from": "top_left",
          "anchor_to": "top_left",
          "size": [ "fill", 32 ],
          "$button_text": "#form_button_text",
          "$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"
            }
          ]
        }
      }```
#

you can create your own text element and use those bindings from form_button

minor basalt
#

ohhhh

#

wait

#

so it shows up

#

if theres an image

#

if not then its just a blank button

hexed briar
#

yeah i can see why

minor basalt
#
    f.button(`§dWarps`, "textures/ui/title");
    f.button(`§dShops`);
    f.button(`§dQuests`);
    f.button(`§dMoney Transfer`);
    f.button(`§dExtras`);
    f.button(`§dPreferences`);
hexed briar
#

panel_name literally has the exact same image bindings.

#

so if there's no image or anything, all of panel_name child elements disappears.

minor basalt
#

so what does that mean?

minor basalt
#

ik im asking that to that message

hexed briar
#

you might wanna move text element out of that panel_name element.

#

put it below it or something idk

#

solved?

minor basalt
#

no it just made it normal

#

i put it outside

hexed briar
#

wdym outside

#

Did you just put it outside of the button element or what

#

nevermind

#
{
                "main_ui": {
                    "type": "panel",
                    "size": [64, 64],
                    "controls": [
                        {
                            "text": {
                                "type": "label",
                                "text": "#form_button_text",
                                "layer": 32,
                                "color": [0, 0, 0],
                                "offset": [0, -8],
                                "anchor_from": "bottom_middle",
                                "bindings": [
                                    {
                                        "binding_name": "#form_button_text",
                                        "binding_type": "collection",
                                        "binding_collection_name": "form_buttons"
                                    }
                                ]
                            }
                        },
                        {
                            "panel_name": {
                                "type": "panel",
                                "size": [64, 64],
                                "bindings": [
                                    {
                                        "binding_type": "view",
                                        "source_control_name": "image",
                                        "resolve_sibling_scope": true,
                                        "source_property_name": "(not (#texture = ''))",
                                        "target_property_name": "#visible"
                                    }
                                ],
...```
#

don't paste the whole thing, just put the text element below main_ui like this

minor basalt
#

yeah then keep the image in there?

hexed briar
#

just leave everything as usual

minor basalt
#

it didnt work @hexed briar

#

sorry for late response

oblique gust
#

How do you make an image generator,like you use the value text of actionbar "textures/ui/confirm" into an image confirm,i tried using variable but its not responsive

unique swan
#

Which file is title.png in?

#

I want it as json

oblique gust
#

In the common_art file

unique swan
#

In which json file is title.png located?

oblique gust
#

in the common art namespace

#

ui_arts_assets_common.json

#

And you will find it there,its multiple titles and one splash texts so you'll manage them all

jovial hemlock
#

Anyone knows how to port this, or at least can someone tell me if this is possible.

Btw I can pay for a port, cause this is a mc java pack

oblique gust
#

That's cool

jovial hemlock
#

im paying who ever knows how to do it

mystic heart
torpid nymph
#

How do you do hover text in forms?

chilly yacht
torpid nymph
# chilly yacht bind the button text
{
    "[email protected]_text": {
        
        "bindings": [
            {
                "binding_name": "#form_button_text",
                "binding_type": "collection",
                "binding_collection_name": "form_buttons"
            },
            {
                "binding_type": "view",
                "source_property_name": "'test text'",
                "target_property_name": "#hover_text"
            }
        ]
    }
}

What did I do wrong?

#

ohh wait nvm this was the wrong version

chilly yacht
#
{
                            "button_hover_text": {
                                "type": "custom",
                                "layer": 70,
                                "renderer": "hover_text_renderer",
                                "property_bag": {
                                    "#hover_text": "#form_button_text"
                                },
                                "bindings": [
                                    {
                                        "binding_name": "#form_button_text",
                                        "binding_name_override": "#hover_text",
                                        "binding_collection_name": "form_buttons",
                                        "binding_type": "collection"
                                    }
                                ]
                            }
                        }```
torpid nymph
chilly yacht
#

wym?

#

i make 2 panels for normal buttons and then button hover

torpid nymph
#

If I create the buttons using a grid rather than factory, will the hover text still work?

chilly yacht
#

yes i think so

torpid nymph
#

Is this a sibling, parent or child of form_button?

chilly yacht
#

i nest my button insides

#

but its a child

#

make 2 panels

#

one for non hover, one for hover then call that panel for hover

torpid nymph
# chilly yacht make 2 panels
"button_panel": {
    "type": "panel",
    "size": [
        "100%",
        "100%"
    ],
    "controls": [
        {
            "button_hover_text": {
                "type": "custom",
                "layer": 70,
                "renderer": "hover_text_renderer",
                "property_bag": {
                    "#hover_text": "#form_button_text"
                },
                "bindings": [
                    {
                        "binding_name": "#form_button_text",
                        "binding_name_override": "#hover_text",
                        "binding_collection_name": "form_buttons",
                        "binding_type": "collection"
                    }
                ]
            }
        },
        {
            "form_button@common_buttons.light_text_button": {
                "$pressed_button_name": "button.form_button_click",
                "anchor_from": "top_left",
                "anchor_to": "top_left",
                "size": [
                    "fill",
                    32
                ],
                "$button_text": "#form_button_text",
                "$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"
                    }
                ]
            }
        }
    ]
}

I tried this but still nothing appears

chilly yacht
#

send ur whole server form?

torpid nymph
#

server_form.json just handles splitting the server forms, this was a grid formation that I slowly broke trying to get hover text to work

chilly yacht
#

where are your hover, normal and pressed states?

torpid nymph
#

I don't have them anymore

#

Copy pasted this from vanilla to see if I could get that to work

chilly yacht
#

id try to input the states because its easier

#

you just bind the collection_details

torpid nymph
chilly yacht
#

ummm i use a kind of main panel that i grab things from

#

so its not just server form

chilly yacht
torpid nymph
#

yeah, alright

cunning bridge
#

it's specific to labels, not useful in my situation

minor basalt
#

would there be a way to make this within json ui and modifying messages in scripts?

#

while keeping it in the chat screen so no custom action or modal forms

#

obviously not the left side for players but the chat like that?

oblique gust
#

That's possibly a modal form,where the side players are the dropdowns and the texts are label of the text field, while send button is a submit button

minor basalt
#

i know

#

im asking if its possible to do this with just a script to modify chat messages so it shows that instead of whatever it would be normally

#

basicly discords chat box like this but make the message to ` > ${date math thingy}\n${data.message}`

cunning bridge
#

i have done nothing but jsonUI for the past 3 days

#

and nights

minor basalt
#

well im just saying that idk if its possible but i did need help with something else

#

i wanted to make the base server form, but with a bigger size, like 225, 200 and then double the sizes for image and button

cunning bridge
cunning bridge
#

my one addon was saved because i recently started using regolith and my world was saved because i exported it a minute before the deletion.

minor basalt
#

thats why mojang should just make packs be in a file path so it just has a single file stored in the a file named packs and then its like a json file with an object and 2 things inside it name resource and behavior, both are arrays, that contain strings of file paths

#

because that would solve multiple issues

#

on ios if u have too much items stored in the minecraft directory it can cause lag

#

i think its the same for pc im not sure

#

and i had like 200 behavior packs

#

so it took like 20 mins to open settings

cunning bridge
#

i am in shock, i am never trusting com.mojang folder ever again, you have no idea how venerable i was, 3 strength days of none stop json ui + a week prior of player json work + my project world could have been as good as none.

minor basalt
#

and then recently it got so bad that it crashed when loading a world that had experiments on and specifically flat

#

could have been an issue you did aswell

#

i would say just make a copy before updating

minor basalt
cunning bridge
#

i need to catch my breath

minor basalt
#

alright np

#

?

oblique gust
minor basalt
#

bro ik

#

i said base chat screen

oblique gust
#

eh

#

Aahhh

#

Yes it can

#

if you mean changing the message text design like instead of [player_name] message to > name: message then yes

#
const currentDate = new Date();
const year = currentDate.getFullYear();
const month = currentDate.getMonth() + 1; // Months are zero-based, so add 1 to get the correct month
const day = currentDate.getDate();
const hours = currentDate.getHours();
const minutes = currentDate.getMinutes();
const seconds = currentDate.getSeconds();

console.log(`${year}-${month}-${day} ${hours}:${minutes}:${seconds}`);
torpid nymph
#

what's the fastest way to make an image take up the entire screen? (without using ["100%", "100%"]?

restive crag
torpid nymph
#

it fills like a 200x200 box in the middle of my screen

#

I can set it to like 250% 250% but would that cause issues for large screens?

restive crag
torpid nymph
#

All parents of the image are set to 100% 100% size

restive crag
#

Why don't you try adding "size": ["100%", "100%"] to main screen content

torpid nymph
minor basalt
#

no

#

normal message

#

like how it displays in chat

#

dont data.cancel

oblique gust
#

Its editable through texts/language files but i dont know if it can get the date and time

minor basalt
#

thats why u use the data.message unless its readonly

wraith bluff
#

read only

minor basalt
#

hmm

wraith bluff
#

you can't directly modify the message

#

why not just cancel and use world.sendMessage?

oblique gust
wraith bluff
#

yeah ik, im asking indian why he doesn't want to use that

oblique gust
#

Aahhh alright

whole jasper
oblique gust
#

Script

swift lake
#
"$aaa|default": "aa",
"$condition": "((#num_price > 10000) or (#num_price = 10000))",
"variables": [
  { 
    "requires": "$condition",
    "$aaa": "abc"
  }
],

It doesn't work.
Can you tell me why?

mystic heart
swift lake
#

Is there any way to use #num_price?

acoustic raptor
#

@agile shale sorry for the ping, but has this been fixed for you? Ping me when you reply #old-json-ui message

agile shale
#

2022
Jesus
Let me Figure out what project that was hold on

acoustic raptor
#

lmao

#

sorry, was having the same exact error lol

agile shale
#

Np

restive crag
mystic heart
swift lake
#
{
  "binding_type": "view",
  "source_property_name": "(1000000*#7+100000*#6+10000*#5+1000*#4+100*#3+10*#2+1*#1)",
  "target_property_name": "#num_price"
},
restive crag
#

I don't know if the format is supposed to be that way

mystic heart
acoustic raptor
agile shale
acoustic raptor
#

Nvm I fixed it lol

#

Here's what I did in case anyone needs it

swift lake
# mystic heart What are `#7`, `#6` etc. ultimately being read from? Like what binding is being ...
"bindings": [
{
    "binding_type": "collection_details",
    "binding_collection_name": "form_buttons"
},
{
    "binding_name": "#form_button_texture",
    "binding_type": "collection",
    "binding_collection_name": "form_buttons"
},
{
    "binding_type": "view",
    "source_property_name": "(not ((#form_button_texture = '') or (#form_button_texture = 'loading')))",
    "target_property_name": "#visible"
},
{
    "binding_type": "view",
    "source_property_name": "(('§z') + (#form_button_texture)",
    "target_property_name": "#all"
},
{
    "binding_type": "view",
    "source_property_name": "(('§z') + ('%.10s' * #all))",
    "target_property_name": "#number"
},
{
    "binding_type": "view",
    "source_property_name": "(('%.4s' * #number)-('%.3s' * #number))",
    "target_property_name": "#7"
},
{
    "binding_type": "view",
    "source_property_name": "(('%.5s' * #number)-('%.4s' * #number))",
    "target_property_name": "#6"
},
{
    "binding_type": "view",
    "source_property_name": "(('%.6s' * #number)-('%.5s' * #number))",
    "target_property_name": "#5"
},
{
    "binding_type": "view",
    "source_property_name": "(('%.7s' * #number)-('%.6s' * #number))",
    "target_property_name": "#4"
},
{
    "binding_type": "view",
    "source_property_name": "(('%.8s' * #number)-('%.7s' * #number))",
    "target_property_name": "#3"
},
{
    "binding_type": "view",
    "source_property_name": "(('%.9s' * #number)-('%.8s' * #number))",
    "target_property_name": "#2"
},
{
    "binding_type": "view",
    "source_property_name": "(('%.10s' * #number)-('%.9s' * #number))",
    "target_property_name": "#1"
},
{
"binding_type": "view",
"source_property_name": "(1000000*#7+100000*#6+10000*#5+1000*#4+100*#3+10*#2+1*#1)",
"target_property_name": "#num_price"
}
]
mystic heart
swift lake
#

I want to display with label

swift lake
#

I realized that I could write two identical elements and make one of them invisible depending on the conditions

mystic heart
whole jasper
# oblique gust No, that's through java script code,getting the timezone on where the code runs ...

Use code like this?

  const formatFileDetails = (world) => {
    const currentDate = new Date();
    const d = new Date(world.lastPlayed * 1000);
    const timeDiff = currentDate - d;
    const oneDay = 24 * 60 * 60 * 1000;
  
    const defaultFormat = [d.getDate(), tl(MONTHS_SHORT[d.getMonth()]), d.getFullYear()].join(' ');
  
    const formatTime = (d) => {
      const pad = (n) => (n < 10 ? `0${n}` : n);
      const hours = pad(d.getHours());
      const minutes = pad(d.getMinutes());
      const seconds = pad(d.getSeconds());
      return [hours,minutes,seconds].join(':');
    };
  
    const formatDaysAgo = (days) => `${days} ${tl('.daysAgo')}`;
    const formatWeeksAgo = (weeks) => `${weeks} ${weeks > 1 ? tl('.weeksAgo') : tl('.weekAgo')}`;
  
    switch (true) {
      case timeDiff < oneDay:
        return dateFormat('.fileDetails', [world.fileSize, formatTime(d)]);
      case timeDiff < 2 * oneDay:
        return dateFormat('.fileDetails', [world.fileSize, tl('.yesterday')]);
      case timeDiff < 7 * oneDay:
        return dateFormat('.fileDetails', [world.fileSize, formatDaysAgo(Math.floor(timeDiff / oneDay))]);
      case timeDiff < 4 * 7 * oneDay:
        return dateFormat('.fileDetails', [world.fileSize, formatWeeksAgo(Math.floor(timeDiff / (7 * oneDay)))]);
      default:
        return dateFormat('.fileDetails', [world.fileSize, defaultFormat]);
    }
  };
  
  const lastPlayed = (0, react_facet_src.useFacetMap)(formatFileDetails, [dateFormat, tl], [item]);
swift lake
jovial hemlock
#

anyone knows how to fix the invisible buttons?

basicly this is because of another form
{
"[email protected]": {
"enabled": false,
"visible": false,
"bindings": [
{
"binding_type": "global",
"binding_condition": "none",
"binding_name": "#title_text",
"binding_name_override": "#title_text"
},
{
"binding_type": "view",
"source_property_name": "(not ((#title_text - '§x') = #title_text))",
"target_property_name": "#visible"
},
{
"binding_type": "view",
"source_property_name": "(not ((#title_text - '§x') = #title_text))",
"target_property_name": "#enabled"
}
]
}
},

jovial hemlock
#

well basicly a custom form adds invisible buttons to other uis

#

something similar to this

unique swan
#
{
                            "grid": {
                                "type": "grid",
                                "grid_dimensions": [
                                    9,
                                    3
                                ],
                                "size": [
                                    "100% - 14px",
                                    "100% - 24px"
                                ],
                                "offset": [
                                    7,
                                    20
                                ],
                                "anchor_from": "top_left",
                                "anchor_to": "top_left",
                                "grid_item_template": "custom_button.button",
                                "collection_name": "form_buttons",
                                "layer": 1
                            }
                        }```
jovial hemlock
#

whats that

orchid atlas
#

please #1216065529098272939

unique swan
jovial hemlock
unique swan
#

Yes

jovial hemlock
unique swan
#

How

#

Did you make the buttons without using a grid?

jovial hemlock
#

the towers ui its the one making other uis bug

unique swan
#

Can you send me the buttons to see?

minor basalt
last pollen
minor basalt
minor basalt
#

i got the bigger size i just want to know how the buttons work

#

how do i add button editability

#

i guess i would say

minor basalt
#

nvm i got it

minor basalt
#

how do i make sure that the title is always minecraft ten font i asked for help from other people but they couldn’t seem to fix it

#

guys is there an ore ui button template?

#

so all buttons and stuff are ore ui based

steel acorn
#

please anyone know the name of this hud ?

#

nether sword box

minor basalt
#

hud_screen.json no?

steel acorn
#

yes, but I can't find where to modify the file

mortal monolith
#

ui_common

ruby folio
#

i follow this tutorial for scrolling panels, how can i make it so when the form has one row buttons, all the buttons are centered

🔗Links :
Last Video Part: https://youtu.be/CWm-KU5ALOQ
Join My Discord! : https://discord.gg/tzrmH56JXC
My Website And Code: http://skyls.de
Music : https://www.youtube.com/watch? v=tEzYsaLm7nw&ab_channel=SimonChylinski-Topic | Breathing Break from the Riot Creator Playlist
JSON UI docs : https://wiki.bedrock.dev/json-ui/json-ui-intro.html
Vani...

▶ Play video
#

also, is there a way i can make a form cover the whole screen?

oblique gust
#

The hunger should be at the bottom lf armor renderer in the stack panel but it goes on different position,i tried to set a custom position or anchor but doesn't change anything,how do i fix this

#

There's also this problem when the armor renderer increases height offset whenever i added health boost acts like a stack panel even tho its in my custom panel

warm schooner
#

is there a way to have a button link to a certain url?

warm schooner
#

just hardcoded urls?

hexed briar
#

only microsoft/mojang links though.

warm schooner
#

damn

hexed briar
#

yep.

#

Although education edition does not have hardcoded urls

warm schooner
#

weird

hexed briar
#

and somehow can be used on NPC

warm schooner
hexed briar
#

well, it'll does nothing.

unique swan
#
"[email protected]": {
        "$focus_override_left": "armor_item_head",
        "$focus_override_left_binding_type": "none",
        "$focus_override_up": "FOCUS_OVERRIDE_STOP",
        "$item_collection_name": "offhand_items",
        "$pressed_button_name": "button.drop_one",```
Can you tell me what this does?
idle anchor
#

Does JSON-UI have backwards compatibility or will it get removed off the face of the earth once Ore-UI goes stable?

idle anchor
#

:( well thanks for the answer

summer river
#
        {
          "label": {
              "type": "label",
              "layer": 99,
              "size": ["80%", "10%"],
              "anchor_from": "top_left",
              "anchor_to": "top_left",
              "offset": ["4%", "10%"],
              "font_scale_factor": 1.4,
              "text": "#form_text"
          }
        },```
#

can someone please walk me through why it cuts off after the js

#

there is supposed to be more lines

ruby folio
#

the height is set to 10%

#

so the text cant keep going after the JS

summer river
#

im dull

#

sorry

#

😭

ruby folio
#

womp womp

unique swan
#
        {
          "label": {
              "type": "label",
              "layer": 99,
              "size": ["100%", "100%"],
              "anchor_from": "top_left",
              "anchor_to": "top_left",
              "offset": ["4%", "10%"],
              "font_scale_factor": 1.4,
              "text": "#form_text"
          }
        },```
unique swan
snow acorn
#

Question: What is th e best way to fix this overlaping?

cunning bridge
#

i tried to repeat the same steps but nothing worked so far

#

nvm, i got it.
so this doesn't happen again, make the size 100% in both main_screen_content and long_form

last pollen
#

where can i change kick screen?

oblique gust
oblique gust
#

Is it possible to make rhombus shape panel and clips the elements on it

#

Something like this

mystic heart
# oblique gust Something like this

I don't think you can make the panel rhombus shaped. You just have to know the size of the images and anchor/offset appropriately based off their size and layer the rhombus shaped image on top

oblique gust
#

Understandable,thank you

ruby folio
#

How do you use play_event on animations?

#

I know that you can use to_button_id on a button to fire the event, but is that the only way?

ruby folio
#

send code not screenshots, makes it easier to help

summer river
#

I hard codedit for long forms

ruby folio
#

👍

summer river
#

when I wrote it for pocketmine

#

i then tried using it on dragonflyt

#

that used a custom_form base :>>>

uneven epoch
#

1.2.0-beta

cunning escarp
#

hey would you guys know why these 2 error's is popping up in this pack?


ui/inventory_screen_pocket.json: Can't find the control: recipe_inventory_screen_content_pocket/root_panel/hotbar_and_panels```
#

here's the code from that json file if anyone would be able to spot the mess up

      "namespace": "crafting_pocket",
      "recipe_inventory_screen_content_pocket/root_panel": {
            "modifications": [
                  {
                        "array_name": "controls",
                        "operation": "insert_front",
                        "value": {
                    "pizza_table_inventory@pizza_table.pizza_table_inventory": {}
                        }
                  }
            ]
      },
      "recipe_inventory_screen_content_pocket/root_panel/hotbar_and_panels": {
            "modifications": [
                  {
                        "array_name": "bindings",
                        "operation": "insert_front",
                        "value": {
                              "binding_name": "#crafting_label_text"
                        }
                  },
                  {
                        "array_name": "bindings",
                        "operation": "insert_back",
                        "value": {
                              "binding_type": "view",
                              "source_property_name": "(#crafting_label_text = container.crafting)",
                              "target_property_name": "#visible"
                        }
                  }
            ]
      }
}```
mental crystal
#

Hello can I ask if there's a way to disable the button in the server form, if the player have a specific "#hud_title_text_string"? Example if the player have "#hud_title_text_string" of no the button in the server form would be disabled

#

I want to hide or ignore the button I hovered right in the picture whenever the player had a "#hud_title_text_string"

dreamy quarry
#

it doesn't works?

cunning bridge
cunning escarp
cunning bridge
#

i don't know, i have never used modifications and have no idea how they work

kind phoenix
#

Can any json ui expert bring back the traditional D-pad Mojang just fully took away from us in yesterday's update?

hexed briar
#

not sure what dpad you mean since it's still there

kind phoenix
#

They updated its texture and positioning 🥲

#

Now it's similar to the other two controls

hexed briar
#

well you can reverse the texture though.

#

also about the position, touch customization is there.

#

just idk move to wherever you wanted it to be

#

and also, nope. json-ui can't alter touch controls since they're pretty much isolated to the game codes so, it's uh. unmodifiable and there's nothing else we can do with it

merry mauve
#

Can anyone tell me in which file in the UI folder I can change the world's loading screen?

merry mauve
graceful elbow
#
import { world, system, Player, ItemStack, EquipmentSlot } from '@minecraft/server';
import { ActionFormData, MessageFormData, ModalFormData } from "@minecraft/server-ui";

const ui = new ActionFormData()
.title("Shop")
.body("")
.button("Kits")
.button("Items")
.body("")

world.beforeEvents.itemUse.subscribe((event) => {
    const { source, itemStack } = event
    switch (itemStack.typeId) {
        case `minecraft:gold_ingot`: ui.show(source); break
    }
})```
#

Cannot find name 'ui'
does anyone know why?

hexed briar
#

#1067535382285135923

chilly yacht
#

is this correct? json "bindings": [ { "binding_type": "view", "source_property_name": "(('%.15s' * #form_text) - ('§0' * 10))", "target_property_name": "#form_text" } ]

#

for some reason its not actually removing the characters

#

oh wait

true elm
#

wat does '§0' * 10 do ?

chilly yacht
#

so basically text - "§0".repeat(10)

true elm
#

that works?

chilly yacht
#

not the .repeat but

#

i think so atleast

chilly yacht
mystic heart
chilly yacht
#

hmmm

chilly yacht
#

oh wait nvm

mystic heart
# chilly yacht i think it is valid

Well even if it is, you're overwriting the same binding here:

"source_property_name": "(('%.15s' * #form_text) - ('§0' * 10))",
       "target_property_name": "#form_text"

You need another binding in the target property unless you want it to loop itself away.

mystic heart
chilly yacht
#

ohhh

#

well id like to overwrite the form text without certain characters

#

like this? json { "chances_text": { "$form_text": "#form_text", "type": "label", "text": "#form_text", "anchor_from": "top_left", "anchor_to": "top_left", "text_alignment": "left", "size": [ "100%", "100%" ], "offset": [ 6, 15 ], "bindings": [ { "binding_name": "#form_text" }, { "binding_type": "view", "source_property_name": "(('%.15s' * $form_text) - ('§0' * 10))", "target_property_name": "#form_text" } ] } }

chilly yacht
#

i’m kind of confused

mystic heart
oblique gust
#

I dont understand how multiplying/subtracting strings work

broken trail
#

loooool

restive crag
#

How do clip ratios works?

    "barr": {
        "type": "image",
        "texture": "textures/ui/experiencebarfull",
        "size": [
            100,
            10
        ],
        "layer": 200,
        "clip_direction": "left",
        "$clip_max": 10.0,
        "clip_pixelperfect": false,
        "bindings": [
            {
                "binding_type": "global",
                "binding_name": "#hud_title_text_string",
                "binding_name_override": "#text"
            },
            {
                "binding_type": "view",
                "source_property_name": "(#text * 1)",
                "target_property_name": "#clip_ratio"
            }
        ]
    },

chilly yacht
gaunt apex
#

How can I make the live_player_renderer renderer only visible the player's head?

oblique gust
#

make the parent panel's clips_children into true,and then just adjust the size of the renderer to display its head properly

#

Basically just cropping the body

gaunt apex
#

kk

warm spade
#

Can you guys know how to render a json ui on the screen

#

It's the only I need

#

Uhm like I will render this to the screen and I will make a text to the book and for the right side there's a custom image

warm spade
#

Help

mystic heart
# chilly yacht ohhh, is #text binding a free to use binding for binding text?

Technically #text can be replaced with any unique binding. Text elements use the #text binding by default, so technically writing "text": "#text" is not usually necessary (unless overwriting a vanilla element with a set text parameter). But you can also set it to a binding of your choosing. You could do this for example and it would be valid:

{
    "chances_text": {
        "$form_text": "#form_text",
        "type": "label",
        "text": "#modified_form_text",
        "anchor_from": "top_left",
        "anchor_to": "top_left",
        "text_alignment": "left",
        "size": [
            "100%",
            "100%"
        ],
        "offset": [
            6,
            15
        ],
        "bindings": [
            {
                "binding_name": "#form_text"
            },
            {
                "binding_type": "view",
                "source_property_name": "(('%.15s' * #form_text) - ('§0' * 10))",
                "target_property_name": "#modified_form_text"
            }
        ]
    }
}

The key is that the binding(s) being used in the source property equation do not match the target property binding. If they do, it will overwrite itself in a loop. That can be utilized in some cases, but here it is messing up what you're trying to do.

mystic heart
mystic heart
pine furnace
#

One message removed from a suspended account.

pine furnace
#

One message removed from a suspended account.

jaunty fox
#

Would it possible to access "$title_text" (or "$actionbar_text") in another menu that isn't the hud? Like the inventory for example
An alternative to this would maybe be displaying text in the players inventory based on a specific items lore? Im really just trying to show text in the player inventory based on scripts

pine furnace
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

wary hinge
#

Did you insert it into the root panel?

pine furnace
#

One message removed from a suspended account.

wary hinge
#

It appears you did not insert it into the root panel

#

I am using android and cannot code, But on PC I can

pine furnace
#

One message removed from a suspended account.

wary hinge
#

The root panel is just like the Main Program for c# but for Minecraft ui

#

It's the main entry

pine furnace
#

One message removed from a suspended account.

wary hinge
#

You are missing one detail: The namespace "hud"

#

At the top

#

Wen I get into my PC I may fix all errors

undone marsh
wary hinge
#

Woah, You are not required to use that

undone marsh
restive crag
#

If anyone is wondering why, it's because how Minecraft merges code like how GitHub merges code so no need namespace

oblique gust
#

What file to edit the worlds/friends/servers tab

restive crag
oblique gust
#

Nice joke

restive crag
oblique gust
#

Nothing,you might have misunderstood me or am i wrong,the play screen was for main screen where the buttons like Play,Settings, Marketplace are,what i was looking for is the world list,server list,friends list

restive crag
wraith bluff
oblique gust
#

Aahhh alright,thank you both

#

so the namespace "play" is different?

hexed briar
oblique gust
#

Lol

hexed briar
#

you're telling me that world screen isn't play screen?

#

wow

oblique gust
#

it was just confusing with the namespace

hexed briar
#

well it should make sense already

#

start meant for main menu and play meant for world selection

#

migit got confused with world edit screen for second

#

but yeah it's play screen if it don't then idk what else

oblique gust
#

Aahhh i get it now sorry,i forgot it was start namespace for main buttons

restive crag
#

Also there's new folder called csb

#

What even the hell is that

hexed briar
#

CSB are likely controlled by marketplace.

hexed briar
#

since progress screen purpose is to basically load them, kinda like a waiting screen in general.

#

it's also well prioritized, so anything that call progress screen, any previous screen will be killed. (unless the previous screen are flagged not to kill)

restive crag
hexed briar
#

they're working on ore-ui and json-ui constantly for some reason

#

it wont change the fact that json-ui are still gonna be replaced by ore-ui in the foreseeable future because how easy it is to make screens for

restive crag
hexed briar
restive crag
#

Who worked on JSON UI before though

hexed briar
#

Basically, its has to do with "legacy codes" all over again

restive crag
#

Is that J Studios or I forgot

hexed briar
#

and no, 4JStudio has nothing to do with this, they literally create minecraft from scratch for console so

#

strangely enough, both of Legacy console edition (4J) and bedrock uses the same c++ language as engine base

restive crag
restive crag
hexed briar
#

well HTML and JSON-UI are pretty close in term of how easy to make so

#

nearly equal but HTML is much more easier

#

but only doubt i have is either them gonna make it modifiable through the pack or not

hexed briar
#

you literally have the same game in the same coding language aswell one being more advanced and even closer to java feelings

#

you have 1.9 combat and cool minigames and stuff, why bedrock?

restive crag
hexed briar
#

Legacy Console edition or 4J port of minecraft actually have more features than bedrock.

#

you have every java features into the port unlike bedrock.

#

feels alot like java too.

#

pretty much like terraria port side of things where they port and translate the source code into c++ and basically plays like the original version

restive crag
#

I think making bedrock is because it'll don't be a stress to code the same thing java to c++. I honestly don't know either, maybe mojang is just lazy.

hexed briar
#

well idk the source code is right there

#

if 4J left, mojang still able to continue building on top of it

#

but instead they just go for bedrock because, well. mobile i guess

#

even legacy edition runs better than bedrock for some reason

restive crag
#

I think they are focusing on cross-compatibility rather than playability/enjoyability

#

Like look at better than wolves

hexed briar
#

well it kinda odd

#

bedrock originally being a mobile game also caused limitations alot in more platforms.

cobalt narwhal
#

how to change the help button of the inventory screen ?

restive crag
#

@hexed briar hey sorry to disturb but did you notice how size bindings acts? Like I've used it and putting in 1 results it to cover the whole parent size

hexed briar
#

well obviously

#

it's basically familiar with percentage expect that 1 = 100%

#

0.50 = 50% etc

restive crag
#

It's so weird though

#

But you can't do px

hexed briar
#

yeah that's expected

#

bindings value can't accept operations.

#

probably goes the same with any values

merry mauve
#

How can I change the color of the boss bar?

cobalt narwhal
#

how to change the help button of the inventory screen ?

analog snow
#

How do i preserve chat messages? for some reason it wont work like hud_title_text or subtitle or actionbar plonk

cobalt narwhal
analog snow
#

if the image is just 1 image then you can deifne the image path inside of a custom image element in the json ui and then u can call it inside of the action bar hud element

#

otherwise i wouldnt know im not that good with json ui

cobalt narwhal
#

do you have one example of code ?

cobalt narwhal
uneven epoch
#

anyone know if its possible to change text_alignment on a text if the text starts with a certain character?

#

i know how to see if the text starts with the right character(s) but im not sure how to do the bindings

#

has to be a valid font im assuming

uneven epoch
#

never used em

#

and im sure youre not here to tell me how

#

nvm i do already know how to use them

#

i sitll need bindings if im gonna use variables

chilly yacht
uneven epoch
#

yeah i assumed you meant hose

#

so do i just do two things for that?

chilly yacht
#

yes

uneven epoch
#

sweet thanks

chilly yacht
#

i think

#

atleast

#

okay i dont think that works

uneven epoch
#

yeah i been trying to get it working it dont

restive crag
uneven epoch
#
"main_label": {
    "type": "label",
    "offset": [
        2,
        5
    ],
    "color": "$main_header_text_color",
    "size": [
        "100%",
        "default"
    ],
    "variables": [
        {
            "requires": "(#form_text = 'a')",
            "$alignment": "center"
        }
    ],
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "$alignment|default": "left",
    "text_alignment": "$alignment",
    "text": "#form_text"
}
restive crag
uneven epoch
#

sure

#

missing a " it made my json scream lol

restive crag
#

Oh lol

uneven epoch
#

unfortunately it did not work shrugging

restive crag
uneven epoch
#

could work

uneven epoch
#

cause arent they all the same

restive crag
uneven epoch
#

oh i see now 😭

restive crag
#

It may cause the lose of performance though if you're looking to make a larger one

uneven epoch
#

im only doing two alignments either center or left

restive crag
#

As of now i think Mojang should add .then stuff to bindings lol or just enable binding to variables.

uneven epoch
#

ill see what i can cook up

uneven epoch
# restive crag As of now i think Mojang should add `.then` stuff to bindings lol or just enable...

Hey i think it actually works its just requires is returning true when it shouldnt be
this one clearly wont ever return true and the alignement defaults to left as intended, but if i remove 'not' then it will center align again

"$text": "#form_text",
"variables": [
    {
        "requires": "(not ($text = $text))",
        "$alignment": "center"
    }
],
"$alignment|default": "left",
"text_alignment": "$alignment",
uneven epoch
#

yeah but
something like

variables": [
{
"requires": "($text = 'Hello world')",
"$alignment": "center"
}
],
will return anyways even if text is not remotely close to that

#

which i dont get....

restive crag
uneven epoch
#

body from an actionformdata in scripts

#

and nothing else

restive crag
uneven epoch
#
        .body("Hello world")
restive crag
uneven epoch
#

its centered

#

but then if i change .body()

#

to anything else

#

it will still be centered

#
"$text": "#form_text",
"variables": [
    {
        "requires": "(($text - '§/') = $text)",
        "$alignment": "center"
    }
],
"$alignment|default": "left",
"text_alignment": "$alignment",
.body("§/Hello world!")
.body("Hello world!")

would both be centered

#

if i change the requires to have "not", it will now both be left aligned

restive crag
#

I don't know whats happening. Let me ask @mystic heart (srry Shane)

#

It seems normal to me

uneven epoch
#

same here

#

im about to lose my mind

restive crag
uneven epoch
#

i have tried that too and it didndt work, ill try it again

#

same thing, its always aligned center

#

in other words (($text - '§/') = $text) is always true

restive crag
#

Bruv what is happening

uneven epoch
#

i appreciate the help a lot, but ima rest my head and go to bed, maybe your friend can figure out whats happening lol

#

before i go i just wanna say that this will always text align to left 💀

"$text": "#form_text",
"variables": [
    {
        "requires": "(not (($text - '§/') = $text))",
        "$alignment": "center"
    },
    {
        "requires": "(($text - '§/') = $text)",
        "$alignment": "left"
    }
],
"text_alignment": "$alignment",
uneven epoch
#

still aligned center

#

yeah its time for sleep lmao

#

again appreciate your efforts with me

restive crag
#

Alright no problem bao_icon_entities

whole jasper
#

binding #offset, what values are possible, I tried inserting an array using property_bag it didn't work

whole jasper
restive crag
undone marsh
whole jasper
# undone marsh What do you wanna do with it?

moving element position with binding, achored_offset and size_binding are already used by others people,
I can't use something similar, I'm afraid there will be another copyright strike🙂

undone marsh
#

Just use whatever works

#

Other people crying over a block game method are just childish

#

They can't stop you

whole jasper
restive crag
whole jasper
restive crag
restive crag
#

Anybody knows if there's a property on factories that can limit the amount of elements it can make

warm spade
#

Can someone teach me how to render the JSON UI in the screen,like title but the problem is that we can move and interact with other ui's.uhm what I mean is when I activate the title @s title hi the ui will show but the player can't move and can't interact with other ui

uneven epoch
#

Basically you want a sidebar but a screen

uneven epoch
#
  "standard_title_label": {
    "type": "label",
    "size": [ "default", 10 ],
    "color": "$title_text_color",
    "text": "$text_name",
    "layer": 4,
    "shadow": false,
    "property_bag": {
      "#tts_dialog_title": "$text_name"
    },
    "bindings": [
      {
        "binding_type": "$title_text_binding_type",
        "binding_condition": "$title_binding_condition",
        "binding_name": "$text_name",
        "binding_name_override": "$text_name"
      },
      {
        "binding_type": "global",
        "binding_condition": "once",
        "binding_name": "#tts_dialog_title"
      }
    ]
  },
#

these are the only properties that are in the json ui you can use

#

font_type is not one of them

uneven epoch
#

i take it it worked?

#

gotta do bindings

#

because youre doing visible if the title is only a certain text

#

not the font

#

i think youd need variables for that

#

i just had a mess with them last night and i cba to get them working sorry

#

they dont work for me apparently

#

when theyre supposed to

#

i mean i suppose you dont have to use variables

#

do you know what the defult font is?

#

like the actual name

#

MinecraftTen

#

etc

#

uhm

#

i dont think so

#

Mojangles NotoSans or sm

mystic heart
#

If you just want to change the alignment of text based off #form_text, I think the simplest way would be to just have 2 elements and make one visible/the other invisible based off the value.

restive crag
#

Oh a second there I thought it works

pine furnace
#

One message removed from a suspended account.

restive crag
#

Yes it is possible, just search collection index here

pine furnace
#

One message removed from a suspended account.

restive crag
pine furnace
#

One message removed from a suspended account.

#

One message removed from a suspended account.

restive crag
#

...

#

#1067870274894172260 message

uneven epoch
#

I did take your suggestion to do two elements and make eithe rone visible/invisble in the binding equation and got what i was looking for, however im just asking so i know for the future

mystic heart
# uneven epoch im still kind of new to json ui, so to clarify you mean to say that i cannot us...

The stuff that starts with # are bindings. They are evaluated after variables, so you can use variables inside a binding equation, but you cannot use the bindings inside a variable equation. You can set a parameter to the value of a single binding, but it cannot be an equation. For example, you can have:
"text": "#text" but you cannot have "text": "(#text + $var)". You can also set a variable to the value of a single binding, but then that variable cannot be used in an equation because it's just an association.

#

In regards to the last part, you can do:

"$var": "#text",
"text": "$var"

But you would not be able to do:

"$var": "#text",
"text": "($var + 'string')"

Because the variable is now associated with the binding value. It's not a normal variable anymore, and so like bindings they cannot be used in equations.

uneven epoch
#

what if i set the variable to the value of that single binding but add a "" to it, would i then be able to use it in the variable? or perhaps a dummy character i can just include in the variable equation?

uneven epoch
#

#binding + "" in the bindings

mystic heart
uneven epoch
#

you can say that yeah

mystic heart
uneven epoch
#

or even

"bindings": [
    {
        "binding_type": "view",
        "source_property_name": "('§.' + #form_text)",
        "target_property_name": "#text"
    }
]
"$var": "#text"
#

wait am i talking gibberish

mystic heart
#

wait sorry I just misread that

uneven epoch
#

would this technically bypass not being able to use bindings in variable equations?

mystic heart
uneven epoch
#

so i may have cooked yessir

mystic heart
uneven epoch
#

in all honesty i dont even know what youre saying about how its limited but i thank you for spedning the time to clarify with me yessir

mystic heart
# uneven epoch in all honesty i dont even know what youre saying about how its limited but i th...

so in this case you can change the text parameter dynamically because there is a binding that exists for it. Or you're able to set the parameter to a binding (now that I think about it you could probably set text_alignment to a string with "left", "right", etc. But this doesn't work for all parameters. Since the variables requires section allows you to change variables dynamically, and all parameters support variables, you can change any parameter with variables. But it doesn't always work that way with bindings.

uneven epoch
#

wouldnt doing

"$var": "#text"

fix that? or does that just go back to same issue with not being able to use bindings in variable equations

#

Yeah i just tried it and it didnt work ima just stick with the two elements and visible/invisble bindings 😭

dawn prism
#

Anybody know how to remove equipment and that purple background

whole jasper
#

How to round or truncate decimal numbers with bindings?

1.2345678 to 1.23

I tried making it a string and truncating it with %.s and returning it to int it didn't work

hexed briar
#

it does an automatic thing where if you're using decimal, it'll just be the fixed decimal so. rounding them is gonna be difficult, or better just don't expand decimal

#

if 1.00, its gonna be 1.00 and not something like 1.00000

#

vice versa.

whole jasper
#

I want to change the clip ratio to text 0% - 100%,
I tried with property bang if only 2 - 4 decimals is fine, but in fact the clip ratio produces more than that and causes crashes

restive crag
whole jasper
restive crag
whole jasper
uneven epoch
dawn prism
hexed briar
#

how to crash mobile players 101

arctic grove
#

so do we know when we can expect oreUI cuz i dont feel like learning json ui

pine furnace
#

One message removed from a suspended account.

left yew
pine furnace
#

One message removed from a suspended account.

#

One message removed from a suspended account.

arctic grove
hexed briar
#

can't exactly yet

#

we're not even sure if mojang gonna let us modify or make it

arctic grove
#

Isn't it gonna be based on react

hexed briar
#

yeah and also doesn't exactly matter.

#

if you can't modify within resource pack then that's pretty much it.

#

can't do anything with it.

arctic grove
#

Jsonui Just feels weird and I don't really feel like learning it since it's used only for minecraft.
I mean since script api is in js it would make sense for an ui system in js/html also

hexed briar
#

json-ui is pretty much just json.

arctic grove
#

I know

#

But it's still kinda weird to do uis with

hexed briar
#

well kinda same thing as html imo

#

pretty much same thing.

arctic grove
#

Its probably just me being used to stuff

hexed briar
#

it pretty much works the same as html, except that it's json and javascript can't be exactly used in it

#

Ore-UI is probably more easier since, well. its literally html

#

but still, if there's no official way to modify it or do things with resource pack, it's pretty much useless if you're looking to make UI with it

arctic grove
#

It would be logical for mojang to allow for it to be used when it comes out

hexed briar
#

well yeah, it's pretty much "ifs"

#

they're pretty much doing random stuff with UI pretty often.

pine furnace
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

arctic grove
#

I mean the order in they are changing uis feels random

hexed briar
#

sometimes they get rid of json-ui stuff in the favor of ore-ui at the same time making json-ui variables works with ore-ui

#

so idk

#

it's all random, so none of us can predict it.

arctic grove
hexed briar
#

and also more modern since it uses web techs.

#

which this outcome causes uh, performance issues.

pine furnace
#

One message removed from a suspended account.

#

One message removed from a suspended account.

arctic grove
#

I love electron apps 💀

hexed briar
#

so its more of - get latest tech aswell device overheating

#

that's ore-ui and most webapps about in general

#

Json-ui kinda works the same although abit hard but more easier if you already knew json and html in the first place. pretty fast and doesn't cause performance issues (unless you uh, make things too much)

hexed briar
#

i love chatting app that somehow overheats for goddamn no reason

arctic grove
#

i am learning react right now so i will join the legion of unoptimized apps

pine furnace
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

mental crystal
#

@pine furnace

{
  "homescreen_panel": {
    "type": "panel",
    "layer": 100,
    "size": ["100%", "100%"],
    "controls": [
      {
        "long_form_dynamic_buttons_panel": {
          "type": "stack_panel",
          "size": ["100% - 4px", "100%"],
          "offset": [2, 0],
          "orientation": "vertical",
          "anchor_from": "top_middle",
          "anchor_to": "top_middle",
          "factory": {
            "name": "buttons",
            "control_name": "server_form.homescreen_button"
          },
          "collection_name": "form_buttons",
          "bindings": [
            {
              "binding_name": "#form_button_length",
              "binding_name_override": "#collection_length"
            }
          ]
        }
      },
      {
        "homescreenbg1": {
          "type": "image",
          "size": ["186px", "204px"],  // Adjusted size
          "texture": "textures/ui/homescreen/bg1",
          "layer": 0,
          "bindings": [
            {
              "binding_name": "#title_text"
            },
            {
              "binding_type": "view",
              "source_property_name": "#title_text = 'homescreen1'",
              "target_property_name": "#visible"
            }
          ]
        }
      }
    ]
  }
}```
pine furnace
mental crystal
#

No, I just add that for reference or editing

mental crystal
pine furnace
#

One message removed from a suspended account.

olive ermine
#

why is my form text so cooked?

#

tried "shadow": false and it still displays those black lines inside text

mental crystal
#

Some buttons have different textures?

pine furnace
#

One message removed from a suspended account.

tacit verge
#

@broken trail did you ever figure this out #old-json-ui message

"anim_type": "clip"

sweet mantle
#

Okay, so I'm learning JSON UI for the first time. What does the "factory" property do?

restive crag
restive crag
#

Is ignored binding exist?

broken trail
#

you can do everything by size animations

hexed briar
#

Ignored bindings basically kills the whole bindings bracket so, kinda basically a kill switch. not exactly disabling element

#

and does not work like ignored property does

hexed briar
#

Disables instructions in middle of process.

#

or ignore the below bindings entirely.

tacit verge
#

I’m doing it for a health bar, so clip from 1 to 0.6 for example