Project

General

Profile

Bug #24447

UI_FloatRange MinVal = MaxVal Breaks Other PAW UI Elements

Added by DRVeyl over 4 years ago. Updated about 3 years ago.

Status:
New
Severity:
Low
Assignee:
-
Category:
Controls and UI
Target version:
-
Start date:
11/29/2019
% Done:

0%

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

Description

A UI_FloatRange that has its maxValue = minValue causes other UI PAW elements to be unresponsive, even in other PartModules.

Basic context: for procedural part type mods, where e.g. a tech unlock expands the range of a configurable field, but default values are fixed. In this example, a technology level is user-selectable, but at the start of a career there is only 1 level available.

1.8.1 build 2694, no expansions, stock + ModuleManager 4.1.2 + single test mod with no other dependencies. Reference screenshot:

Screen Snip of PAW

TechLevel is declared as:

[KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Tech Level", guiFormat = "N0"),
UI_FloatRange(minValue = 0f, stepIncrement = 1f, scene = UI_Scene.Editor, suppressEditorShipModified = true)]
private float TechLevel = -1f;

The maxValue is set to 0 in OnStart() in the Editor. As a result, all of the PAW elements displayed above TechLevel do not respond to mouse events. Reaction Wheels (stock), RCS (stock), Antenna (UI_Toggle in mod) do not toggle when clicked. UI_FloatEdit / UI_FloatRanges Wheel Authority (stock), Thrust Limiter (stock), Transmit Power (UI_FloatRange in mod) do not slide or change. All of the PAW elements below TechLevel behave normally.

Setting maxValue to 0 in the declaration instead of OnStart() has the same result.

If the maxValue is set to 1 [or any other value] in OnStart(), everything behaves normally.

KSP.log does not show any exceptions or unexpected messages. Also does not show messages that would evidence onFieldChanged handlers for the two mod-created unresponsive UI Controls were called.

Capture.PNG (409 KB) Capture.PNG Screen Snip of PAW DRVeyl, 11/29/2019 01:28 AM
KSP.log (337 KB) KSP.log DRVeyl, 11/29/2019 01:32 AM
50480

History

#1 Updated by DRVeyl about 4 years ago

  • Description updated (diff)

Also available in: Atom PDF