Skip to content

Instantly share code, notes, and snippets.

@DaEgi01
DaEgi01 / UIHelperExtensions.cs
Created June 26, 2018 10:27
CitiesSkylines - UIHelperExtensions
public static class UIHelperExtensions
{
public static UISlider AddSliderWithLabel(this UIHelperBase uIHelper, string text, float min, float max, float step, float defaultValue, OnValueChanged eventCallback)
{
float spaceBetweenLabelAndSlider = 8f;
float marginBottom = 16f;
var sliderControl = uIHelper.AddSlider(text, min, max, step, defaultValue, value => { }) as UISlider;
var rootPanel = sliderControl.parent as UIPanel;
rootPanel.autoLayout = false;
@DaEgi01
DaEgi01 / ShadowSettingsAdjusterMod.cs
Last active June 13, 2018 09:56
ShadowSettingsAdjuster - without the CameraController patches
using Harmony;
using ICities;
using System;
using System.Reflection;
using UnityEngine;
using UnityEngine.Rendering;
namespace ShadowSettingsAdjuster
{
/// <summary>
@DaEgi01
DaEgi01 / ShadowSettingsAdjuster.cs
Last active May 3, 2023 00:24
Cities Skylines - Shadow Settings Adjuster
using Harmony;
using ICities;
using System;
using System.Reflection;
using UnityEngine;
using UnityEngine.Rendering;
namespace ShadowSettingsAdjuster
{
/// <summary>