Пример #1
0
 public ColorSliderPanel(BuildingPaintMenu menu, int region_index, string region_name_data, int min_brightness = -100, int max_brightness = 100)
 {
     regionIndex       = region_index;
     buildingPaintMenu = menu;
     name = region_name_data;
     minimumBrightness = min_brightness;
     maximumBrightness = max_brightness;
 }
Пример #2
0
 public BuildingColorSlider(BuildingPaintMenu bpm, int handle_id, Rectangle bounds, int min, int max, Action <int> on_value_set = null)
 {
     handle                        = new ClickableTextureComponent(new Rectangle(0, 0, 4, 5), Game1.mouseCursors, new Rectangle(72, 256, 16, 20), 1f);
     handle.myID                   = handle_id;
     handle.upNeighborID           = -99998;
     handle.upNeighborImmutable    = true;
     handle.downNeighborID         = -99998;
     handle.downNeighborImmutable  = true;
     handle.leftNeighborImmutable  = true;
     handle.rightNeighborImmutable = true;
     buildingPaintMenu             = bpm;
     this.bounds                   = bounds;
     this.min                      = min;
     this.max                      = max;
     onValueSet                    = on_value_set;
 }