#JSON-UI General

1 messages · Page 33 of 1

normal moat
#

I was talking about this ^

mental crystal
#

WTF YOU SAYING MAN?

#

are you high?

mental crystal
#

@torpid axle

#

Man.

torpid axle
mental crystal
torpid axle
mental crystal
#

Can we make the inventory button in touch devices be resized?

#

I mean, it's in there but I'm not so sure if you can

hexed briar
#

yep

weak cape
#
{
    "item_details": {
        "type": "custom",
        "renderer": "hover_text_renderer",
        "allow_clipping": false,
        "bindings": [
            {
                "binding_type": "collection",
                "binding_collection_name": "form_buttons",
                "binding_name": "#form_button_text",
                "binding_name_override": "#hover_text"
            }
        ]
    }
}

how do i make it lang compatible?

#

is it even possible?

normal moat
weak cape
#

but i guess it wont

#

nah

#

doesnt work

normal moat
weak cape
#

erm

#

i forgot to delete the string

#

omg

#

it works

#

thanks bro

weak cape
#

well

#

i got another issue

#
{
    "default": {
        "type": "custom",
        "renderer": "inventory_item_renderer",
        // "property_bag": {
        //     "#item_id_aux": 48627712
        // },
        "bindings": [
            {
                "binding_name": "#form_button_texture",
                "binding_type": "collection",
                "binding_collection_name": "form_buttons"
            },
            {
                "binding_type": "view",
                "source_property_name": "(#form_button_texture * 1)",
                "target_property_name": "#item_id_aux"
            }
        ]
    }
}

it wont render. As far as i know. the source property name doesnt work

#

i tested the source property name and it did not display when i used it on a label

#

when i use the property bag it works

normal moat
weak cape
#

becuase because property bag is working just fine

#

when i try passing the id to my label

#

label disappears

#

but i have no clue why

normal moat
normal moat
weak cape
#

both dont show up when i use this binding

normal moat
#

make sure you conveert it to string first

#

('§z' + #form_button_texture)

normal moat
weak cape
normal moat
weak cape
#

the hover text works, but the label on top of the banner doesnt

#

(the banner rendering doesnt work aswell)

normal moat
#

What's the code for your label

#

it is button text right?

weak cape
#

but i changed it to my texture

#

but it doesnt really matter

#

the rendering doesnt work

#

even tho i use the correct property name

normal moat
#

You can probably check your script and bindings and change some small things. or you can send your label here if you can so I can check

weak cape
#

label was for testing

#

and it displays now (a string integer)

#

but the rendering doesnt work

#

even tho i multiply it by 1

normal moat
#

what rendering?

weak cape
#

the banner

normal moat
#

the texture?

normal moat
#

you mean the item renderer is not working?

weak cape
#

yes

weak cape
#

size doesnt change anything

#

and i used the label to check if i pass the id correctly

normal moat
#

sorry im dumb for asking many ques

weak cape
#

from the content? yes.

#

the item id aux is correct

normal moat
#

try somehting like this->.button("click", "20054016")
try to do something and change small things again and again till it works (that's how json ui works lol)

weak cape
#

netherite ingot does not work

#

but this works

#

wtf

normal moat
#

Do you know correct ids?

weak cape
#

i tested the netherite id using the property bag

#

and it worked

#

using bindings it didnt

normal moat
#

weird

weak cape
#

true

weak cape
normal moat
#

fr

#

@weak cape If you're using these aux ids for your map/addon, I don't recommend it. These change every update if new item/block is added or your addon has custom items

weak cape
#

i just realised it was a bad idea

#

all that work for nothing

normal moat
#

yeah

slim oyster
#

is it possible to add an extra slot in the inventory?

slim oyster
#

a chest slot

#

and use if else

normal moat
#

I mean, yeah you can but it'll not show on player's inventory

outer juniper
# weak cape nope

How does someone just casually make a map without an api available for maps😭

nocturne python
#

It is possible that depending on the name of the entity you have a custom BOSS bar

night flower
#

Hi everyone
How i can get size Y of element?

polar frigate
#

When i change crosshair size, why doesn't it change the size? Instead it just moving it's position :\

cursive field
#

Does anyone have a serverfom base for modalformdata?

torpid axle
#

what

weak cape
mental crystal
#

guys, can anyone give me at least a snippet to make a thing fade it and fade out using alpha? like pause before fading out.

#

-# I suck at searching samples lol

weak cape
#

should work

pallid pumice
#

i am such a smooth brain doing this in the worst way possible but it's slowly working

weak cape
pallid pumice
mental crystal
pallid pumice
#

i used to have this but the java shader broke

#

oooh this is gonna be something

mental crystal
#

it looks bland asf when you don't do that.

pallid pumice
#

oh this is gonna be a chore i'm so excited

weak cape
#

omg

#

i have a nice idea

#

when you are on a island instead of a banner your paper doll is rendered

#

wait

#

wrong chat

#

sorry

pallid pumice
#

lmao

mental crystal
weak cape
#

now i need to change the banners

oak verge
# weak cape

can we crop the render somehow?
like making it inside an element that have clip or overflow or whatever it is called off

rocky quail
#

clips_children

rocky quail
# weak cape

maybe just render the player head, cut off the body with a clipping panel

pulsar hornet
#

how can i manage to edit the behavior of the actionbar to switch from the default to the custom?

mental crystal
pallid pumice
#

fuel fire is most likely going to take a while

weak cape
#

you know what would be cool?

weak cape
#

but behind the coal

#

would be cool af

pallid pumice
#

yeeeee

#

that's gonna be a banger

#

can i check what item is in a slot?

#

i assume not but there's just a lot of stuff

weak cape
#

is it possible to render a block just like the paper_doll/hud_player_renderer

#

i just want to render a banner facing the screen

#

it would be better with animations a banner has

vestal arrow
#

How to show hover_text when i hover my button

weak cape
#

do you mean the tool tip?

#

or just a label when you hover over your button?

vestal arrow
#

Hover text when i hover button

normal moat
weak cape
normal moat
weak cape
#

but yeah youre right

normal moat
weak cape
#

wtf

#

why the hell wont this work

#

or wait

#

should it even work?

#

or its only task is to show the dumb axis?

limpid quarry
#

dynamic forms are nice... but is it alot easier to just make each form individually for design purposes?

#

when redesigning the chestformdata for instance.

ivory aurora
placid geode
#

not possible (i think, since that is ore ui)

weak cape
#

21:37

broken trail
#

its related to entity materials, not here

clever maple
#

oh ok sorry

mental crystal
#

Did I do something wrong?

mental crystal
#

I can add a custom background in server form but in npc screen I don't how lol

placid geode
#

you need to include $child_control in your custom background

#

and the title, and the close button

#

basically, $custom_background it's not just the background, it's the whole thing lol

#
"form_fitting_main_panel_no_buttons": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "anchor_from": "center",
    "anchor_to": "center",
    "$text_name|default": "",
    "$show_close_button|default": true,
    "$use_compact_close_button|default": false,
    "$close_button_offset|default": [ 0, 0 ],
    "$custom_background": "common_dialogs.dialog_background_hollow_3",
    "controls": [
      { "common_panel@common_dialogs.common_panel": { "$dialog_background": "$custom_background" } }
    ]
  },

  "common_panel": {
    "type": "panel",
    "size": [ "100%", "100%c" ],
    "$dialog_background|default": "common.dialog_background_opaque",
    "controls": [
      {
        "bg_image@$dialog_background": {
          "layer": 1
        }
      }
    ]
  },

(from ui_template_dialogs.json)

#

you can "solve" this just by changing student@common_dialogs.form_fitting_main_panel_no_buttons to student@common_dialogs.main_panel_no_buttons

#

This has $child_control and $custom_background separated (and it's the one used in server_form, that's why you can change the background there)

#

or the best in my opinion, redo all the layout lol

rich mica
#

How do I fix the issue of blank buttons?

mental crystal
normal moat
alpine wyvern
torpid axle
#

No, what you see on other stuff is entity inventories.

alpine wyvern
#

ty

pulsar hornet
#

im trying to learn json UI, can someone explain theese errors?

"hud_actionbar_text": {
    "type": "image",
    "size": [
      "100%c + 12px",
      "100%c + 5px"
    ],
    "offset": [
      0,
      "50%-68px"
    ],
    "texture": "textures/ui/hud_tip_text_background1",
    "alpha": 1,
    "controls": [
      {
        "actionbar_message": {
          "type": "label",
          "anchor_from": "center",
          "anchor_to": "center",
          "color": "$tool_tip_text",
          "layer": 31,
          "text": "$actionbar_text",
          "localize": true,
          "alpha": "@hud.anim_actionbar_text_alpha_out",
          "bindings": [
            {
              "binding_name": "$actionbar_text"
            },
            {
              "binding_type": "view",
              "source_property_name": "($actionbar_text = 'ABF')",
              "target_property_name": "visible"
            }
          ]
        }
      }
    ]
  }
weak cape
#

JSON UI parse failure means that a error is in your code that prevents Minecraft form parsing it. It basically means that it is a type-error

#

$actionbar_text is a # property. $ properties are variables set by the developer. # properties are properties set by minecraft, that may be changed.

#

When you set a target_property_name you should use # for properties or $ for variables

mental crystal
#

Umm, guys is there a way if there's a specific item in the slot? For example horse inventory

weak cape
mental crystal
#

tho, I can just make that it only accepts one item

weak cape
#

I never touched containers this deep

mental crystal
weak cape
#

if there is an item? let me check

pulsar hornet
#
"$txt": "$actionbar_text",
"$canshow": "(not ($txt = 'ABF'))",
"text": "($canshow = true ? at - 'ABF')"
weak cape
#

basically using bindings is the only way

pulsar hornet
weak cape
mental crystal
pulsar hornet
weak cape
# pulsar hornet im trying to do is if (text.startsWith('ABF')) text = text.slice(2, text.lengh...
[
    {
        "binding_name": "#form_button_texture",
        "binding_type": "collection",
        "binding_collection_name": "form_buttons"
    },
    {
        "binding_type": "view",
        "source_property_name": "(('%.6s' * #form_button_texture) = 'banner')",
        "target_property_name": "#visible"
    },
    {
        "binding_type": "view",
        "source_property_name": "((#form_button_texture - 'banner#') * 1)",
        "target_property_name": "#item_id_aux"
    }
]

this is one of my binding lists

pulsar hornet
weak cape
#

you can use it for your thing

#

but you will need to change the properties appropiatly

mental crystal
#

so if you're gonna ask why make it as Number, it's a string my multiplying it by one will turn it into a number but this don't work with float values btw only integers

pulsar hornet
#

im trying to achieve a dark-mode and light-mode actionbar for my script

weak cape
mental crystal
weak cape
pulsar hornet
pulsar hornet
#

"bindings": [
{
"binding_name": "#texture"
}
],
i dont know how to start

normal moat
pulsar hornet
normal moat
#

so something that starts with $ is variaable

pulsar hornet
#

i have no idea of how json ui is supposed to work

pulsar hornet
weak cape
# mental crystal update? Lol

well with a "quick" look i cant really tell you sometimes it looks like you could but with inventory? idk you should ask some experts

#

sorry

normal moat
weak cape
#

what about opening a post?

normal moat
#

yup

weak cape
#

it's getting messy here

pulsar hornet
weak cape
#

oh

normal moat
mental crystal
normal moat
mental crystal
#

is that their aux id?

normal moat
mental crystal
normal moat
mental crystal
#

Not literally always but like doesn't need to be hovered

normal moat
#

The label is not inside the button, it just gets the binding from item renderer

mental crystal
#

that's why it's always visible? Wait nvm I think label is always visible lol

normal moat
#

yeah

mental crystal
#

also what's resolve_sibling_scope do?

#

i mostly see this in Mojang json ui

normal moat
#

It allows us to get bindings of the sibling not child

mental crystal
#

I just hope chests aux id isn't changing when there's a custom item registered. since I planned to make that if there's a chest in the slot it shows the inventory, otherwise no

mental crystal
#

Damn.

#

sigh

drifting cosmos
#

How do I JSON code?

drifting cosmos
weak cape
#

look iup in the internet

#

you have some tutorials on youtube

outer juniper
#

Oh ye one thing about modified forms

#

Does it automatically show the one with specific title bindings and function the same or do i need additional code for that

young dune
#

Im trying to find it but I couldve swore there was a thing about making form ui that works with other ones. anyone know what im talking about or how I can do that?

young dune
#

yeah but like how is that set up though?

oak verge
young dune
#

Yeah i know how they work just not sure how to make packs that work together

oak verge
young dune
#

for easiness lets just say i have my own packs I want to work together

oak verge
#

you just add a modification property to the shared element and insert the modifications, there is some examples in the wiki

young dune
#

Yeah but how does that work with custom forms tho? doesnt the normal form need a databinding to not show if the title matchs text?

oak verge
outer stag
#

Anyone have any idea what's up here?

            {
              "binding_type": "view",
              "source_property_name": "(('%.12s' * #hud_title_text_string) - ('%.4s' * #hud_title_text_string))",
              "target_property_name": "#text"
            }
#

For '%.4s', if I use any number except 1, it shows no text at all.

#

But if I use '%.1s', it does.

weak cape
#

Oh I didn't see the text below the codeblock

#

Mb

weak cape
outer stag
weak cape
#

And what are you trying to achieve?

outer stag
#

Hopefully

weak cape
#

So basically 0125,000?

#

Or 125,000 ?

outer stag
weak cape
#

With the space at the end?

outer stag
#

Yes

#

Do you have any idea why the number matters? What makes 1 character different from 2+?

outer stag
#

Works as in shows any text

weak cape
outer stag
#

But any number higher than 1, and no text is shown.

weak cape
#

'%.4' * #binding

outer stag
#

Oh, I see what you're saying.

placid geode
#

with %.1s shows :20125,000 ?

outer stag
#

The problem is that my string might get longer.

weak cape
#

And - binding

outer stag
#

So I really just want to get between those two ranges (4-12)

placid geode
#

then i think i know whats the problem lol

weak cape
#

I can't remember where

placid geode
#

with %.2s text is 20125,000

#

starts with a number

weak cape
#

Oh

placid geode
#

so maybe Minecraft thinks it's a number

#

not a string

weak cape
#

Makes sense

#

You will need to add §z

dusty ether
#

what about flipping the 12 and 4?

outer stag
placid geode
#

yeah

outer stag
weak cape
placid geode
#

but with - %.7s

#

it should display ,000

weak cape
placid geode
outer stag
placid geode
#

that solves the whole problem

outer stag
outer stag
outer stag
dusty ether
#
{
  "binding_type": "view",
  "source_property_name": "(('%.4s' * #hud_title_text_string) - ('%.12s' * #hud_title_text_string))",
  "target_property_name": "#text"
}

wouldn't do it?

placid geode
#

starts with ,

outer stag
#

I'll try that right now

placid geode
#

not a number

outer stag
#

Adding the '§z' tag

weak cape
#

It leaves you with -8

#

You can't have a string with -8 so you have P

#

0

dusty ether
#

That is logical but I saw someone using smaller number - bigger number to achieve the same idea

weak cape
#

Weird

dusty ether
#

sorry for it being an image but it's what I have saved

weak cape
#

Maybe this is how Json UI works

#

And is being illogical

dusty ether
#

I read it as "from 12 to 16"

#

and not "16 - 12"

weak cape
#

He just does the math in a weird way I think

outer stag
weak cape
#

Or they

outer stag
#

So weird, I would've never thought of that.

#

Thank you so much all three of you for your help.

placid geode
#

actually it's logical lol

outer stag
weak cape
#

It they are jumbers then yea

#

Are we on the same page lol?

placid geode
#

XD

placid geode
#

if you try to parse 123,456 it returns 123

#

all after the comma is removed automatically

#

and the comma itself

outer stag
placid geode
#

ik ☠️

#

but you can take advantage of that

outer stag
#

That's true

placid geode
#

example Is the coords text

outer stag
#

Thanks for that, that's a good point

placid geode
#

you get the raw coords x y z

#

then divide by 16

#

and boom you get the chunk coords lol

vernal jacinth
#

Yo anyone know how to use matrix 

#

Money

weak cape
valid ridge
#

Im using live horse renderer, but the problem is it follows the cursor

#

i tried adding this but this seems to only work on player renderer

"property_bag": {
    "#look_at_cursor": false
 }
hardy lily
#

It's been a while. And I forgot how to change the scrollbar again 🤦

normal moat
hardy lily
clear lantern
#

Can anyone point me to the texture or part how I can change default server forms texture?

mental crystal
clear lantern
#

Buttons, frame - default is light gray, as in NPC dialogue, but I would like to change that to little darker

clear lantern
#

Anyone please?

normal moat
#

define these images inside the light text button in server form

clear lantern
#

Very thank you!

normal moat
#

"$custom_background" variable in long_form@common_dialogs.main_panel_no_buttons for the border and background

clear lantern
#

Sorry for bothering, but I don't know. I don't have "$custom_background" variable in default server_form.json from bedrock samples. I should do it myself right?
Same with the images textures. Is there possibility to use color values as RGB?

normal moat
#

and it'll change the background texture

normal moat
#

"color": "blue" or "color": [0, 0, 1] (equivalent to 0, 0, 255)

weak cape
#

how does #banner_color and #banner_patterns look like?

#

wait

#

i can check it using the loom screen

normal moat
weak cape
#

yup

normal moat
weak cape
#

true

clear lantern
#

@normal moat Sorry for ping, but can I use your help once more? How I can change this frame and scroll line color?
Buttons worked and I'm changing them.

normal moat
#

inside scrolling panel

#

you have to test it cuz im not sure if this variable will work. also you have to reference a element in it not the texture path

clear lantern
#

Oki, I will try myself, and the frame? I assume it's in another place too?

normal moat
clear lantern
#

border/frame, on the right of scroll

#

Yes

normal moat
#

$custom_background (not texture path) inside long_form@common_dialogs.main_panel_no_buttons

clear lantern
#

It's not working. Background changed itself to big one color thing - default light gray

normal moat
#

"$custom_background": "server_form.my_background"

#

additionally ```json
"my_background": {
"type": "custom",
"renderer": "gradient_renderer",
"color1": [0,0,0],
"color2": [0,0,0]
}

clear lantern
#

Okay, I've done it and added it under namespace, and it's somehow not working

#

Nevermind, letter missspell

#

Wow, thank you again!

weak cape
mental crystal
#

Guys is there a template for horizontal scroll bar.

weak cape
#

Why is the paper doll render so broken? The center of the doll is in the middle of its neck. Why?

normal moat
#

I think its because of how player model is

weak cape
#

it is annoying

#

now i need to sit and figure out how to make it only show the head whilst being scaled

normal moat
#

yea

weak cape
#

is it possible to multiply string size by a variable?

weak cape
torpid axle
mental crystal
#

Damn, I suck at searching lmfao

#

I searched "horizontal" scroll bar and it gave me nothing

#

Anyways thanks on both of you

rocky oak
#

Hi, where can I go to learn How to use the blocks UI or rather the crafting table ui? I'm Sorry My english is bad, This is translator

weak cape
#

before it started to crash

mental crystal
#

The @server_form is frim @common I changed that since it throws an error

weak cape
#

in that case something with your server_form.horizontal_scroll_view is wrong

#

let me check

weak cape
hardy lily
weak cape
#

interesting lol

hardy lily
#

any idea how to change this toggle texture from server form?

hardy lily
#

Figured it out. But not efficient

tawny gale
#

Chest-UI question!! if i wanted several custom Chest-UI form each with a different background is there some way of setting it via a binding for each one

weak cape
#

you will need to change the texture somewhere placed

normal moat
tawny gale
#

hhhmmmm...... let me have a look into that, i'm guessing that since the background texture is a vaiable i can jsut expose it out in to the server form??

outer stag
#

How to create 'nubs' on a custom bar?

#

This is using the vanilla XP bar texture, but it doesn't seem to be nineslicing to create ridges.

#
{
  "experience_bar": {
    "layer": 1,
    "type": "image",
    "texture": "textures/ui/experiencebarempty",
    "size": [182, 5],
    "controls": [
      {
        "progress": {
          "type": "image",
          "layer": 2,
          "$one": 1,
          "$max_health": 20.0,
          "clip_direction": "left",
          "clip_pixelperfect": false,
          "texture": "textures/ui/experiencebarfull",
        }
      }
    ]
  }
}
normal moat
# outer stag

The thing you can do is to make a different texture above it so it looks like it has nubs

placid geode
#

That's actually what Mojang does

clear lantern
#

How I can use Nine-slice texture for json? Can anyone help me?

#

VS Code telling me it's wrong and I don't know how I can set it up, so my texture will work as nineclice format

west dawn
#

I think thats just blockception, its correct tho

clear lantern
#

Yeah, but still my texture is not properly scaled

#

This is my texture

#

.png format, json is in ui/ folder

#

What am I doing wrong?

outer juniper
#

Hmm

#

I've seen string reading notation in json ui but how does it work?

placid geode
clear lantern
#

I have both - In ui folder I have style.json and in the textures/ui folder I have the same style.json file

#

Where png file is

placid geode
#

and your texture is style.png?

clear lantern
#

sorry, all things I have style_dark - style_dark.json and style_dark.png

#

I used the same information as in #1072983602821861426 -> Notification ui thingy post

placid geode
#

hmmm strange

chilly yacht
#

"tiled": true will make the image repeat itself to whatever size the panel is

clear lantern
#

Okay, if I'm modifying json things can I /reload all or exit-start map and it will work or should I export map and again start it to make things working?
If it's stupid question sorry, I'm starting with json ui

weak cape
clear lantern
#

Oh jeez, it worked... Soo, what I did, I just export map and import again with all stuff in resource pack. And it worked xd

#

So I was wrong about relaying on knowledge that /reload all do all things

outer juniper
#
  • Use conditional title bindings
  • Use a form factory
  • Works on modals only
#

Anything else i should note about making custom forms?

valid ridge
#

is it possible to add a "add server" feature on console with only json UI?
console doesn't have that function thats why they can't join servers without friend connect

outer stag
#

Is it possible to apply alpha to the paper doll renderer?

#

It doesn't seem to work for me, if so.

outer stag
#

But otherwise no. UI modification is for resources; such an implementation would require an actual backend feature to back it up.

valid ridge
#

but maybe, you know how the "export world" addon worked with mcpe? it only used resource pack for it to unhide the export button

#

maybe its possible for console players too in terms of unhiding the add server feature, idk

placid geode
#

Maybe that's why Mojang uses size animation on it

placid geode
#
  1. Local world transfer on #1072983602821861426
#
  1. add this in your play_screen.json
#
"add_server_toggle_button": {
  "visible": true,
  "bindings": []
}
#

don't know if it works cuz im not a console player XD

hardy lily
#

I wonder if I can add +1 and -1 button between the sliders 🤔

#

is it even possible?

normal moat
#

probably not

turbid nimbus
clear lantern
turbid nimbus
hardy lily
#

sad

oak verge
#

i want to update my nineslice viewer to account for the other two cases, my current code only use Vector4.
do any of you know what the other two mean?
i know int mean the same numbers in all 4 sides, but what does Vector2 mean

normal moat
#

so we don't have to do like: [6, 2, 6, 2] but [6, 2]

oak verge
normal moat
oak verge
#

alr
thanks

mental crystal
#

ohh.

#

New information yey

#

I can just [1,0] it now

normal moat
oak verge
#

ok

#

vanilla sample don't use it

normal moat
oak verge
#

let me test and update it if it is

oak verge
#

yeah, it doesn't work

normal moat
mental crystal
mental crystal
#

Guys what does focus_enabled do in buttons?

hexed briar
#

Allows controller or keyboard (Keys only) able to select the content.

#

Although there's actually alot more than just focus_enabled, so enabling or disabling that alone will do nothing.

mental crystal
#
{
  "button": {
    "type": "button",
    "size": [
      32,
      32
    ],
    "layer": 10,
    "anchor_from": "top_left",
    "anchor_to": "top_left",
    "default_control": "default",
    "hover_control": "hover",
    "pressed_control": "pressed",
    "focus_enabled": true,
    "$offset|default": [0,0],
    "offset": "$offset",
    "controls": [
      {
        "default": {
          "type": "image",
          "texture": "textures/ui/button_borderless_light"
        }
      },
      {
        "hover": {
          "type": "image",
          "texture": "textures/ui/button_borderless_lighthover"
        }
      },
      {
        "pressed": {
          "type": "image",
          "texture": "textures/ui/button_borderless_lightpressed"
        }
      }
    ]
  }
}```
#

guys, how do I change the offset of the button, when hovering and change too when default or pressed

#

I know you can add another control inside of the hover tho I'm not so sure if I can just set offset like that

#
"controls": [
   {
      "hover": {
         // ...
         "controls": [
            {
               "offset": {
                  "$offset": [0, 10]
               }
            }
         ]
      }
   }
]```
#

valid?
-# those the redundancy is insane asft

outer juniper
#

Ye uhh one question

#

How do i change the colour of the background panel in custom forms

#

Is it a texture or

mental crystal
west dawn
mental crystal
mental crystal
#

do I put it as a panel instead and put the controls in the main panels I used to display?

#

:)

outer juniper
#

I apologise if i pinged

mental crystal
#
{
  "custom_form_panel": {
    "type": "panel",
    "size": [
      "100%",
      "100%"
    ],
    "controls": [
      {
        "button@button": {
          "offset": "$offset"
        }
      }
    ]
  },
  "button": {
    "type": "button",
    "size": [
      32,
      32
    ],
    "layer": 10,
    "anchor_from": "center",
    "anchor_to": "center",
    "default_control": "default",
    "hover_control": "hover",
    "pressed_control": "pressed",
    "focus_enabled": true,
    "$offset|default": [0,0],
    "offset": "$offset",
    "controls": [
      {
        "default": {
          "type": "image",
          "texture": "textures/ui/button_borderless_light",
          "$offset": [0,0]
        }
      },
      {
        "hover": {
          "type": "image",
          "texture": "textures/ui/button_borderless_lighthover",
          "$offset": [0,-50]
        }
      },
      {
        "pressed": {
          "type": "image",
          "texture": "textures/ui/button_borderless_lightpressed",
          "$offset": [0,0]
        }
      }
    ]
  }
}```
#

Is there a way to move the button itself not just the image

worldly steppe
#

Guys does anyone knows what font used for Studios text in Mojang's logo

outer stag
#

Is there a way to modify the UI element for the item renderer that is shown when an item is attached to your cursor?

#

Like if I grab something in my inventory, and the item is now following my cursor; is there a way to modify that item renderer? I want to make it bigger.

outer stag
#

Also, has this been figured out? I'm having this issue as well.

outer stag
#

I want to display a label that contains the information of the item I'm hovering over in inventory.
I found (very little) information on this, and was tinkering around with collection panels, but I can't seem to figure it out.

Here's what I have:

  "collection": {
    "type": "collection_panel",
    "collection_name": "hotbar_items",
    "controls": [
      "hotbar_slot_0@hotbar_data_item",
      "hotbar_slot_1@hotbar_data_item",
      "hotbar_slot_2@hotbar_data_item",
      "hotbar_slot_3@hotbar_data_item",
      "hotbar_slot_4@hotbar_data_item",
      "hotbar_slot_5@hotbar_data_item",
      "hotbar_slot_6@hotbar_data_item",
      "hotbar_slot_7@hotbar_data_item",
      "hotbar_slot_8@hotbar_data_item"
    ],
    "bindings": [
      {
        "source_control": "hotbar_slot_0",
        "source_property": "selected_id",
        "target_property": "#hid_0"
      },
      {
        "source_property": "#hid_0",
        "target": "#item_id"
      }
    ]
  }
#

I haven't done anything this advanced before, so I'm a little lost. Would anyone be able to provide some insight on this?

chilly yacht
mental crystal
#

it's ..._name right?

chilly yacht
#

Yes and no

#

No @ is basically just an extension of the namespace in that file

outer stag
normal moat
mental crystal
#

tho they can still use glyphs instead

normal moat
weak cape
normal moat
#

In chest ui, we have no other option so we have to update it everytime

outer stag
#

My goal is to create a stationary label element (in the inventory screen) that displays information (such as the item's name) of the item I'm currently hovered over.

normal moat
normal moat
outer stag
#

Thank you, I didn't know that binding exists. I'll try that.

normal moat
outer stag
#

Also, another question I had; if that binding works for the selected item, is there a way to index a specific item? (Ex. The 21st item in your inventory)

outer stag
#

I wanted to make just like a stationary label with item information.

hexed briar
#

You can recreate them without renderer, although be noted that it's gonna be shaky as hell if spinning your cursor too much.

#

or you can recreate them except this time are fixed position and not following the cursor.

outer stag
outer stag
normal moat
hexed briar
#

it's not that hard to recreate something like this when the renderer itself has the exact bindings you need.

outer stag
#

I've seen mentions of people indexing specific form buttons, but I'm not sure how that would work with the inventory collection.

#

Is there a way to get the binding for a specific item of the item collection?

hexed briar
outer stag
hexed briar
#

It's a manual version of index.

#

something you can directly modify the index if needed, although there's pretty big cons

It's not dynamic, are also unoptimized, will likely cause performance issues if the index is way to much

outer stag
hexed briar
#

This only useful if you're doing something like a different server forms button in different positions etc

outer stag
#

Can you just use:

"collection_index": X,

...as a property, or is there a binding for it?

hexed briar
#

so you just basically gonna copy and paste each elements in different index numbers to find out.

outer stag
#

That's fine, I suppose.

#

But so you do use the collection index property?

#

But then how do you get the binding of that object from the collection index. Do you just use the #collection_index itself as the collection name?

hexed briar
# outer stag But so you do use the collection index property?

probably something like this

"test": {
  "type": "stack_panel/collection_panel",
  "collection_name": "<The name of collection>"
  "controls": [
     {
        "index_0@<element that grid or factory has>": {
           "collection_index": 0
        }
     },
     {
        "index_1@<element that grid or factory has>": {
           "collection_index": 1
        }
     },
     ...
  ]
}```
#

that's what i remember and somehow wrote it with my phone keyboard for some reason

outer stag
#

I guess that's a good way to do it.

#

Thank you, this is extremely helpful.

hexed briar
#

there's common rules on json-ui — you don't do something like that for unnecessary things.

#

but if you want that i guess go ahead

#

but again, creating too many element indexs will cause some increased UI loading time or lag.

outer stag
#

Which means I need that specific slot; I can't think of another way to do that.

hexed briar
#

but i guess 30~ slots shouldn't be a problem i suppose

outer stag
#

And to be clear, it's just the one slot I need.

runic portal
#

hi, does anyone have a nine slice viewer website

#

i remember one surfaced a while back but cant seem to remember it

runic portal
#

yea thats it, thanks guys

hexed briar
#

if you don't want to create too many indexs ofc

outer stag
#

I'll try that!

hexed briar
#

it should pin point the closest slot you want

#

if that isnt what the slot you want, just decrease or increase the number i suppose

#

you'll eventually find it

outer stag
hexed briar
#

yeah

#

it will fetch some stuff from the current index it on.

#

e.g third slot is dirt block, that binding that has collection will fetch that dirt block

outer stag
#

Does it need inside of a specific object? It doesn't seem to be displaying anything.

hexed briar
#

you need the correct collection name though.

#

you should see them somewhere like factory or grid elements that contain slots related.

#

I'm not certain which one though tbh since i don't really modify inventory or chest related that much

outer stag
#

That seems to be selected_item_details_factory

normal moat
#

for inventory items, collection name is inventory_items

outer stag
#
  "highlighted_item_display": {
    "type": "label",
    "text": "#selected_hover_text",
    "bindings": [
      {
        "binding_name": "#selected_hover_text",
        "binding_type": "collection",
        "binding_collection_name": "inventory_items"
      }
    ]
  },

In that case, shouldn't this be correct?

normal moat
#

not sure never done something like that

outer stag
#

Hmm

#

I'll keep trying. Thanks for your help.

hexed briar
#

though that's as far as i remember. maybe in the future if i do something like server forms again

outer stag
#

Or does it need to be wrapped in a panel to work

hexed briar
#

if there's none, you can't use collection index.

#

because it doesn't know which one it should be looking for.

outer stag
#
    "type": "stack_panel",
    "collection_name": "inventory_items",
    "controls": [
      {
        "label": {
          "type": "label",
          "text": "#selected_hover_text",
          "bindings": [
            {
              "binding_name": "#selected_hover_text",
              "binding_type": "collection",
              "binding_collection_name": "inventory_items"
            }
          ]
        }
      }
    ]
#

I tried this, but it still doesn't seem to be working.

hexed briar
#

you forgot the index.

#

"collection_index": 0

outer stag
hexed briar
#

collection stuff doesn't work outside of factory or grid unfortunately.

outer stag
#

Or am I misunderstanding? Do you still need a collection index for selected_hover_text?

#

Oh, hmm

normal moat
#

        "label": {
          "type": "label",
          "text": "#selected_hover_text",
          "bindings": [
            {
              "binding_name": "#selected_hover_text",
              "binding_type": "collection",
              "binding_collection_name": "inventory_items"
            },
{
"binding_type": "collection_details",
              "binding_collection_name": "inventory_items"
}
          ]
        }
      }
```try something like this
hexed briar
#

yeah you can't use collection property without either factory or grid.

but if index, again. it's manual and therefore you'll have to do stuff like the one i showed you.

normal moat
outer stag
normal moat
outer stag
#

Still doesn't seem to be any change.

hexed briar
#

yeah idk what's easier for you.

#

but you could do condition renderer.

#

actually nevermind it's getting complicated than i thought.

outer stag
#

Yeah, this whole thing has gotten way more complicated than I would've guessed to just get the hover text details without using the hover text renderer.

#

I guess that's JSON UI for you, though. I'm just going to keep experimenting.

hexed briar
#

i kinda know how but too busy unfortunately.

normal moat
#

actually #selected_hover_text seems like some hardcoded thing which works in its factory or something and not associated with collections

normal moat
outer stag
outer stag
#

Maybe I can interject something between the factory and the tooltip text.

hexed briar
#

your best bet is to use condition render.

#

you can use it to detect a certain strings and make the entire text element invisible.

#

also use that to display your custom one aswell.

#

there's wiki for that

outer stag
hexed briar
#

like if my string ("hello world") contains "hello", element disappears.

#

this also means you can use prefix too.

outer stag
#

I might be misunderstanding, but I don't understand how that would accomplish my goal of getting the item details for a selected item

hexed briar
#

eh.

#

nevermind

#

I'll see what can i do tomorrow.

outer stag
normal moat
outer stag
#

I need to try this!! Thank you, LeGend!!

#

Wait, but is that still parented to the tooltip text?

normal moat
outer stag
normal moat
outer stag
#

That's what I was thinking. I'll try that right now.

outer stag
#

Now I only need to figure out how to unanchor it from the inventory slot.

#

This is a huge step up. Thank you so much, LeGend.

normal moat
outer stag
#

Is there no way to anchor a child element to something that isn't its parent?

normal moat
outer stag
normal moat
#

just try anywhere

outer stag
#

Alright, that's a good idea

#

I'll try it right now

normal moat
#

make sure to define $item_collection_name: inventory_items

normal moat
outer stag
# normal moat make sure to define $item_collection_name: inventory_items

Just to confirm, this is what you had in mind?

  "custom_text": {
    "layer": 29,
    "type": "label",
    "text": "#hover_text",
    "$item_collection_name": "inventory_items",
    "bindings": [
      {
        "binding_name": "#hover_text",
        "binding_type": "collection",
        "binding_collection_name": "$item_collection_name"
      }
    ]
  },
normal moat
#

yeah

outer stag
normal moat
outer stag
#

I created the element, but forgot to actually insert it into the inventory UI.

#

Weirdly, it now works (there's a stationary text label)

#

But it only reads the first item of my inventory consistently.

#

And if I change the first item, it changes too. It's just indexing the first item for some reason.

#

I guess that might make sense, because the highlight slot panel was probably receiving an index value as it was attached to a slot.

outer stag
#

I'm not sure which is more viable to attempt at this point.

normal moat
outer stag
normal moat
#

probably complex/dunno

normal moat
outer stag
#

Or maybe it just didn't work 🤷

normal moat
#

welp, i have no idea then

#

probably see tomorrow

outer stag
mental crystal
#

Guys.

#

how do I use offset anim type? how do I add anims in the whole button, not the texture only itself since they have separate shit

#
{
  "button": {
    "type": "button",
    "size": [
      32,
      32
    ],
    "layer": 10,
    "anchor_from": "center",
    "anchor_to": "center",
    "default_control": "default",
    "hover_control": "hover",
    "pressed_control": "pressed",
    "focus_enabled": true,
    "controls": [
      {
        "default": {
          "type": "image",
          "texture": "textures/ui/button_borderless_light"
        }
      },
      {
        "hover": {
          "type": "image",
          "texture": "textures/ui/button_borderless_light"
        }
      },
      {
        "pressed": {
          "type": "image",
          "texture": "textures/ui/button_borderless_light"
        }
      }
    ]
  }
}```

guy, can someone help me how do I make the button will animate to move offset -50 in y axis and stay there FOREVER unless when I unhover it will animate going back to 0
torpid axle
#

i guess add a button on the button

placid geode
#

guys

#

what do you think about a marketplace like form

torpid axle
placid geode
#

XD

#

i think no one uses marketplace, but this is just an ui for server form

rocky quail
placid geode
placid geode
mental crystal
#

Umm. I think this is not possible but is there a way to make the crosshair show up?

#

Forcefully?

#

because when you're in touch you can disable the crosshair right? But when you hold range weapons like bow, triden and etc... they forcefully show it

#

Possible to do that?

#

-# just a hunch

rocky quail
#

yes

#

there's ways to do that

#

custom geo, json ui

mental crystal
#

yeah I know but I want the most important one lol

#

the color inversion of it.

#

-# wait iirc someone made a material for particle

#

json ui support color inversion?
-# advanced answer: no i think?

rocky quail
#

i made one, but instead to make the world bright, like night vision

mental crystal
#

how'd you do that?

#

anyways... Is there a way to make the image change color based on the value of the slider?

#

like a preview.

#

-# I'm coming back to my old projects lol

#

Since it doesn't accept a value inside of an array.

#

Without making it as a whole array

opal aurora
#

i saw someone played the game in inverted colors but only the world is affected

frigid crown
#

I want to create new health bar and hunger bar displays. Are there any good approaches?
Currently, I plan to get data from a string thrown by sapi through the title, but I can't distinguish whether the data is for health or hunger. In JSON UI, is it possible to conditionally store and update variables?
Like in JavaScript:
var foo = 1;
if (STH) foo = 2;

#

This is my test. A problem occurs whenever I input something that doesn't start with 'test.

finite jetty
finite jetty
#

But it looks like this instead

normal moat
#

you have to put controls inside {}

normal moat
finite jetty
#

Like this?

finite jetty
normal moat
#

no, im talking about the things inside the controls. controls is an array[]

finite jetty
#

oh

finite jetty
normal moat
#

they're not

finite jetty
#

Is it the size?

#

does that have to be {}

normal moat
#

you have to put everything inside controls array inside {}

finite jetty
normal moat
random whaleBOT
#
Linting JSON

Linting is the ability to validate code as correct, or incorrect. JsonLinter is a website that will point out json-formatting issues like mismatches curly braces for you.

https://jsonlint.com/

normal moat
#

Check your code ^

placid geode
#

notepad++ 🔛🔝

finite jetty
#

I only put in this part so far

finite jetty
normal moat
#

that is not the problem

finite jetty
#

Then I'm confused

normal moat
finite jetty
#

Ok

normal moat
# finite jetty Ok

also controls array is like this

"controls":[
  {"elem1": {}},
  {"elem2": {}},
  {"elem3": {}}
]```
finite jetty
#

Is that right now?

weak cape
# random whale

LMAO. I read " issues like mismatches curly braces OR you.

#

instead of "for"

plucky token
#

Hi, does anyone know if it is possible to call an element that is inside a panel?

weak cape
#

what do you mean?

#

like if you have a panel with "image1"

#

and you want to have image1 displayed in panel2?

#

in that case just define image1 inside the namespace

#

and use namespace.image1

gaunt apex
mental crystal
#

guys

#

how to use the tiles in images

torpid axle
#

use tile

mental crystal
torpid axle
#

dude im telling you it just "tiled": true

mental crystal
torpid axle
mental crystal
#

I wanna show something

#

-# not an impressive thing but I'm happy since it took me 1 hour to discover it lmfao

#

Hey.

#

I came back since I need it... AGAIN lol

mental crystal
#
{
  "centered_gui_elements_at_bottom_middle_touch": {
    "offset": [0, 0.0],
    "$update_string": "bar.",
    "use_anchored_offset": true,
    "property_bag": {
      "#anchored_offset_value_y": 0.0
    },
    "modifications": [
      {
        "array_name": "controls",
        "operation": "insert_front",
        "value": [
          {
            "[email protected]_progress_bar": {}
          }
        ]
      }
    ],
    "bindings": [
      {
        "binding_name": "#hud_title_text_string"
      },
      {
        "binding_name": "#hud_title_text_string",
        "binding_name_override": "#preserved_text",
        "binding_condition": "visibility_changed"
      },
      {
        "binding_type": "view",
        "source_property_name": "(not (#hud_title_text_string - $update_string = #hud_title_text_string))",
        "target_property_name": "#bool"
      },
      {
        "binding_type": "view",
        "source_property_name": "((#bool * -1))",
        "target_property_name": "#anchored_offset_value_y"
      }
    ]
  }
}```
#

i can't make this work

#

yes it moves it tho, when it's true the whole panel disappears

#

did it use it wrong?

hollow oxide
#

how to do this? or can someone send me the rp? Pls

mental crystal
#

I saw this, does it apply to my problem?

#

so 1 = 100?

turbid nimbus
weak cape
placid geode
#

1 = 100%

vernal jacinth
#

Anyone know how to fix

#

I want this

mental crystal
#

guys, why the anchored offset doesn't work on the hotbar chooser.

{
  "exp_progress_bar_and_hotbar/resizing_xp_bar_with_hotbar/empty_progress_bar/full_progress_bar/progress_bar_nub/horse_jump_rend/dash_rend/hotbar": {
    "offset": [
      4,
      16
    ],
    "$update_string": "bar.",
    "$percent": 0.01,
    "use_anchored_offset": true,
    "property_bag": {
      "#anchored_offset_value_y": 0.0
    },
    "modifications": [
      {
        "array_name": "bindings",
        "operation": "insert_front",
        "value": [
          {
            "binding_name": "#hud_title_text_string"
          },
          {
            "binding_name": "#hud_title_text_string",
            "binding_name_override": "#preserved_text",
            "binding_condition": "visibility_changed"
          },
          {
            "binding_type": "view",
            "source_property_name": "(not (#hud_title_text_string - $update_string = #hud_title_text_string))",
            "target_property_name": "#bool"
          },
          {
            "binding_type": "view",
            "source_property_name": "((#bool * 30) * $percent)",
            "target_property_name": "#anchored_offset_value_y"
          }
        ]
      }
    ]
  }
}```
#

I set the value very high and still don't work

placid geode
#

try placing bindings without using modifications

#

Also, i recommend you enable content log gui

mental crystal
placid geode
#

so you can see wheres the error

mental crystal
#

I'll be back

mental crystal
placid geode
#

hmmm

#

try removing the $percent part

#

or set $percent = 1

#

maybe you cant use floats lol

mental crystal
#

Bruh

#

It works in other than this? Lol

#

If someone can help, thank you

mental crystal
#

quick question guys

#

in the xp bar, their size is based on hotbar_chooser right? When I ignore or visible it the xp bar is affected too?

#

Right?

mental crystal
#

guys, for some reason I can't use the include thing in chat

#

when I do (#text = 'bar.') it shows when the text is exactly that but when I do (not (#text - 'bar.' = #text)) it shows the image even if it's not included

placid geode
#

use ('%.4s' * #text = 'bar.') (or (('%.4s' * #text) = 'bar.'))

#

so if starts with bar. then shows the image

#

if still not working, pass your code lol

mental crystal
#

tho, know any reasons why it doesn't work in the chat?

placid geode
#

idk lol

vernal jacinth
#

Yo so I downloaded this pack and wanted to edit the scoreboard

#

When I edit it the whole config stoped working can someone help

hexed briar
#

also little reminder that (#string = 'something') has pretty high chance of not working if there's hidden symbols like these.

mental crystal
#

like almost everything

hexed briar
#

maybe they did that in such a hacky way that they have to slide some § symbol to do so.

hexed briar
#

there's no color bindings or anything anywhere so, yeah they just did that.

mental crystal
#

damn that's why (not (('%.4s' * #text) = 'bar.'))

#

Doesn't return true even if the word bar. is in the first place

hexed briar
#

you could try skip that after the color symbol, maybe that might work.

mental crystal
#

hmm, what I'm doing is bar.<number>

#

It will always only returns true if the text is exactly that

#

not if it's included or it's in the first place

sharp zinc
#

what file has the namespace common?

#

i've been trying to find it

hexed briar
#

ui_common.json

sharp zinc
#

ty

mental crystal
#

anyways, what's the size of root_panel?

#

i need to know since I'm using an anchored offset value and what I'm moving is under the root panel

hexed briar
#

aka — "100%" within safezone area.

mental crystal
#

knew it but how do I use that for my 😭😭

hexed briar
#

they're default so i don't think offset aren't gonna work.

#

unless you're using it on stack panel.

mental crystal
#

Looks like I'll be manually position it sigh

hexed briar
#

which most hud elements are usually just stack panels might probably be the cause of your problem i suppose.

mental crystal
#

I'm moving the centered_gui_elements_at_bottom_middle

#

is it a bad idea if I just move each hearts individually?

#

Since their parent is that

#

and I know the size in y-axis

hexed briar
#

Depends on the UI mode.

mental crystal
#

It's classic both touch and not

hexed briar
#

if you're using classic UI, the extra heart goes up. if pocket UI, extra heart goes bottom.

#

that's hardcoded.

mental crystal
hexed briar
#

also it's uh renderer. i don't think you can move them individually

#

you move the render and all heart will just follow along with it

mental crystal
# hexed briar also it's uh renderer. i don't think you can move them *individually*

I'm talking about this.

"controls": [
      {
        "heart_rend@heart_renderer": {
          "offset": [ -1, -40 ],
          "anchor_from": "bottom_left",
          "anchor_to": "bottom_left"
        }
      },
      {
        "horse_heart_rend_0@horse_heart_renderer": {
          "offset": [ 180, -56 ],
          "anchor_from": "bottom_left",
          "anchor_to": "bottom_left",
          "bindings": [
            {
              "binding_name": "#creative_horse_hearts",
              "binding_name_override": "#visible"
            }
          ]
        }
      },
    ```
#

sorry, if my English was bad lol

#

Not literally EVERY heart

#

like every heart tyoe

#

Horse, player, hunger, bubble, and so on tho their not actually hearts

hexed briar
#

go ahead i guess, see what sticks for you.

#

it shouldn't cause any problems.

mental crystal
#

fire yey

#

imma sleep and do this tomorrow

#

Good night everyone

sharp zinc
#

anyone know where i can find text with a scroll bar? i'm looking at popup dialog but i'm having trouble finding where it's at

normal moat
sharp zinc
#

nvm i got it

#

ty for responding though

sharp zinc
#
"buttons": {
                    "type": "panel",
                    "size": [
                        "100%",
                        "100%"
                    ],
                    "anchor_from": "bottom_middle",
                    "anchor_to": "bottom_middle",
                    "controls": [
                        {
                            "modal_middle_button@common_buttons.light_text_button": {
                                "anchor_to": "bottom_middle",
                                "anchor_from": "bottom_middle",
                                "size": [
                                    "20%",
                                    "10%"
                                ],
                                "offset": [
                                    "-11%",
                                    0
                                ],
                                "$button_text": "#modal_rightcancel_button_text",
                                "$pressed_button_name": "#modal_rightcancel_button_text",
                                "button_mappings": [
                                    {
                                        "from_button_id": "button.menu_select",
                                        "to_button_id": "$pressed_button_name",
                                        "mapping_type": "pressed"
                                    },
                                    {
                                        "from_button_id": "button.menu_ok",
                                        "to_button_id": "$pressed_button_name",
                                        "mapping_type": "focused"
                                    }
                                ]
                            }
                        },
                        {
                            "modal_left_button@common_buttons.light_text_button": {
                                "anchor_to": "bottom_middle",
                                "anchor_from": "bottom_middle",
                                "size": [
                                    "20%",
                                    "10%"
                                ],
                                "offset": [
                                    "11%",
                                    0
                                ],
                                "$button_text": "#modal_left_button_text",
                                "$pressed_button_name": "#modal_left_button_text",
                                "button_mappings": [
                                    {
                                        "from_button_id": "button.menu_select",
                                        "to_button_id": "$pressed_button_name",
                                        "mapping_type": "pressed"
                                    },
                                    {
                                        "from_button_id": "button.menu_ok",
                                        "to_button_id": "$pressed_button_name",
                                        "mapping_type": "focused"
                                    }
                                ]
                            }
                        }
                    ]
                }

button code above ^^

#

idk much about button mappings / buttons in general

normal moat
sharp zinc
#

button id?

normal moat
normal moat
#

wait I meant MessageForm

sharp zinc
#

modal_dialog_popup

normal moat
sharp zinc
#

okie, i will try

#

:O

#

it works, tyyy

mental crystal
#
{
  "centered_gui_elements_at_bottom_middle_touch/heart_rend": {
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "$percent": 0.02,
    "use_anchored_offset": true,
    "property_bag": {
      "#anchored_offset_value_y": 0.0,
      "#anchored_offset_value_x": 0.0
    }/*,
    "bindings": [
      {
        "binding_name": "#hud_title_text_string"
      },
      {
        "binding_name": "#hud_title_text_string",
        "binding_name_override": "visibility_changed"
      },
      {
        "binding_type": "view",
        "source_property_name": "(not (#hud_title_text_string - 'bar.' = #hud_title_text_string))",
        "target_property_name": "#bool"
      },
      {
        "binding_type": "view",
        "source_property_name": "(#bool * 6) * $percent",
        "target_property_name": "#anchored_offset_value_y"
      }
    ]*/
  }
}```
#

guys, for some reason the heart moved even tho I didn't really messed with the offset, I only added anchored offset

placid geode
#

heart_rend already has a defined anchor

#

change the bottom_middle to bottom_left

mental crystal
#

It goes under the hotbar, like it's a stack panel

#
{
  "centered_gui_elements_at_bottom_middle_touch/heart_rend": {
    "$percent": 0.02,
    "use_anchored_offset": true,
    "property_bag": {
      "#anchored_offset_value_y": 0.0
    },
    "bindings": [
      {
        "binding_name": "#hud_title_text_string"
      },
      {
        "binding_name": "#hud_title_text_string",
        "binding_name_override": "visibility_changed"
      },
      {
        "binding_type": "view",
        "source_property_name": "(not (#hud_title_text_string - 'bar.' = #hud_title_text_string))",
        "target_property_name": "#bool"
      },
      {
        "binding_type": "view",
        "source_property_name": "(#bool * 6) * $percent",
        "target_property_name": "#anchored_offset_value_y"
      }
    ]
  }
}```
placid geode
#

oh yeah, when you use anchored offset, normal offset no longer works

mental crystal
#

BRUH

#

Know any way to counter that?

placid geode
#

set an offset in the offset lol

#

((#bool * 6) * $percent + 5)

#

like that

#

just find the right value

mental crystal
mental crystal
#

(((#bool * 6) * $percent) + 0.8)

placid geode
#

hmmm

#

set the offset before

placid geode
mental crystal
#

didn't work :(

#

(0.8 + ((#bool * 6) * $percent))

#
{
  "centered_gui_elements_at_bottom_middle_touch/heart_rend": {
    "$percent": 0.02,
    "use_anchored_offset": true,
    "property_bag": {
      "#anchored_offset_value_y": 0.0
    },
    "bindings": [
      {
        "binding_name": "#hud_title_text_string"
      },
      {
        "binding_name": "#hud_title_text_string",
        "binding_name_override": "visibility_changed"
      },
      {
        "binding_type": "view",
        "source_property_name": "(not (#hud_title_text_string - 'bar.' = #hud_title_text_string))",
        "target_property_name": "#bool"
      },
      {
        "binding_type": "view",
        "source_property_name": "(0.8 + ((#bool * 6) * $percent))",
        "target_property_name": "#anchored_offset_value_y"
      }
    ]
  }
}```
placid geode
#

hmmm

#

(0.8 + ((#bool * 1) * ($percent * 6)))

placid geode
mental crystal
#

So anyone can explain why using anchored offset doesn't work in renderers

#
{
  "centered_gui_elements_at_bottom_middle_touch": {
    "$percent": 0.01,
    "use_anchored_offset": true,
    "property_bag": {
      "#anchored_offset_value_y": 0.0
    },
    "bindings": [
      {
        "binding_name": "#hud_title_text_string"
      },
      {
        "binding_name": "#hud_title_text_string",
        "binding_name_override": "#preserved_text",
        "binding_condition": "visibility_changed"
      },
      {
        "binding_type": "view",
        "source_property_name": "(not (#hud_title_text_string - 'bar.' = #hud_title_text_string))",
        "target_property_name": "#bool"
      },
      {
        "binding_type": "view",
        "source_property_name": "((#bool * 3) * $percent)",
        "target_property_name": "#anchored_offset_value_y"
      }
    ],
    "modifications": [
      {
        "array_name": "controls",
        "operation": "insert_back",
        "value": [
          {
            "[email protected]_bar": {}
          }
        ]
      }
    ]
  }
}```
#

I just sued my old one....

#

it's almost perfect but there's 1px difference that I can't fix or I dunno how to fix.

#

-# since I can't access the height size of the parent

mental crystal
#

how to remove existing binding??

normal moat
graceful wharf
#

my recipies keep overlapping when I scroll in the crafting table; anyone know a fix for this?

outer stag
#

Does anyone know of a way to 'cache' a variable in UI when it is opened?

#

So for example, if I have an element with the value 'a' when the UI is opened, no matter what value it changes to (even empty), it should still evaluate 'a'.

#

Not sure if I'm explaining this very well.

west dawn
#

binding_condition: once?

fathom pivot
#

How I can rotate the paper doll when I touching on

outer stag
#

I haven't tried it yet, but that sounds right.

outer stag
#

Try live_player_renderer

#
{
  "paper_doll": {
    "type": "custom",
    "renderer": "live_player_renderer",
    "property_bag": {
      "#look_at_cursor": true
    },
    "animation_reset_name": "screen_animation_reset",
    "anims": [
      "@common.screen_exit_size_animation_push",
      "@common.screen_exit_size_animation_pop",
      "@common.screen_entrance_size_animation_push",
      "@common.screen_entrance_size_animation_pop"
    ]
  }
}
outer stag
fathom pivot
#

Yes

outer stag
#

I don't really know; maybe hud_player_renderer?

outer stag
#

Works perfectly.

mental crystal
#
{
  "centered_gui_elements_at_bottom_middle_touch": {
    "modifications": [
      {
        "array_name": "bindings",
        "operation": "insert_front",
        "value": [
          {
            "binding_type": "global",
            "binding_name": "#hud_visible_centered",
            "binding_name_override": "#bool1"
          },
          {
            "binding_name": "#hud_title_text_string"
          },
          {
            "binding_name": "#hud_title_text_string",
            "binding_name_override": "#preserved_text",
            "binding_condition": "visibility_changed"
          },
          {
            "binding_type": "view",
            "source_property_name": "(not (#hud_title_text_string - 'bar.' = #hud_title_text_string))",
            "target_property_name": "#bool2"
          },
          {
            "binding_type": "view",
            "source_property_name": "(#bool1 and #bool2)",
            "target_property_name": "(not #visible)"
          }
        ]
      },
      {
        "array_name": "bindings",
        "operation": "remove",
        "where": {
          "binding_name": "#hud_visible_centered"
        }
      }
    ]
  }
}```
#

guys, did I do something wrong? I want that if the #hud_visible_centered is true but the #hud_title_text_string isn't, if both are true hide the element

#

Tho it doesn't wor

placid geode
#

move the not at bool1 bool2 maybe?

#

(not (#bool1 and #bool2))

#

"#visible"

mental crystal
mental crystal
#

90% of it I guess?

mental crystal
#

hey bakedpotato!! You there?

placid geode