/// <summary> /// Initializes a new instance of the <see cref="OnScreenDisplayPanel"/> class. /// Constructs the empty OSD panel and hides it. /// </summary> /// <param name="parent">The parent panel to attach to</param> public OnScreenDisplayPanel(UxLibrary uxmod) { uxmod_ = uxmod; UIView uiView = UIView.GetAView(); items_ = new List <OsdItem>(); thisPanel_ = (OsdUnityUiPanel)uiView.AddUIComponent(typeof(OsdUnityUiPanel)); thisPanel_.name = UxLibrary.UXMOD_PANEL_NAME; thisPanel_.width = 10f; thisPanel_.height = PANEL_HEIGHT; thisPanel_.backgroundSprite = "GenericPanel"; thisPanel_.color = new Color32(64, 64, 64, 240); thisPanel_.objectUserData = uxmod; // Hide! osdVisible_ = uxmod_.OsdPanelVisible.value; thisPanel_.isVisible = false; thisPanel_.absolutePosition = new Vector3(uxmod.OsdPanelX, uxmod.OsdPanelY); // Setup drag var dragHandler = new GameObject("UXMod_OSD_DragHandler"); dragHandler.transform.parent = thisPanel_.transform; dragHandler.transform.localPosition = Vector3.zero; Drag = dragHandler.AddComponent <UIDragHandle>(); Drag.enabled = true; // Update(); }
public KeybindSetting(UxLibrary uxmod, string cat, string configFileKey, InputKey?defaultKey1 = null) { Category = cat; Key = new SavedInputKey( configFileKey, uxmod.KeybindsConf.ConfName, defaultKey1 ?? SavedInputKey.Empty, true); }
public OsdConfigurator(UxLibrary uxmod) { uxmod_ = uxmod; commands_ = new List <List <object> >(); }
public ConfigFile(UxLibrary uxmod, string confName) { ConfName = confName; uxMod_ = uxmod; TryCreateConfig(); }