Skip to content

Conversation

@MukjepScarlet
Copy link
Contributor

No description provided.

@MukjepScarlet MukjepScarlet added this to the 0.36.0 milestone Jan 12, 2026
@MukjepScarlet MukjepScarlet requested a review from SenkJu January 12, 2026 09:56
@SenkJu
Copy link
Contributor

SenkJu commented Jan 17, 2026

Wouldn't it make more sense to have a VectorSetting that can have an arbitrary amount of components?

@MukjepScarlet
Copy link
Contributor Author

I think it's because Vec3 setting can be set from player position.

@MukjepScarlet
Copy link
Contributor Author

I'm trying to improve this now.

@MukjepScarlet MukjepScarlet marked this pull request as draft January 17, 2026 18:01
@SenkJu
Copy link
Contributor

SenkJu commented Jan 17, 2026

I think it's because Vec3 setting can be set from player position.

I think that should be a property of the specific setting. I wouldn't make sense to have this ability for all Vec3s. Only those that refer to the player's position.

@MukjepScarlet
Copy link
Contributor Author

Agree. But current vector values are all plain value like int/float. This PR won't include this.

@MukjepScarlet
Copy link
Contributor Author

image For example this shouldn't use locate button.

@MukjepScarlet MukjepScarlet marked this pull request as ready for review January 17, 2026 18:27
@MukjepScarlet
Copy link
Contributor Author

@SenkJu Done

@SenkJu
Copy link
Contributor

SenkJu commented Jan 17, 2026

image For example this shouldn't use locate button.

Correct. Then why not just add a boolean property to Vec3s that determines whether this button should be shown?

@MukjepScarlet
Copy link
Contributor Author

As I said it's plain value:

    fun color(name: String, default: Color4b) = value(name, default, ValueType.COLOR)

    fun block(name: String, default: Block) = value(name, default, ValueType.BLOCK)

    fun vec2f(name: String, default: Vector2fc) = value(name, default, ValueType.VECTOR2_F)

    fun vec3i(name: String, default: Vec3i) = value(name, default, ValueType.VECTOR3_I)

    fun vec3d(name: String, default: Vec3) = value(name, default, ValueType.VECTOR3_D)

I want to add a map to each value instance for custom properties like this, this requires a more careful backend design.

cc @1zun4

@MukjepScarlet
Copy link
Contributor Author

Oh I forget another thing. We can't use double value for vec3i settings.

@1zun4
Copy link
Member

1zun4 commented Jan 17, 2026

just do whatever works, I agree with just adding options so we can control when to show the locate button or not.

@MukjepScarlet
Copy link
Contributor Author

An easy solution is

class Vec3Value(name: String, default: Vec3, val useLocateButton: Boolean) : Value(name, default)

@MukjepScarlet MukjepScarlet marked this pull request as draft January 17, 2026 18:41
@MukjepScarlet
Copy link
Contributor Author

Hold on, some minutes

@MukjepScarlet MukjepScarlet marked this pull request as ready for review January 17, 2026 19:02
@MukjepScarlet
Copy link
Contributor Author

Let's go

@MukjepScarlet MukjepScarlet changed the title feat(ClickGUI): vec2 value feat(ClickGUI): vector value improvement Jan 17, 2026
@MukjepScarlet
Copy link
Contributor Author

@SenkJu ready

@SenkJu
Copy link
Contributor

SenkJu commented Jan 18, 2026

Was there a specific reason for using $: useLocateButton = (setting as Vec3Setting)?.useLocateButton ?? false; with a $?

@MukjepScarlet
Copy link
Contributor Author

No because it's currently uneditable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants