Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button to show TMPE.log in Explorer #813

Open
originalfoo opened this issue Apr 3, 2020 · 1 comment
Open

Button to show TMPE.log in Explorer #813

originalfoo opened this issue Apr 3, 2020 · 1 comment
Labels
feature A new distinct feature Settings Road config, mod options, config xml Usability Make mod easier to use

Comments

@originalfoo
Copy link
Member

Might be something worth adding to settings UI - only works on Windows currently:

if (Application.platform == RuntimePlatform.WindowsPlayer) {
    group.AddButton("View TMPE.log", () => {
        System.Diagnostics.Process.Start("explorer.exe", "/select," + path)
    });
}

Where path is the full path to TMPE.log. Note that if the path has mixure of forward vs. back slashes (Application.dataPath uses forward slashes), it won't work properly. That can be resolved by using:

path = Path.GetFullPath(path);
@originalfoo originalfoo added feature A new distinct feature Usability Make mod easier to use labels Apr 3, 2020
@originalfoo
Copy link
Member Author

originalfoo commented Feb 5, 2022

ColossalFramework.Utils.OpenInFileBrowser(string filepath)

@originalfoo originalfoo added the Settings Road config, mod options, config xml label Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new distinct feature Settings Road config, mod options, config xml Usability Make mod easier to use
Projects
None yet
Development

No branches or pull requests

1 participant