Exemple #1
0
        private void OnToggleOsdButtonClicked(U.Button.UButton button)
        {
            bool value = !GlobalConfig.Instance.Main.KeybindsPanelVisible;

            GlobalConfig.Instance.Main.KeybindsPanelVisible = value;
            GlobalConfig.WriteConfig();

            Log._Debug($"Toggle value of KeybindsPanelVisible to {value}");

            // Refer to the TrafficManager tool asking it to request help from the current tool
            ModUI.GetTrafficManagerTool().RequestOnscreenDisplayUpdate();
        }
Exemple #2
0
        private void OnHelpButtonClicked(U.Button.UButton button)
        {
            bool value = !GlobalConfig.Instance.Main.KeybindsPanelVisible;

            GlobalConfig.Instance.Main.KeybindsPanelVisible = value;
            Log._Debug($"Toggle value of KeybindsPanelVisible to {value}");

            // Refer to the TrafficManager tool asking it to request help from the current tool
            ModUI.GetTrafficManagerTool().RequestOnscreenDisplayUpdate();

            // The task is delayed till next GUI update frame.
            // ModUI.GetTrafficManagerTool().InvalidateOnscreenDisplayFlag = true;
        }