ClampMin

Constructor

ClampMin <id> (double min, double init_val)

Action

Keeps an input value upper than the specified minimum value.

Predefined children

  • DoubleProperty: min, input, result.

Example


use core
use base
use display
use gui

_main_
Component root {
  Frame f ("myFrame", 0, 0, 500, 500)
  FillColor _ (0, 0, 0)
  Text unbounded (50, 50, "")
  Text bounded (50, 150, "")
  ClampMin min_x (100, 100)
  f.move.x => min_x.input, unbounded.text
  min_x.result => bounded.text
}