Jump to content

CustomFloatParameterUI still broken in 1.3


Recommended Posts

I have a config value which goes between 0.025f and 2.0f. 

Problem is that the CustomFloatParameterUI is still broken from 1.2.

@nightingale said it would be fixed in 1.3 in this post:  

but it hasn't been.

The following code in a settings page doesn't work, the value goes in steps from 0 to 1 to 2.  I can use the old workaround listed in the above post, but it doesn't look good at all

        [GameParameters.CustomFloatParameterUI("Speed", minValue = .025f, maxValue = 2f, asPercentage = false,
            toolTip = "How fast the controls move while pressing the key")]
        public double Speed = 1f;

What I have to do instead is this (again, from the above post):

public float Speed = 1f;
[GameParameters.CustomFloatParameterUI("Speed", minValue = 25f, maxValue = 200f,
            toolTip = "How fast the controls move while pressing the key")]
public float speed
{
	get { return Speed * 100; }
	set { Speed = value / 100f; }
}

but now it looks really bad in the UI, because the speed is shown a a number of 25 to 200, rather than 0.025 to 2

Any comments?

I just added this to the bug tracker:  http://bugs.kerbalspaceprogram.com/issues/15699

Edit:  The "asPercentage" option didn't do anything, I tried it both with and without.
I also tried setting the "stepCount", but that didn't seem to do anything either

Edited by linuxgurugamer
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...