#JSON-UI General

1 messages · Page 29 of 1

chilly yacht
#
{
   "outline@image": {
      "texture": "textures/forms/default/background_outline",
      "property_bag": {
         "#color_here": "#outline_color * 1"
      },
      "bindings": [
         {
            "binding_name": "#form_text",
            "binding_condition": "once"
         },
         {
            "binding_type": "view",
            "binding_condition": "once",
            "source_property_name": "#form_text",
            "target_property_name": "#outline_color"
         },
         {
            "binding_type": "view",
            "source_property_name": "#color_here",
            "target_property_name": "#color"
         }
      ]
   }
}```
cunning bridge
#

nope, impossible

chilly yacht
#

sad

broken trail
#

thats why they are pushing new ui based on web standards

#

imagine how easy you could change array for colors using js

#

thats why jsonUI is just shit with only a few "functions" named bindings

#

👍

coarse torrent
#

that doesn't have anything to do with it lol, json ui could have been good if they had designed the API right, although to be fair, doing something like this isn't easy.

#

also we don't even know if OreUI is going to be modifiable

hexed briar
#

Pretty sure bindings stuff don't work on a couple of element properties including ignored.

#

Also for a little reminder for those who're using debug property — This was only primarily used for seeing the element sizes. this also may break several element properties. if it doesn't show something you expected it to show, turn it off and see if it fixes.

#

yeah, they're hardcoded. and more likely expecting an array. which, is something json-ui can't really do.

we can't even put variables/bindings on array, so don't expect that much.

rocky quail
cunning bridge
#

i tried the debug element before, it just abstracted the view and barely showed any border, i usually set the type to an image and give it "textures/ui/White" or put it as a control for this image.

slim forge
hexed briar
oak verge
#

anyone made a custom dropdown before?
i am having a bug with custom forms and want to ask if they encounter the same bug

chilly yacht
#

What about using the string colors?

#

like "red", "green", "blue", etc..

hexed briar
#

might work, try it

rocky quail
chilly yacht
#

but u know minecraft 🙂

#

Just trying to make everything super dynamic

#

Only thing i need is the colors

rose onyx
chilly yacht
#

Use

#

Yes

rocky quail
chilly yacht
rose onyx
chilly yacht
#

ill eventually make it to where its like a sandbox

#

so u can offset buttons anywhere and size them however

#

i just wanted to use custom colors for the binding but its fine sadJoe

rocky quail
#

can you send the gradient code here? id like to use it on my pack

rose onyx
#

same

chilly yacht
# rocky quail can you send the gradient code here? id like to use it on my pack
"horizontal_gradient": {
      "type": "stack_panel",
      "orientation": "horizontal",
      "$color1|default": [ 1, 1, 1, 1 ],
      "$color2|default": [ 1, 1, 1, 0 ],
      "anchor_from": "center",
      "anchor_to": "center",
      "size": [ "100% - 24px", "100%cm" ],
      "controls": [
         {
            "panel": {
               "type": "panel",
               "size": [ "50%", 1 ],
               "controls": [
                  {
                     "left": {
                        "type": "custom",
                        "renderer": "gradient_renderer",
                        "gradient_direction": "horizontal",
                        "color1": "$color2",
                        "color2": "$color1"
                     }
                  }
               ]
            }
         },
         {
            "panel": {
               "type": "panel",
               "size": [ "50%", 1 ],
               "controls": [
                  {
                     "right": {
                        "type": "custom",
                        "renderer": "gradient_renderer",
                        "gradient_direction": "horizontal",
                        "color1": "$color1",
                        "color2": "$color2"
                     }
                  }
               ]
            }
         }
      ]
   },```
chilly yacht
#

yup

#

just didnt wanna have images for it

#

sooo i did that

#

oh wait

#

okay so that uses some stuff

#

that i have in my global files

#

but horizontal_stack_panel is just a horizontal stack panel

#

and then panel is just a panel

#

edited it

#

Just gonna do it like this so i can use title for wtv and body shrug

#

The background also resizes accordingly

#

only 119 lines of code 🫣

hexed briar
#

sometimes server forms UI are kinda interesting.

#

unfortunately can't really do much with it, idk what to do with it.

rose onyx
#

anyone know if live player renderer can include entities?

hexed briar
#

As long the model is from the player, yeah.

rose onyx
hexed briar
slim forge
#

Hey, how do i make a image appear just on survival using binding?

chilly yacht
#

omg look at the heart render

#

in hud_screen.json

#

vanilla files

oak verge
hexed briar
rose onyx
rose onyx
chilly yacht
#

am i able to have size bindings?

#

like if i wanna have y size binding and turn button text into a size

hexed briar
#

Possible but highly not recommended.

#

it'll crash the game if you forgot to output it correctly.

#

or outputting the wrong value can also crash the game.

#

this isn't really the size bindings issue but size's property in general. invalid size will crash the game. which, will definitely make it hard to debug.

chilly yacht
#

i just need it for dynamic padding

hexed briar
#

but again, invalid size will crash the game.

chilly yacht
#

Thats fine

#

i dont really understand clip bars fully though

#

like

#

is it basically just a percent?

#

so like 0 is 0% of the parent

#

and 1 is 100%

#

0.5 is 50%

hexed briar
#

my game crashed quite alot when working with title just to change the element size via bindings.

which i eventually give up afterward because it ain't worth it.

hexed briar
chilly yacht
#

ahh alright

#

so its just number / 100

#

x 1

hexed briar
#

yeah, as long the output is either 0.000 and 1.000, it'll work just fine

chilly yacht
#

it HAS to be three zeros?

hexed briar
#

it's optional.

chilly yacht
#

so just a float

#

basically

hexed briar
#

yeah

chilly yacht
#

alright thank you

#

ill try to get this to work

hexed briar
#

though just don't use too much of it

#

json-ui usually compresses the value so it doesn't lag

chilly yacht
#

yeah i just need it for 1 thing

#

and thats turning button text into a size for padding

#

so i can place padding anywherer

slim forge
#

But when i set my gamemode do creative

#

The image of the bar freeze on the screen

hexed briar
slim forge
#

It don't dissapear

chilly yacht
#

send json ui

slim forge
# chilly yacht send json ui
                  {
                    "[email protected]_bar": {
                      "size": [0, 9],
                      "uv_size": [0, 9],
                      "uv": [0, 0],
                      "$condition": "[thirsty_bar_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"
                        }
                      ]
                    }
                  },
chilly yacht
#

you didnt even add it

slim forge
hexed briar
#

"size": [0, 9]

?????????????

slim forge
#

It goes from 0 to 10

#

And the size grow

hexed briar
#

oh my god

chilly yacht
#

so this should work json { "binding_type": "view", "binding_condition": "once", "source_property_name": "(((#form_button_text - '§p§a§d§d§i§n§g') * 1) / 100)", "target_property_name": "#size_binding_y" },

chilly yacht
#

thats for something of mine

hexed briar
#

if it outputs like value instead of string, yeah it should work.

chilly yacht
#

huh

#

game crashed

#

ruh roh

hexed briar
#

lmao

chilly yacht
#

didnt even have a button flagged that

hexed briar
#

yeah, this is exactly why it's not recommended

chilly yacht
#

can i have a size already determined?

#

i need some special size

#

like "100%", then y

hexed briar
#

well can you use variables?

chilly yacht
#

wait this wont work bc

#

the parent is 100%c

hexed briar
#

I'm not aware if something like this exists on server forms though since i never done anything with that

slim forge
#

I still don't take it

chilly yacht
#

oh wait

#

those bindings only work in hud screen

hexed briar
#

eh nope.

#

it works for me on progress screen though.

chilly yacht
#

maybe they changed it

#

but amBro said "bindings that may work only in hud screen, "#size_binding_x": 0.0, "#size_binding_y": 0.0"

hexed briar
#

well i primarily use my own UI, which doesn't seem to crash and works like it should tbh

#

usually i test it on the start screen first then move on to another screen and it works just fine

#

it been like several months too.

chilly yacht
#

i may need property bag

hexed briar
#

yeah you will need it

#

here's example of it, maybe it might be useful i guess? (directly from my UI, which uh oddly formatted. just don't mind it)

slim forge
hexed briar
rose onyx
#

bro comes here with a script💀

slim forge
rose onyx
#

this is json ui. make a post, learn the basics, experiment, and look at the vanilla files

rose onyx
hexed briar
#

yeah, you'll need to actually learn json-ui instead of slamming some random codes here and expecting them to work.

#

"size": [ >>0<<, 9 ] literally will show nothing since the size is 0.

oak verge
slim forge
#

Someone who knows how to answer a simple question

hexed briar
#

this is certified ☠️ moment

rose onyx
#

fr

oak verge
#

i just did what they told you to do...

hexed briar
#

just use your text editor search feature, search "survival" and you will immediately see that bindings on first try

#

it's not that hard.

slim forge
rose onyx
hexed briar
#

or scroll it down by 2-3 scrolls and you'll find it

#

it's literally at the line 81

slim forge
oak verge
#

first search result

hexed briar
#

it took me one scroll to find it lmao

slim forge
#

OK guys

#

You guys got me

#

I'm sleepy and lazy rn

rose onyx
#

work on this tomorrow

slim forge
#

Just on survival

#

Now i need to put it below the horse heart

slim forge
rose onyx
rose onyx
#

cool

slim forge
chilly yacht
#

i got it thanks to shanewolf

#

some weirdddd sizing stuff

#

had to bind the x size to the y and do some other confusing stuff

scenic swan
#

how can I change the size of a modal form's text field

ruby locust
#

Hello, I really wanted your help with a problem.
I have difficulties with scripting because I'm new to it, and I would like to know if there is a way for me to create a new button that would be in the game interface. The button would have a different function from the others.
Would it be possible to create a new button?

bitter ether
#

Does anyone know how to stop the loop of an animation created with LibreSprite?

jolly rock
chilly yacht
scenic swan
scenic swan
hexed briar
#

so i somehow changed the form button's collection index via bindings and it works as intended, though the text doesn't change for some reason.

chilly yacht
hexed briar
#

bindings sucks.

#

period.

turbid nimbus
chilly yacht
turbid nimbus
chilly yacht
turbid nimbus
#

Oh💀

#

Okay

chilly yacht
#

i can have them anywhere and it works fine

turbid nimbus
chilly yacht
#

no

#

its 1 button

#

those 2 buttons are 2 buttons only

#

no weird padding button or anything

tropic badger
#

Or just use 100%c

chilly yacht
scenic swan
#

how can I set the alignment of a button's text to the left ?

scenic swan
#

nvm

#

is there a way to remove the background of a button or just chose a color?

#

nvm

nimble mortar
#

xd

scenic swan
#

making a code editor in json ui is hard

turbid nimbus
# tropic badger Or just use 100%c

How you will make no height with c size? No height needs y size 0, so you need to duplicate complex button. This is the main StackUI flaw

turbid nimbus
hexed briar
#

for whatever reason "collection_index" property accepts variables and not bindings.

#

idrk what to do anymore.

ruby locust
#

@safe geyser yes i mean UI

broken trail
#

you are trying* to override collection_index by bindings right?

hexed briar
#

yeah, all because of this stupid label not changing with collection index bindings.

broken trail
#

yeah I had same problem

hexed briar
#

so i went different approach by going after the property ver instead and no luck.

broken trail
#

after many attempts I realized that this bindings is read only

#

you cannot really use it to change actual collection index of element

broken trail
#

if its actual value in bindigns or as variable somewhere else, its still save value

hexed briar
#

yeah and i don't wanna go do collection index spams like what i did on percentage system

#

i guess i have no choice tbh.

broken trail
#

I had that problem in this example and ended up with classic visible bindings lol

broken trail
hexed briar
#

well nearly same as yours except buttons.

#

it kinda worked? though for whatever reason it does the opposite.

#

the label changed but my button returns to 0 index instead

#

also i can't seem to get the bindings i have work outside of the element so, basically the template is utterly useless.

broken trail
#

are you talking about this my example?

hexed briar
broken trail
#

uh well, idk if you are using buttons or sliders, for slider you can get confused because it returns float that you cant really display, so value may be 1 or just 0

hexed briar
#

it's just me attempting to make factory buttons dynamic by changing collection index dynamically

#

i guess I'm turning this into percentage system 2.0 all over again

broken trail
#

uh well

#

good luck then I gave up after learning some web tech

turbid nimbus
#

is there any point in making a library for json ui? and it seems like I'm asking this too late, because one fourth has already been done

broken trail
#

and realizing that you can display on plain site same things made in 5min instead of 5h in jsonUI

hexed briar
#

literally.

broken trail
#

and then ralize that its also barely working

#

so I dont really wonder why new ui is baded on website tech

#

its so easy to create actually working things

hexed briar
#

tbh i wouldn't let my expectations high on that UI

#

considering we can't modify it just yet

#

also it doesn't seem like they're gonna let us modify UIs pre-game.

broken trail
#

well these screens arent that much important

#

there may be some examples but still

#

modifying hud and server forms will be thing for sure

#

imagine how it would boost their marketplace - cash for them

#

and yeah thats basically all I guess

hexed briar
#

yeah, it's probably gonna be the biggest downgrade for me

#

i usually like porting UIs from different games to minecraft and that basically gonna be non-existent on their new one

broken trail
#

well you can always read memory and put whole minecraft ui to trash and render your own

#

then only your creativity is limit and motivating to update it every new stable version lol

hexed briar
#

well the issue with that is not gonna be for everyone. except PC

also, the only thing i update is just settings. that's about it.

#

my UI is somehow still content log free from 1.19 to present version.

broken trail
#

well when it comes to literally hacking, one error is going to crash game

#

so you would have to find every possible change and update your code to minecraft

#

really boring and time consuming process

broken trail
#

one thing about jsonUI is great support

#

maybe because its not updated since dinosaurs hah

hexed briar
#

great is an understatement, they're literally not been updated since 1.19.10

#

also that update broke alot of everyone's UI so idk if this considered a good update or not

hexed briar
# broken trail hud error?

yeah, some properties don't read variables properly. workarounds for this is just, well. create more variables.

broken trail
#

if so they decided to remove one thing and it was really for really long time and due this decision many player had no idea what to do with error rectangle in top corner lol

broken trail
#

well we can talk for really long time

#

hate thigns etc

#

but I gtg

hexed briar
#

1.21.30 is technically a json-ui update but not really, it's just dev build's json-ui error being out for everyone

#

so you can now enjoy seeing bindings errors everywhere

broken trail
#

uh yeah, I have problem when I override default element that is type of renderer

#

one line that is only available in this type is always thworing error

#

because I changed it to panel

#

lol

#

they should add option to ignore some of them

#

in such situations

#

but remember

#

next jsonUI update is probably coming in 2 years

#

they would add some text type that is not available for people

#

etc etc

hexed briar
#

hopefully it doesn't break people stuff again

#

it would be funny if marketplace maps broke aswell

hexed briar
#

im done.

#

I'm not touching server forms ever again maybe

#

also minecraft kept turning MinecraftTen font to mojangles for literally no reason, so enjoy weird offseted title.

oak verge
hexed briar
#

custom form shouldn't be a big deal tbh

#

not like i recreate the whole UI from scratch and works prefectly on 3 major minecraft versions

#

actually i would finish this since yesterday if this stupid collection index property works as it should

oak verge
#

long forms have variables that you can directly assign values to
that is rare in custom forms

#

also the dropdown get position get messed up for no reason

hexed briar
#

should be no issue for me.

#

since i mostly gonna rewrote every elements like i would, i might finish this like probably 1 hours

#

also about the dropdown, ima throw that and replace it with this thing since it was the most convenient way for me. atleast

oak verge
#

maybe i am just a noob in json ui...
just the binding stuff confuse me

rose onyx
#

the only thing they're good at doing is hiding and showing stuff

hexed briar
#

yeah bindings are terrible in general.

chilly yacht
#

but i always go to shanewolf if i need binding help

#

hes pro at it

rose onyx
#

you're the king of forms, and timothy is the king of adding helpful ui features

chilly yacht
rose onyx
oak verge
#

is there is a way to change what an element position is relative to?

hexed briar
#

least performance server forms be like.

#

30 buttons of this takes 2 seconds to load

oak verge
#

layouts like that should just be constant

#

you are using there name to control them right?

hexed briar
#

yeah.

#

currently im going for optimizations but there's literally none so i just get rid of that test brick layout.

#

the button itself is already rewritten for higher customizations.

#

the panel itself is actually just 3 textures/ui/White texture elements together, that's about it. no background assets being used.

hexed briar
chilly yacht
#

is it possible to somehow remove closing menus with escape?

rose onyx
chilly yacht
#

I got it to work globally but I only need it for 1 panel..

rose onyx
restive crag
chilly yacht
#

But I only need it for one

#

Since it's forms

restive crag
#

Ofcourse it works globally, do you mean a screen?

restive crag
chilly yacht
#

Make only 1 form have certain button mappings and the rest are another

rose onyx
chilly yacht
rose onyx
#

it may be hardcoded

restive crag
chilly yacht
#

i can try some variable stuff

#

if its possible

#

or I can uhh

#

turn a fake button into close button

chilly yacht
#

New form normal

rose onyx
turbid nimbus
leaden furnace
#
{
    "hud_title_text": {
        "type": "image",
        "size": [ "100%c + 10px", "100%c + 8px"],
        "alpha": 0.8,
        "anchor_from": "top_right",
        "anchor_to": "top_right",
        "offset": [ 0, 0 ],
        "texture": "textures/ui/Gray",
        "layer": 30,
        "controls": [
            {
                "title": {
                    "type": "label",
                    "text": "#text",
                    "layer": 31,
                    "localize": false,
                    "font_size": "small",
                    "font_scale_factor": 1.6,
                    "bindings": [
                        {
                            "binding_name": "#hud_title_text_string",
                            "binding_name_override": "#text",
                            "binding_type": "global"
                        }
                    ]
                }
            }
        ]
    }
}```
Why do I get this error? There is no orientation property lol.
wraith bluff
#

you'll have to find where hud_title_text is actually used and then replace that with a new custom text instead of modifying the default one

#

if that makes sense

rocky quail
#

has anyones game also crash using size_binding_x/y?

turbid nimbus
rocky quail
#

mine just crashes upon loading the screen containing it

#

wierd

turbid nimbus
#

maybe try * 1

turbid nimbus
#

Made with RugUI

First achievements screen build.

turbid nimbus
oak verge
#

what is that

turbid nimbus
#

You even left a reaction there.

oak verge
#

yeah i seen that
just thought it may be some kinda of editor

#

good work btw

turbid nimbus
#

RugUI is editor

#

like.. in different form

#

you edit ui with scripting tags

oak verge
#

not a template?

turbid nimbus
#

no

#

dynamic!

oak verge
turbid nimbus
#

please read message

oak verge
#

i can imagine all the bindings

turbid nimbus
#

RugUI is so powerful that it even surpasses the usual dynamic UI

turbid nimbus
#

88 in total

oak verge
#

don't that effect performance

turbid nimbus
#

please read message

oak verge
#

i was wandering where i seen these pictures lol

turbid nimbus
#

yes, there is a small loading time, but in the usual form with a maximum of 16 buttons it is almost not noticeable

turbid nimbus
turbid nimbus
oak verge
#

alr

#

i should get into all the binding stuff
it is confusing af

turbid nimbus
#

?

oak verge
#

i mean i should learn how binding work

turbid nimbus
#

if you just need simple binding for button text, use the built-in starlib

broken trail
tropic badger
rocky quail
#

i was inputting a string to it making it crash

chilly yacht
broken trail
broken trail
hexed briar
# broken trail dont they only work in hud screen? :SS

They do work everywhere, except they're extremely hard to work with since the wrong move crashes the game.

they also don't quite work well when it comes to elements that directly override them, such as input box and sliders.

slim forge
#

Did have a bind for subtitle?

rocky quail
#

managed to softlock my game lmfao

full glen
#

hallo, is it possible to hide the day counter with a binding or something like that?

#

I guess not, but I want to clear up any doubts

rocky quail
#

or just add "ignored": true to the day counter part

full glen
#

Maybe I had an outdated file

rocky quail
#

hm, try searching it using your text editor

#

it should be named "day_counter" or smth

full glen
#

bedrock-samples

#

Ty!

warm escarp
#

what is the json file for the pause screen??

warped oxide
warm escarp
oak verge
#
    "variables": [
      {
        "requires": "($desktop_screen and (not ($text = '§t§e§s§t§r')) and (not ($text = '§t§e§s§t§2§r')))",
        "$screen_content": "chest.small_chest_panel",
        "$screen_bg_content": "common.screen_background",
        "$screen_background_alpha": 0.4
      },
      {
        "requires": "($pocket_screen and (not ($text = '§t§e§s§t§r')) and (not ($text = '§t§e§s§t§2§r')))",
        "$use_custom_pocket_toast": true,
        "$screen_content": "pocket_containers.small_chest_panel"
      },
      {
        "requires": "($text = '§t§e§s§t§r')",
        "$screen_content": "chest.custom"
      },
      {
        "requires": "($text = '§t§e§s§t§2§r')",
        "$screen_content": "chest.custom2"
      }
    ]

why dose pocket ui get triggered all the time? (if the names don't match)

jolly rock
#

"$container_title" no?

oak verge
#

vanilla files assign it to a variable

#

"$text": "$container_title",

#

maybe i should try
"($text and (not (x or y)))"

cunning bridge
#

can we display the world seed in the hud?

rocky quail
#

you can fake it by overlaying the settings screen on hud

cunning bridge
rocky quail
cunning bridge
#

like allow player movement when the settings are open?

oak verge
#

don't that only wok for mobile?

rocky quail
#

yeah

#

thats the only problem

coarse torrent
cunning bridge
coarse torrent
#

?

#

you can send the seed as text into the actionbar, using command or script or whatever and from there you can display it, what does any of this have to do with the player knowing the seed?

#

ahh

oak verge
#

the point is how to get the seed and display it
not how to display it

coarse torrent
#

sorry i understand now

#

like on servers and stuff

#

yeah then timothys is the only way

oak verge
oak verge
oak verge
nocturne salmon
oak verge
nocturne salmon
#

Do you just change the texture?

oak verge
#

not the vanilla one
that is a custom form

nocturne salmon
oak verge
# nocturne salmon I'm fairly new to forms. How do you create a "custom" form. I know we have the...

ActionFormData is a simple one
i did make a template for it here
https://discord.com/channels/523663022053392405/1280301965271896124
(check the other messages in the post)
@last pollen
also made a post detailing all the part of it
https://discord.com/channels/523663022053392405/1293322590500425729
and there is a pretty good library from @turbid nimbus
https://discord.com/channels/523663022053392405/1297188309943975988
i am still learning ModalFormData and i will go to MessageFormData next, not sure there is any samples for those but i will be happy to share my files if you want

nocturne salmon
oak verge
#

feel free to do so

oak verge
rose onyx
#

got suspended for being "we've indicated that you're under the age of 13"🤓🤓🤓

oak verge
#

are you? 😒

rose onyx
chilly yacht
#

It’s some weird screen

oak verge
tropic badger
oak verge
tropic badger
oak verge
tropic badger
oak verge
#

alr
thanks

past stirrup
finite jetty
runic portal
#

how come i cant put numbers in my form button text

#

im using the default font

#

it just shows blank buttons

bitter ether
#

how can i change offset Interact_Button?

opal aurora
olive ermine
#

my design modifications to server form button apply to all buttons

#

how can i make it so it is only applied to the first button in the form?

turbid nimbus
#

cool names lol

red creek
high totem
#

anyone got a ore-ui ex

chilly yacht
vagrant nova
#

how to reduce lag while switching action forms

#

its not really lag just that my mouse floats for sometime

gaunt vault
#

Would it be possible to modify the hud_screen to be able to send 2 hud_actionbar_text simultaneously and maintain individual styles?

jolly rock
#

It is possible but not sending them at the same time but in different ticks

gaunt vault
#

The best thing would be to create a way to send them all in just one actionbar and separate them in the json?

jolly rock
#

I don't think it's the best if you want it to be completely dynamic

weak lintel
#

can anyone point me to the thing that shows item enchantments on hud tooltip when you hold an item?

#

im trying to get rid of enchantments off the tooltips but its all messed up in vanilla ui

mint lake
#

hello

oak verge
#

Hello!

#

how to enable/disable a toggle by default?

jovial hemlock
gaunt vault
weak lintel
quiet breach
#

How can i modifiy the position of popup or tip message ?

last pollen
quiet breach
#

et quelle ligne modifier

last pollen
quiet breach
#

et j'ai cherché tip et j'avais essayé en modifiant la duration pour voir si c sa mais c pas sa aussi

last pollen
last pollen
vagrant nova
#

how do i reduce lag when switching 2 action forms?

oak verge
#

disable animations

#

and try not to add too much elements or bindings

oak verge
#

can't tell with just a video
there is a lot of ways to achieve what you have

vagrant nova
#

you see the ui keeps moving

#

not ui

#

but my input

#

mouse input

#

when i switch forms

#

my forms are very simple

vagrant nova
oak verge
#

that is probably not from lag
why not use toggles?

vagrant nova
#

whats that?

oak verge
#

you can switch between panels that way without closing the form

vagrant nova
#

ohh

#

but i need to send the input back to serv er

oak verge
#

what input

vagrant nova
#

like what applications the user is pressing

oak verge
#

why?

#

the buttons that do something in game should be just a form button
you can see in the video that pressing the buttons in the pages do close the form and send the response

vagrant nova
#

ah

#

i see

vagrant nova
#
"offset_button@server_form.custom_button": {
                      "collection_index": 0
                    }
#

how do i add a text to this?

vagrant nova
oak verge
#

i think there is a text variable?

vagrant nova
#

ah

#

"$button_text": "$text",

jolly rock
#

What is the result of this operation?

//#title_text : 'r1asd2rasf3g4'
"idk": "(#title_text * 1)"```
oak verge
#

that either return a number or a nan

vast stone
#

Can you recommend some place for me to understand about UI, I know absolutely nothing about

scenic swan
#

how to remove the animation when opening a form ?

rocky quail
scenic swan
#

ohh thsnk you!

rose onyx
rocky quail
#

theres more in ui_common.json

rose onyx
#

alr

#

are there different easing types

rocky quail
#

yes

#

and anim type

hexed briar
#

there's a lot of easing type in the wiki.

#

anim_type on the other hand has few, like alpha, offset, size, spritesheet thing and spritesheet thing but aesprite format

vagrant nova
#

can i expand a image to fit the screen

vagrant nova
#

i used 100%

#

its not touching the corners

oak verge
#

did you use keep_ratio?

vagrant nova
#

No

#

oh maybe thats the problem

oak verge
#

use it and set it to false

#

Default value is true

vagrant nova
#

i placed the cross in bottom right but for some reason its always anchoring to the left

rocky quail
#

though the code you provided didnt mention the cross at the bottom right

vagrant nova
rocky quail
#

ohh

#

the close button is the cross

#

i see'

#

well you need to remove
"anchor_from": "bottom_right",
"anchor_to": "bottom_right",
@vagrant nova

vagrant nova
#

okay

#

its like this

#

i removed it

#

i want it to to be in bottom right

#

but its still not working

vagrant nova
#

but it keeps moving to left

rocky quail
#

hmm

#

its because you are using a stack panel to hold the cross

vagrant nova
#

i shoulduse only panel?

rocky quail
#

just use a regular panel

#

yes

#

and make its size [10,10] (relative to the close button size)

vagrant nova
#

alright

#

it works now

#

i think it fixed my confusion on stack panel and panel

turbid nimbus
vagrant nova
#

im unable to push these buttons to the edge

turbid nimbus
#

uh

#

why where is 25% size?

vagrant nova
#

to keep the panelsize small

rocky quail
#

that looks nice

vagrant nova
#

yo

vagrant nova
#

do u know how to push the firemodes panel to the edge

turbid nimbus
vagrant nova
vagrant nova
#

I feel its already well structured

#

but something which im not aware of

neat sequoia
#
"buttons_option_grid": {
        "type": "stack_panel",
        "size": [
            "100%",
            "100%"
        ],
        "offset": [
            2,
            0
        ],
        "orientation": "horizontal",
        "factory": {
            "name": "buttons",
            "control_name": "my.custom_button"
        },
        "collection_name": "student_buttons_collection",
        "bindings": [
            {
                "binding_name": "#form_button_length",
                "binding_name_override": "#collection_length"
            }
        ]
    }

why this doesn't work?

#

@mystic heart can u help me pls?

wraith bluff
#

if that makes sense

vagrant nova
wraith bluff
# vagrant nova whatcould be the parent panel?

something like this

  "long_form@common_dialogs.main_panel_no_buttons": {
    "$title_panel": "common_dialogs.standard_title_label",
    "$title_size": [ "100% - 14px", 10 ],
    "size": [225, 200],
    "$text_name": "#title_text",
    "$title_text_binding_type": "none",
    "$child_control": "server_form.long_form_panel",
    "layer": 2
  },

see the size is [255, 200], so that'll also be the max size for your panel

#

depends on how you've set up your custom one

vagrant nova
#

I put size as 100

#

"anchor_from": "top_middle",
"anchor_to": "top_middle",

radiant gorge
#

I'm trying to create a custom form for Minecraft via main.js. However, when I try to use the listed items to activate it, it doesn't work. Does anyone know where the error is?

jolly rock
#

no itemstack

#

also typeId no tipeId

wraith bluff
radiant gorge
#

Ok i try

wraith bluff
#

also this should be in #1067535382285135923

jolly rock
vagrant nova
#

My UI is something like this right now

#

but I want to make a dropdown that moves vertically

#

with animations

#

does anyone have an idea?

weak lintel
rocky quail
vagrant nova
#

when i make multiple Ui's the binding doesnt work as intended

oak verge
#

can we get the "player_gamer_pic" from player name or id

oak verge
#

alr

turbid nimbus
#

Creating dynamic UI has never been so easy and fast.
Created with StarLibV2. #1072983602821861426

scenic swan
#

wow amazingoop

cosmic oxide
#

So do flipbook textures function properly inside Gui's as button icons?

#

I don't want to work on making some if they dont

warm escarp
#

who know in what files i can find all the pop up messag

celest plaza
#

how can I use it

celest plaza
hybrid aurora
warm escarp
#

thx

broken trail
graceful lantern
#

Hello, quick question:

With bindings, you can check if a toggle is clicked. But how do you check if a toggle is not clicked?

Is there an inverse of

{ "binding_type": "view", "source_control_name": "toggle20", "source_property_name": "#toggle_state", "target_property_name": "#visible" }

broken trail
#

silly ahh question lol

graceful lantern
hybrid aurora
#

gg

warm escarp
hybrid aurora
#

hello, how can i get item name depending on its slot in a container ?

warm escarp
hybrid aurora
#

i have never used animations

warm escarp
#

oh okay

jolly rock
warm escarp
#

THX

#

I’m confused

jolly rock
#

I don't think that exists

warm escarp
warm escarp
# jolly rock

You know if there is an animation to make the toast pop up from above

jolly rock
#

alpha change opacity
offset change offset
size change size
flip_book is animated
wait is like waiting for a certain time

warm escarp
#

Im stupid…

jolly rock
#

Also im not sure

jolly rock
#
"my_panel": {
    "anims": [
        "@hud.anim_in"
    ]
},
"anim_in": {
    "anim_type": "offset",
    "from": [0, -20],
    "to": [0,0],
    "duration": 1,
    "next": "@hud.anim_wait"
},
"anim_wait": {
    "anim_type": "wait",
    "duration": 3,
    "next": "@hud.anim_out"
},
"anim_out": {
    "anim_type": "offset",
    "from": [0, 0],
    "to": [0,-20],
    "duration": 1,
    "destroy_at_end": "my_panel"
}```
warm escarp
#

😮

#

Wait

jolly rock
#

Its just an example

rose onyx
#

you don't just paste examples in code and expect it to work..

#

you have to actually implement and learn from them

warm escarp
#

in fact I didn't copy and paste, I must have done something wrong

slender basalt
#

Is it possible to remove the interact button?

jolly rock
#

remove on_interact component

slender basalt
hybrid aurora
jolly rock
#

No lo tengo

jolly rock
mint falcon
#

hey, does anyone know how to encrypt a Minecraft json?

jolly rock
#

You can't

#

Not legally

#

You can obfuscate it but it is very easy to deobfuscate it, even easier than script

rose onyx
jolly rock
opal aurora
turbid nimbus
fathom mica
slender basalt
opal aurora
#

did you set binding condition to "always"

fathom mica
#

yup

#

even i have tried by taking the value from outside the factory, but still sometimes it doesn't update

broken trail
broken trail
#

try to get value from element which is in bottom right because it updates but this popup doesnt

broken trail
#

goofy ahh factories...

fathom mica
rose onyx
broken trail
celest plaza
#

😭

celest plaza
#

The code I sent is yours

jovial hemlock
#

Xd

pastel terrace
#

Can anyone tell me why the flame doesn't appear there?

// Layout and Flame Panel
            {
                "requires": "(not (($container_title_copy - $keyword9) = $container_title_copy)) and $desktop_screen",
                "$root_panel_size": [
                    200,
                    10
                ],
                "$panel_top_half_size": [
                    "100%",
                    42
                ],
                "$scrolling_panel_size": [
                    18,
                    18
                ],
                "$slot_grid_size": [
                    1,
                    1
                ],
                "$screen_content": "custom_scroll_screen.custom_scroll_panel",
                "controls": [
                    {
                        "type": "panel",
                        "size": [
                            13,
                            13
                        ],
                        "offset": [
                            -15,
                            0
                        ],
                        "controls": [
                            {
                                "[email protected]_empty_image": {}
                            },
                            {
                                "[email protected]_full_image": {
                                    "bindings": [
                                        {
                                            "binding_name": "#furnace_flame_ratio",
                                            "binding_name_override": "#clip_ratio",
                                            "binding_condition": "always"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                ]
            },
rocky quail
#

dont ping other members

pastel terrace
#

sorry

rocky quail
#

be patient till someone helps you out

pastel terrace
hybrid aurora
#

hello !
how can i create a custom button (a new button object) in the pause menu and link them to a button ?
concretely i just want to display a dialog when player click on "Mises à jour" (its french, it means "Updates")

hybrid aurora
#

xD

rose onyx
#

ma correction automatique a foiré

hybrid aurora
scenic swan
rose onyx
scenic swan
#

ahh cool cool

gilded scroll
#

Since the questions I wanna ask are basics (I think...) so I'll ask here then

  1. The difference between label, input_box and edit_box is a fixed text that cannot be edited, a box that allows user to type in one or multiple rows and a text box that can allow user to type in one row only?
  2. What is a factory and how it does? It says "A element generator" from documentation, does it means we can create a whole new type of element for our UI included custom button with custom function?
  3. In CSS terms, is stack_panel a container that has flex-direction: row|column; controlling while collection_panel is flex-direction: row; flex-wrap: wrap;?
  4. What is a slider box actually? Can I have an actual look ingame?
    Please do ping reply
turbid nimbus
valid ridge
#

i can't seem to work with json ui, but im willing to pay someone for this

#

i just want to change server forms, i send button texture as item aux instead of image directory using script api and i want the item renderer to replace the texture image.

hybrid aurora
#

hello, what's the name of this font ? :

jovial hemlock
#

But I can do it

valid ridge
#

ty

#

now im having problems in displaying form body text, whats the bindings for it?

#
{
                    "item_description": {
                      "type": "label",
                      "text": "#form_text",
                      "font_type": "default",
                      "font_size": "normal",
                      "size": ["100%", "default"],
                      "text_alignment":"left",
                      "layer": 70,
                      "color": "$main_header_text_color",
                      "offset": [5, -115]
                    }
                  }

is this wrong?

valid ridge
#

the offset and other things are alright, its just the #form_text that doesn't work

#
"text": "form_text12312321312312312",
#

why doesnt it work? its #form_text right?

rose onyx
#

it is

#

where do you have the element?

valid ridge
rose onyx
valid ridge
rose onyx
valid ridge
#

i do

valid ridge
rose onyx
#

try putting it in the controls of your items_buttons_panel

#

if that doesn't work, try the shop_main_panel assuming you haven't already

rose onyx
gaunt vault
#

Considering that I am a layman, would it be possible for someone to explain to me how I edit buttons individually in server_form? 02heart

gilded scroll
#
...
new ActionFormData()
  ...
  .button("custom button text")

Something like that

gaunt vault
#

I'm not talking about creating the form, I'm talking about using collection_index. I know that this property is used, but I don't know how.

oak verge
#

watch dingsel video

celest plaza
oak verge
#

for example
-# ignore the operations mess

oak verge
#

some one pointed that to me
i can't find his original message

jovial hemlock
#

its just a template to start with something and not code it from scratch

weak lintel
#

the font automatically changes to unifont when theres a text that mojangles(is this the name?) dont have

celest plaza
valid ridge
#

does anyone know what's the texture name for the text hover background for items

shadow storm
#

is it possible to increase the size of the chat?

valid ridge
shadow storm
oak verge
#

you should be a able to
just check the hud namespace for anything related to chat

bitter ether
#

Is there a way to get text after or before special characters in binding?
ex:

Text: A1§zA2

before:
> A1
after:
> A2
valid ridge
bitter ether
# jolly rock Only numbers

i.e. will it return an integer or be determined by that number and return anything after or before it?

jolly rock
#

What I mean is that there is no native way to do split in json but there are crazy people who managed to create a way to do split but only with numbers

#

We can still separate numbers from a text, for example

#form_text = split:10,582,177472,1004,103,hey how are You

And get each number individually and the last sentence

valid ridge
#

Does arrangement matters in bindings?

fathom mica
#

I need to delete text after a certain id though,
abc§adefg => defg

opal aurora
fathom mica
#

yeah i tried that before, but it lagged, now trying to make that 'x' detect id

gilded rivet
#

im trying to create a custom chest ui what should I use as reference?

valid ridge
rose onyx
#

not bad

gilded scroll
fathom mica
fathom mica
fathom mica
# opal aurora your code has problems

I found the error, the animation on the inventory button can be removed when the animation on the item renderer is removed, I still don't understand why that happens

high totem
warm escarp
#

Maybe

high totem
#

looks sick man please

#

ill give you vaults if you want

#

@warm escarp

warm escarp
#

But idk

high totem
warm escarp
high totem
#

im actally begging you rn 💀

warm escarp
#

Eheh

#

But the addon is a beta

#

If i make it public i will ping you

#

Or dm you

high totem
#

k

chilly yacht
gentle orchid
#

How to make a label automatically do a line-break if the text is longer than a limit?

jolly rock
#

Put a size on the label

#

"size": [100, "default"]

hardy lily
#

Is there any way to make a device crash using JSON UI after the bindings condition is set to true?

gentle orchid
fathom mica
opal aurora
#

json ui sometimes goes wrong

rocky quail
hardy lily
#

not working

#

any example how to use it?

valid ridge
#

how do i lock a button?

opal aurora
valid ridge
#

how do i turn a string into boolean in json?

opal aurora
#

and bind it to a binding

#

for example:

...
"bindings": [
  {
    "binding_name": "#sample_binding"
  },
  {
    "binding_type": "view",
    "source_property_name": "(#sample_binding = 'which_text')",
    "target_property_name": "#is_which_text"
  }
]
warped saffron
turbid nimbus
opal aurora
turbid nimbus
opal aurora
# turbid nimbus also

there is a problem here, the new play screen ui based on ore ui is coming very very soon

opal aurora
#

-# but i hate the fact that i still can't search for worlds in ore ui play screen

turbid nimbus
opal aurora
turbid nimbus
opal aurora
turbid nimbus
turbid nimbus
opal aurora
turbid nimbus
oak verge
turbid nimbus
oak verge
turbid nimbus
#

size +- similar

#

just GrimUI has less space so it seems higher

oak verge
#

idk it seem off for some reason

turbid nimbus
#

uh, idk

#

is it better?

turbid nimbus
#

or even like that. + 6px

oak verge
#

is there any in game ui that use that so i can compare?

turbid nimbus
#

uh?

oak verge
turbid nimbus
#

ok

oak verge
turbid nimbus
#

i cant add too much variations

#

because i need to optimize it

oak verge
#

yeah
the yellow is good for every use case

turbid nimbus
#

Fun fact:
I didn't even expect that this background text combination is possible. I saying combination because GrimUI is dynamic UI.

hollow oxide
#

which team activated #jukebox_text ?

pure frost
#

I dont know if this is the right place to ask, but is anyone open for commissions on JSON-UI? I have a lot to be made and I pay very fair

warped saffron
#

"type": "label",
"text": "§5§dSumo§5",

only for this here

jolly rock
#
"type": "image",
"texture": "//",
"size": ["100%c+10px", "100%c+10px"],
"controls": [
   {
      "label": {
         "type": "text",
         "text": "//"
      }
   }
]```
#

@warped saffron

opal aurora
turbid nimbus
hexed briar
hexed briar
#

i like the idea of having dynamic stuff but it honestly not worth just to reduce or get rid of the limitations of script stuff

turbid nimbus
hexed briar
#

you could just use collection index stuff and pretty much move on with free performance.

#

it doesn't prove anything useful besides "hey one prefix does that" and dramatically increases the loading time

hexed briar
hexed briar
turbid nimbus
hexed briar
#

it's gonna be a thing that you can only see within mins and eventually forget it

hexed briar
#

it's not like the UI gonna freeze for nearly 1 seconds

#

they're instant.

turbid nimbus
hexed briar
turbid nimbus
hexed briar
turbid nimbus
turbid nimbus
hexed briar
turbid nimbus
hexed briar
hexed briar
#

json-ui people does that alot so it's not surprising.

turbid nimbus
#

I just don't know what I can tell you.

hexed briar
#

well i don't care.

turbid nimbus
#

ok

hexed briar
#

it's pretty common tbh

#

it's not like we just have someone asking for help with their stolen hive UIs on this server

turbid nimbus
#

I accept your possibilities of proof

hexed briar
#

there's cubecraft and zeqa (most skidded) aswell here

turbid nimbus
hexed briar
#

every custom forms does that. i don't see why should i compare it.

turbid nimbus
#

anyways, dm is better place to talk about that

hexed briar
#

probably not, I'm still working on actual job not like i could chat 24/7

#

but you do you.

turbid nimbus
#

ok

torpid nymph
#

is it possible to set conditional button bindings? I need to either unbind "esc" from one server form or remove it globally and individually bind it on a per-form basis

torpid nymph
oak verge
#

same as other stuff
just use the button text variable

#

"bindings": [
{
"binding_name": "#form_button_text",
"binding_type": "collection",
"binding_collection_name": "form_buttons"
},
{
"binding_type": "view",
"source_property_name": "(not (#form_button_text - 'esc'= #form_button_text))",
"target_property_name": "#visible"
}
]

#

@torpid nymph

torpid nymph
#

mb, I meant button mappings

"button_mappings": [
    {
        "from_button_id": "button.menu_cancel",
        "to_button_id": "button.menu_exit",
        "mapping_type": "global"
    }
]
#

All but one of my server forms needs to have this button mapping

oak verge
#

try putting a variable there and conditionally change it

torpid nymph
# oak verge try putting a variable there and conditionally change it
"variables": [
    {
        "requires": "not ((#title_text - 'form_name') = #title_text)",
        "$buttons_mappings": [
            {
                "from_button_id": "button.menu_cancel",
                "to_button_id": "button.menu_exit",
                "mapping_type": "global"
            }
        ]
    },
    {
        "requires": "((#title_text - 'form_name') = #title_text)",
        "$buttons_mappings": []
    }
],
"button_mappings": "$buttons_mappings"

I've tried this but It's not working

#

wait nvm I see my mistake

oak verge
torpid nymph
# oak verge well first try the idea with a constant variable to see if they do accept them

it does accept variables but I don't know how to update it

// in the screen
 "$button_mappings|default": [],
 "button_mappings": "$button_mappings"
// in the long form panel
 "variables": [
    {
        "requires": "not ((#title_text - 'form_name') = #title_text)",
        "$button_mappings": [
            {
                "from_button_id": "button.menu_cancel",
                "to_button_id": "button.menu_exit",
                "mapping_type": "global"
            }
        ]
    },
    {
        "requires": "((#title_text - 'form_name') = #title_text)",
        "$button_mappings": []
    }
]
sudden glade
#

Any idea why hiding buttons in a grid doesn't reorganize the grid

#

basically invisible buttons are taking space

#

Doesn't happen with a stack panel

chilly yacht
#

So they arent visible but they are still there

#

But with stack panels i guess it "removes" the element

sudden glade
#

Is there a solution?

chilly yacht
#

You can have multiple stack panels though

#

Like next to eachother

#

And then you'd just have to write some script so it works properly

sudden glade
mystic heart
weary wind
hollow oxide
sudden glade
# sudden glade Fixed it using this solution, thanks 👍

Any idea on how to eliminate lag when opening the form?

using multiple stack panels next to each other fixed my grid issue but it causes lag instead because the amount of buttons is multipled as I add a new stack panel

so if I have 20 buttons and 4 stack panels the form will process 80 buttons even if some are not visible

Is there a fix?

bronze fractal
#

Any of yall know how to get rid of the text box that pops up when you hold an item? in my addon i have items that have really long names and they take up half your screen and i wanna remove it

weak lintel
bronze fractal
solar maple
weak lintel
#

uh whatcha mean by that

neat sequoia
#

is possible to do a hover text in a label? like this

untold dawn
#

guys,

#

is there any way to change the inventory slots grid?
like changing slot 3 location

#

inventory_screen.json ^

vivid swallow
#

I know absolutely nothing about JSON ui, but can JSON ui detect and react to dynamic properties from script?

I only want to make a simple mana bar sometime in the near future.