Project

General

Profile

Bug #15699

CustomFloatParameterUI still broken in 1.3

Added by linuxgurugamer over 6 years ago. Updated over 6 years ago.

Status:
New
Severity:
High
Assignee:
-
Category:
Application
Target version:
-
Start date:
08/06/2017
% Done:

0%

Version:
Platform:
Windows
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

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?

BadSettings-0.6.4.1.zip (13.3 KB) BadSettings-0.6.4.1.zip [email protected] linuxgurugamer, 11/02/2017 11:21 AM

History

#1 Updated by linuxgurugamer over 6 years ago

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

#2 Updated by linuxgurugamer over 6 years ago

Still broken in 1.3.1
The file is too big to attach, it's 15 meg in size. Here is a dropbox link:
https://www.dropbox.com/s/nrvzsjrrcl36noo/BadSettings-0.6.4.1.zip?dl=0

Take what's in the GameData and put into the KSP GameData, then start the game, go immediately into settings, advanced and choose the Bad Settings Demo tab

#3 Updated by linuxgurugamer over 6 years ago

The attached file contains the entire project; GameData is inside the top folder

Also available in: Atom PDF