2022-10-17 15:13:41 -07:00
|
|
|
using Content.Client.UserInterface.Systems.Actions;
|
|
|
|
|
using Content.Client.UserInterface.Systems.Admin;
|
Added button and manager for in game bug reports (Part 1) (#35350)
* Added the button and manager
* Minor cleanup
* Reigstered to the wrong thing!
* Unload UI
* Address the review
* First commit :)
* Some cleanup
* Added some comments and now the placehoder text goes away once you start typing
* Some cleanup and better test command
* Basic rate limiter class (Not finished)
* Cleanup
* Removed forgotten comment xD
* Whitespace removal
* Minor cleanup, cvar hours -> minutes
* More minor tweaks
* Don't cache timer and add examples to fields
* Added CCvar for time between bug reports
* Minor crash when restarting rounds fixed
* It compiled on my computer!
* Fix comment indents
* Remove unecessary async, removed magic strings, simplfied sawmill to not use post inject
* Make struct private
* Simplfiy TryGetLongHeader
* Changed list to enumerable
* URI cleanup
* Got rid of the queue, used a much better way!
* Made the comments a little better and fix some issues with them
* Added header consts
* Maximum reports per round is now an error message
* Time between reports is now in seconds
* Change ordering
* Change hotkey to O
* only update window when its open
* Split up validation
* address review
* Address a few issues
* inheritance fix
* API now doesn't keep track of requests, just uses the rate limited response from github
* Rough idea of how channels would work
* refactor: reorganized code, placed rate limiter into http-client-handler AND manager (usually only manager-one should work)
* cleanup
* Add user agent so api doesn't get mad
* Better error logs
* Cleanup
* It now throws!
* refactor: renaming, moved some methods, xml-doc cleanups
* refactor: BugReportWindow formatted to convention, enforced 1 updates only 1 per sec
* Add very basic licence info
* Fixed the issues!
* Set ccvar default to false
* make the button better
* fix test fail silly me
* Adress the review!
* refactor: cleanup of entry point code, binding server-side code with client-facing manager
* Resolve the other issues and cleanup and stuff smile :)
* not entity
* fixes
* Cleanup
* Cleanup
* forgor region
* fixes
* Split up function and more stuff
* Better unsubs yaygit add -A
* I pray...
* Revert "I pray..."
This reverts commit 9629fb4f1289c9009a03e4e4facd9ae975e6303e.
* I think I have to add it in the pr
* Revert "I think I have to add it in the pr"
This reverts commit e185b42f570fe5f0f51e0e44761d7938e22e67f7.
* Tweaks
* Minor tweak to permissions
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2025-08-15 09:10:38 -07:00
|
|
|
using Content.Client.UserInterface.Systems.BugReport;
|
2022-10-17 15:13:41 -07:00
|
|
|
using Content.Client.UserInterface.Systems.Bwoink;
|
|
|
|
|
using Content.Client.UserInterface.Systems.Character;
|
|
|
|
|
using Content.Client.UserInterface.Systems.Crafting;
|
2024-04-29 07:38:23 +03:00
|
|
|
using Content.Client.UserInterface.Systems.Emotes;
|
2022-10-17 15:13:41 -07:00
|
|
|
using Content.Client.UserInterface.Systems.EscapeMenu;
|
2023-03-10 19:25:56 -08:00
|
|
|
using Content.Client.UserInterface.Systems.Gameplay;
|
2023-03-22 23:41:43 -04:00
|
|
|
using Content.Client.UserInterface.Systems.Guidebook;
|
2022-10-17 15:13:41 -07:00
|
|
|
using Content.Client.UserInterface.Systems.MenuBar.Widgets;
|
|
|
|
|
using Content.Client.UserInterface.Systems.Sandbox;
|
|
|
|
|
using Robust.Client.UserInterface.Controllers;
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.UserInterface.Systems.MenuBar;
|
|
|
|
|
|
|
|
|
|
public sealed class GameTopMenuBarUIController : UIController
|
|
|
|
|
{
|
|
|
|
|
[Dependency] private readonly EscapeUIController _escape = default!;
|
|
|
|
|
[Dependency] private readonly AdminUIController _admin = default!;
|
|
|
|
|
[Dependency] private readonly CharacterUIController _character = default!;
|
|
|
|
|
[Dependency] private readonly CraftingUIController _crafting = default!;
|
|
|
|
|
[Dependency] private readonly AHelpUIController _ahelp = default!;
|
|
|
|
|
[Dependency] private readonly ActionUIController _action = default!;
|
|
|
|
|
[Dependency] private readonly SandboxUIController _sandbox = default!;
|
2023-03-22 23:41:43 -04:00
|
|
|
[Dependency] private readonly GuidebookUIController _guidebook = default!;
|
2024-04-29 07:38:23 +03:00
|
|
|
[Dependency] private readonly EmotesUIController _emotes = default!;
|
Added button and manager for in game bug reports (Part 1) (#35350)
* Added the button and manager
* Minor cleanup
* Reigstered to the wrong thing!
* Unload UI
* Address the review
* First commit :)
* Some cleanup
* Added some comments and now the placehoder text goes away once you start typing
* Some cleanup and better test command
* Basic rate limiter class (Not finished)
* Cleanup
* Removed forgotten comment xD
* Whitespace removal
* Minor cleanup, cvar hours -> minutes
* More minor tweaks
* Don't cache timer and add examples to fields
* Added CCvar for time between bug reports
* Minor crash when restarting rounds fixed
* It compiled on my computer!
* Fix comment indents
* Remove unecessary async, removed magic strings, simplfied sawmill to not use post inject
* Make struct private
* Simplfiy TryGetLongHeader
* Changed list to enumerable
* URI cleanup
* Got rid of the queue, used a much better way!
* Made the comments a little better and fix some issues with them
* Added header consts
* Maximum reports per round is now an error message
* Time between reports is now in seconds
* Change ordering
* Change hotkey to O
* only update window when its open
* Split up validation
* address review
* Address a few issues
* inheritance fix
* API now doesn't keep track of requests, just uses the rate limited response from github
* Rough idea of how channels would work
* refactor: reorganized code, placed rate limiter into http-client-handler AND manager (usually only manager-one should work)
* cleanup
* Add user agent so api doesn't get mad
* Better error logs
* Cleanup
* It now throws!
* refactor: renaming, moved some methods, xml-doc cleanups
* refactor: BugReportWindow formatted to convention, enforced 1 updates only 1 per sec
* Add very basic licence info
* Fixed the issues!
* Set ccvar default to false
* make the button better
* fix test fail silly me
* Adress the review!
* refactor: cleanup of entry point code, binding server-side code with client-facing manager
* Resolve the other issues and cleanup and stuff smile :)
* not entity
* fixes
* Cleanup
* Cleanup
* forgor region
* fixes
* Split up function and more stuff
* Better unsubs yaygit add -A
* I pray...
* Revert "I pray..."
This reverts commit 9629fb4f1289c9009a03e4e4facd9ae975e6303e.
* I think I have to add it in the pr
* Revert "I think I have to add it in the pr"
This reverts commit e185b42f570fe5f0f51e0e44761d7938e22e67f7.
* Tweaks
* Minor tweak to permissions
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2025-08-15 09:10:38 -07:00
|
|
|
[Dependency] private readonly BugReportUIController _bug = default!;
|
2022-10-17 15:13:41 -07:00
|
|
|
|
|
|
|
|
private GameTopMenuBar? GameTopMenuBar => UIManager.GetActiveUIWidgetOrNull<GameTopMenuBar>();
|
|
|
|
|
|
2023-03-10 19:25:56 -08:00
|
|
|
public override void Initialize()
|
|
|
|
|
{
|
|
|
|
|
base.Initialize();
|
|
|
|
|
|
|
|
|
|
var gameplayStateLoad = UIManager.GetUIController<GameplayStateLoadController>();
|
|
|
|
|
gameplayStateLoad.OnScreenLoad += LoadButtons;
|
|
|
|
|
gameplayStateLoad.OnScreenUnload += UnloadButtons;
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-17 15:13:41 -07:00
|
|
|
public void UnloadButtons()
|
|
|
|
|
{
|
|
|
|
|
_escape.UnloadButton();
|
2023-03-22 23:41:43 -04:00
|
|
|
_guidebook.UnloadButton();
|
2022-10-17 15:13:41 -07:00
|
|
|
_admin.UnloadButton();
|
|
|
|
|
_character.UnloadButton();
|
|
|
|
|
_crafting.UnloadButton();
|
|
|
|
|
_ahelp.UnloadButton();
|
|
|
|
|
_action.UnloadButton();
|
|
|
|
|
_sandbox.UnloadButton();
|
2024-04-29 07:38:23 +03:00
|
|
|
_emotes.UnloadButton();
|
Added button and manager for in game bug reports (Part 1) (#35350)
* Added the button and manager
* Minor cleanup
* Reigstered to the wrong thing!
* Unload UI
* Address the review
* First commit :)
* Some cleanup
* Added some comments and now the placehoder text goes away once you start typing
* Some cleanup and better test command
* Basic rate limiter class (Not finished)
* Cleanup
* Removed forgotten comment xD
* Whitespace removal
* Minor cleanup, cvar hours -> minutes
* More minor tweaks
* Don't cache timer and add examples to fields
* Added CCvar for time between bug reports
* Minor crash when restarting rounds fixed
* It compiled on my computer!
* Fix comment indents
* Remove unecessary async, removed magic strings, simplfied sawmill to not use post inject
* Make struct private
* Simplfiy TryGetLongHeader
* Changed list to enumerable
* URI cleanup
* Got rid of the queue, used a much better way!
* Made the comments a little better and fix some issues with them
* Added header consts
* Maximum reports per round is now an error message
* Time between reports is now in seconds
* Change ordering
* Change hotkey to O
* only update window when its open
* Split up validation
* address review
* Address a few issues
* inheritance fix
* API now doesn't keep track of requests, just uses the rate limited response from github
* Rough idea of how channels would work
* refactor: reorganized code, placed rate limiter into http-client-handler AND manager (usually only manager-one should work)
* cleanup
* Add user agent so api doesn't get mad
* Better error logs
* Cleanup
* It now throws!
* refactor: renaming, moved some methods, xml-doc cleanups
* refactor: BugReportWindow formatted to convention, enforced 1 updates only 1 per sec
* Add very basic licence info
* Fixed the issues!
* Set ccvar default to false
* make the button better
* fix test fail silly me
* Adress the review!
* refactor: cleanup of entry point code, binding server-side code with client-facing manager
* Resolve the other issues and cleanup and stuff smile :)
* not entity
* fixes
* Cleanup
* Cleanup
* forgor region
* fixes
* Split up function and more stuff
* Better unsubs yaygit add -A
* I pray...
* Revert "I pray..."
This reverts commit 9629fb4f1289c9009a03e4e4facd9ae975e6303e.
* I think I have to add it in the pr
* Revert "I think I have to add it in the pr"
This reverts commit e185b42f570fe5f0f51e0e44761d7938e22e67f7.
* Tweaks
* Minor tweak to permissions
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2025-08-15 09:10:38 -07:00
|
|
|
_bug.UnloadButton();
|
2022-10-17 15:13:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void LoadButtons()
|
|
|
|
|
{
|
|
|
|
|
_escape.LoadButton();
|
2023-03-22 23:41:43 -04:00
|
|
|
_guidebook.LoadButton();
|
2022-10-17 15:13:41 -07:00
|
|
|
_admin.LoadButton();
|
|
|
|
|
_character.LoadButton();
|
|
|
|
|
_crafting.LoadButton();
|
|
|
|
|
_ahelp.LoadButton();
|
|
|
|
|
_action.LoadButton();
|
|
|
|
|
_sandbox.LoadButton();
|
2024-04-29 07:38:23 +03:00
|
|
|
_emotes.LoadButton();
|
Added button and manager for in game bug reports (Part 1) (#35350)
* Added the button and manager
* Minor cleanup
* Reigstered to the wrong thing!
* Unload UI
* Address the review
* First commit :)
* Some cleanup
* Added some comments and now the placehoder text goes away once you start typing
* Some cleanup and better test command
* Basic rate limiter class (Not finished)
* Cleanup
* Removed forgotten comment xD
* Whitespace removal
* Minor cleanup, cvar hours -> minutes
* More minor tweaks
* Don't cache timer and add examples to fields
* Added CCvar for time between bug reports
* Minor crash when restarting rounds fixed
* It compiled on my computer!
* Fix comment indents
* Remove unecessary async, removed magic strings, simplfied sawmill to not use post inject
* Make struct private
* Simplfiy TryGetLongHeader
* Changed list to enumerable
* URI cleanup
* Got rid of the queue, used a much better way!
* Made the comments a little better and fix some issues with them
* Added header consts
* Maximum reports per round is now an error message
* Time between reports is now in seconds
* Change ordering
* Change hotkey to O
* only update window when its open
* Split up validation
* address review
* Address a few issues
* inheritance fix
* API now doesn't keep track of requests, just uses the rate limited response from github
* Rough idea of how channels would work
* refactor: reorganized code, placed rate limiter into http-client-handler AND manager (usually only manager-one should work)
* cleanup
* Add user agent so api doesn't get mad
* Better error logs
* Cleanup
* It now throws!
* refactor: renaming, moved some methods, xml-doc cleanups
* refactor: BugReportWindow formatted to convention, enforced 1 updates only 1 per sec
* Add very basic licence info
* Fixed the issues!
* Set ccvar default to false
* make the button better
* fix test fail silly me
* Adress the review!
* refactor: cleanup of entry point code, binding server-side code with client-facing manager
* Resolve the other issues and cleanup and stuff smile :)
* not entity
* fixes
* Cleanup
* Cleanup
* forgor region
* fixes
* Split up function and more stuff
* Better unsubs yaygit add -A
* I pray...
* Revert "I pray..."
This reverts commit 9629fb4f1289c9009a03e4e4facd9ae975e6303e.
* I think I have to add it in the pr
* Revert "I think I have to add it in the pr"
This reverts commit e185b42f570fe5f0f51e0e44761d7938e22e67f7.
* Tweaks
* Minor tweak to permissions
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2025-08-15 09:10:38 -07:00
|
|
|
_bug.LoadButton();
|
2022-10-17 15:13:41 -07:00
|
|
|
}
|
|
|
|
|
}
|