Skip to content

Commit e108b4a

Browse files
committed
Renamed resolution-related commands to be easier to understand the purpose.
1 parent ebbf3b3 commit e108b4a

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
- Added LogException methods.
99
- Changed the size of the input field so that the text is larger.
1010
- Changed enum command parameter to support namespaces to distinguish between enums with same names.
11+
- Changed resolution command names to be easier to understand.
1112
- Fixed strings being displayed incorrectly by cs_evaluate.
1213
- Fixed issue with cached enum types.
1314
- Fixed input field not unfocusing when the developer console window is closed.

DOCUMENTATION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ Listed below are all the built-in commands that come with the developer console
102102
- ``fullscreen (Boolean)enabled``: Query or set whether the window is full screen.
103103
- ``fullscreen_mode (FullScreenMode)mode``: Query or set the full screen mode.
104104
- ``vsync (Int32)vSyncCount``: Query or set whether VSync is enabled.
105-
- ``resolution``: Display the current screen resolution.
105+
- ``monitor_size``: Display the current monitor resolution.
106+
- ``window_size``: Display the current window resolution.
106107
- ``targetfps (Int32)targetFrameRate``: Query or set the target frame rate.
107108

108109
### Camera commands

Runtime/DevConsoleMono.cs

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,15 +1691,8 @@ private void InitBuiltInCommands()
16911691
return;
16921692
}
16931693

1694-
string result = "";
1695-
foreach (InputKey key in _bindings.Keys)
1696-
{
1697-
result += $"<i>{key}</i>: \"{_bindings[key]}\"\n";
1698-
}
1699-
result = result.Remove(result.Length - 2);
1700-
17011694
LogSeperator($"Key bindings ({_bindings.Count})");
1702-
Log(result);
1695+
Log(string.Join("\n", _bindings.Keys.Select(x => $"<i>{x}</i>: \"{_bindings[x]}\"")));
17031696
LogSeperator();
17041697
}
17051698
));
@@ -1849,7 +1842,7 @@ private void InitBuiltInCommands()
18491842
"vsync",
18501843
"",
18511844
"Query or set whether VSync is enabled",
1852-
Parameter.Create("vSyncCount", "The number of VSyncs that should pass between each frame (0, 1, 2, 3, or 4)."),
1845+
Parameter.Create("vSyncCount", "The number of VSyncs that should pass between each frame (0, 1, 2, 3, or 4)"),
18531846
i =>
18541847
{
18551848
if (i < 0 || i > 4)
@@ -1865,17 +1858,17 @@ private void InitBuiltInCommands()
18651858
));
18661859

18671860
AddCommand(Command.Create(
1868-
"resolution",
1869-
"",
1861+
"monitor_size",
1862+
"monitor_resolution",
18701863
"Display the current monitor resolution",
1871-
() => LogVariable("Resolution", Screen.currentResolution)
1864+
() => LogVariable("Monitor size", Screen.currentResolution)
18721865
));
18731866

18741867
AddCommand(Command.Create(
1875-
"screen_size",
1876-
"",
1868+
"window_size",
1869+
"window_resolution",
18771870
"Display the current window resolution",
1878-
() => LogVariable("Resolution", new Vector2Int(Screen.width, Screen.height))
1871+
() => LogVariable("Window size", $"{Screen.width} x {Screen.height}")
18791872
));
18801873

18811874
AddCommand(Command.Create<int>(

0 commit comments

Comments
 (0)