Commit Graph
58 Commits
Author SHA1 Message Date
Víctor Aguilera PuertoandGitHub 8a2ae5ec85 Makes spawnlist use prototype ID if prototype name is null or em… (#954) 2020-02-06 16:12:34 +01:00
Pieter-Jan Briers 766e2c81e2 Fixes debug coords panel throwing in main menu.
Fixes #938
2020-01-22 23:55:41 +01:00
DamianXandPieter-Jan Briers ae1e9c3a71 Entity spawn window's search bar grabs keyboard focus (#928) 2020-01-21 18:10:04 +01:00
Pieter-Jan Briers 861e19da76 Clarify terminology in debug memory panel. 2020-01-21 02:11:09 +01:00
Pieter-Jan Briers 1f0ec7fa68 Pulling down debug console no longer captures all mouse input. 2020-01-18 03:18:33 +01:00
moneylandPieter-Jan Briers 928a5e3521 Fix the entity spawn panel clear button (#926)
Previously the entity spawn panel clear button caused nothing to show up. This fixes that so it rebuilds the entity list with a empty search.
2020-01-08 17:37:13 +01:00
Pieter-Jan Briers 21b29e26e2 Fix a bunch of warnings. 2019-12-22 13:50:29 +01:00
Pieter-Jan Briers f893d308ad Cut cruft from DebugCoordsPanel. 2019-12-11 07:50:19 +01:00
Pieter-Jan Briers 66ea13684b Remove GameScreen from engine. 2019-12-06 00:40:37 +01:00
Pieter-Jan Briers 69ff3638ba Make framegraph not catch clicks. 2019-12-06 00:10:14 +01:00
Pieter-Jan BriersandGitHub ab1f4fb0e7 UI layout v2. (#908)
* UI layout v2.

All controls now act like containers.
Moved anchor/margin layout model to LayoutContainer

Implement basic WPF-like attached properties for the above LayoutContainer.

* Fix VV.
2019-12-05 13:37:58 +01:00
Pieter-Jan Briers 4eb100076d Entity spawn window no longer lags when opening. 2019-12-04 13:26:37 +01:00
Pieter-Jan Briers 13ef4e8423 Various optimizations focused on the entity spawn panel:
Give BoxContainer a preset capacity to reduce allocations in layout.

Removed Control.GetChild(string) and similar. This was no longer used (and was a pretty bad idea in general), and the implementation had a lot of wasted book keeping to do.

Use UpdateLayout() instead of DoUpdateLayout() in Control minsize changed to avoid doing redundant layout, and by extension style & minsize, updates.

Used RemoveAllChildren instead of DisposeAllChildren in EntitySpawnWindow because it's faster (way less stuff to clear, just let the GC handle it).

Optimized ResourcePath with a better GetHashCode(), better Equals, replacement for List<T>.ToArray()

Fixed enumerator allocations in stylesheet SelectorElement matching to speed up style updates.

ResourceCache now caches fallbacks to avoid constructing Resource instance when fetching fallback explicitly.

ResourceCache now has nested dictionaries for Type -> ResourcePath -> BaseResource storage of resources.

Use calculated property instead of auto property for TextureResource.Fallback
2019-11-28 14:19:02 +01:00
Pieter-Jan Briers 5025178203 Very shitty allocation rate tracker. 2019-11-17 22:31:21 +01:00
Pieter-Jan Briers 07b0548532 Input monitor. 2019-11-17 17:28:20 +01:00
Pieter-Jan Briers d092a63b28 Adds debug panel to show Clyde info & stats. 2019-10-18 14:28:54 +02:00
Pieter-Jan Briers 414177973d Fix SS14Window handling with UI Scaling applied. 2019-10-10 17:23:36 +02:00
Pieter-Jan Briers 6ecd86b9af Fancy animation for debug console opening. 2019-10-10 16:18:57 +02:00
Pieter-Jan Briers 6fdb09aa06 Show collections count in memory debug. 2019-10-08 00:50:20 +02:00
Acruid 6ed7684954 Reverts 00f982cb89.
Reverts b40413dfd6.
Decorates EntityPrototype.Name with CanBeNull.
The entity spawn window now properly handles prototypes with null names. Previously, a null name would throw a NullException. Entities with null names will never show up in the spawn window search results.
2019-09-16 13:08:59 -07:00
Víctor Aguilera PuertoandPieter-Jan Briers 7fc99ee528 Improved ItemLists (#863)
* Improve ItemList

* Address reviews

* Items can only be at one ItemList at a time

* Nested Item class
2019-09-13 15:23:04 +02:00
Pieter-Jan Briers daf0d1dd6c Fix memory leak with entity spawn window 2019-08-31 18:39:19 +02:00
ShadowCommanderandPieter-Jan Briers a8d6c294ab Input System Refactor (#840)
* Fixes right click menu stopping input

Removed a flag change when the modal stack was showing, which preventing the click from getting passed to the next function.

* Added parsing for mod2 and mod3 from Keybind YAML

* Fixes a crash on context change when a keybind is not defined in keybinds.yml

* Implemented ShowDebugConsole Hotkey

* Refactored input system

Refactored input system to run Key and Mouse input through the InputManager before doing stuff.

* Upgraded LineEdit and classes that use it. Fixed input while KeyboardFocused.

Upgraded LineEdit to use Keybinds.
Upgraded DebugConsole to use Keybinds.
Replaced all references to MouseDown, MouseUp, KeyDown, and KeyUp with KeyBindUp and KeyBindDown.
Moved UserInterfaceManager call from GameController.Input to InputManager event.
Stopped input going to simulation while a control has focus in UserInterfaceManager.

* Some fixes for input system

Fixed keybinds getting stuck when selecting a LineEdit.
Changed MenuBar to not error.
Fixed a few cases where LineEdit would eat input if you hovered over it and where mouse input got eaten when clicking in the world while a LineEdit was selected.

* Removed extra dependencies

* Added GUIBoundKeyEventArgs to ButtonEventArgs

* Fixes for input with LineEdit selected

Fixed multiple keybinds mapped to the same key not triggering.
Fixed keybind input not getting to LineEdit when hovering over a control.

* Implemented Key Repeat for LineEdit

* Fix for input on Robust.Lite Launcher

* Renames NonFocusKeybinds to EnableAllKeybinds

Renamed NonFocusKeybinds to EnableAllKeybinds and added comment to clarify usage

* Adds repeating keybinds

Used for TextBackspace, TextCursorLeft, and TextCursorRight
Reverts a change to LineEdit that implemented repeating keys
Adds some documentation comments
2019-08-21 17:13:48 +02:00
Pieter-Jan BriersandGitHub cb5f2ffae1 Refactor UI system. (#843)
* Refactor UI system.

Deferred updating is used for styling & layout. This fixes the awful time complexity of containers.
Removed SetDefaults and Initialize. They were a bad idea alright.

* Fix build on .NET Framework.
2019-08-14 22:03:51 +02:00
Pieter-Jan Briers 6e32588be7 Adds new placement alignment mode to place lights correctly. 2019-08-13 12:05:08 +02:00
Pieter-Jan Briers 7fce46ec44 Fix some issues Sonar caught. 2019-08-10 14:17:13 +02:00
DamianXandPieter-Jan Briers 89726ebeec Fix missing semicolon (#839)
* Fix missing semicolon

* Fixed CopyToArray
2019-08-04 11:42:40 +02:00
Pieter-Jan Briers 0a41ef3c9a Unified those messy FrameEventArgs. 2019-08-04 01:08:44 +02:00
Pieter-Jan Briers 0e65843f39 Memory debug panel to show memory usage info. 2019-08-03 23:59:54 +02:00
Pieter-Jan Briers 85a4375905 Various performance optimizations. 2019-08-01 00:10:20 +02:00
Pieter-Jan Briers d7e5c12a3d Make FpsCounter internal so it gets out of my face. 2019-07-30 13:55:58 +02:00
Pieter-Jan Briers 7e13447455 Remove Godot scene instantiation. 2019-07-30 13:39:56 +02:00
Pieter-Jan Briers be379b2e20 Remove a bunch of cruft from the engine.
Unused textures & fonts, really.
2019-07-30 00:56:51 +02:00
Pieter-Jan Briers 117fcf2aa2 Make entity spawn window text more in line with the tile spawn window. 2019-07-26 17:54:10 +02:00
Pieter-Jan Briers 78bbac52f0 Fix entity spawn erase mode. 2019-07-24 16:10:12 +02:00
Pieter-Jan Briers 08e214b3d2 Add SS14Window.OpenCenteredMinSize 2019-07-24 00:27:03 +02:00
Pieter-Jan Briers cd9aed6696 Less ugly debug console color. 2019-07-23 23:14:36 +02:00
Pieter-Jan Briers 13ad6f3f37 Show a warning in the main menu on old OpenGL versions. 2019-07-19 23:57:41 +02:00
Pieter-Jan Briers f38eb13866 Make opening a window twice not crash. 2019-07-19 16:07:01 +02:00
Pieter-Jan Briers c8a28b8c83 Allow using C# Object Initializers for Controls layout.
It's far from a good declarative syntax, but better than before.
2019-07-19 12:38:54 +02:00
Pieter-Jan Briers 81b521a8e4 Re-organize entity spawn window. 2019-07-19 12:07:58 +02:00
Pieter-Jan Briers 8f976ce810 Window titles left aligned, text clipping if necessary. 2019-07-19 11:31:04 +02:00
Pieter-Jan Briers 8d2ea9aed1 Remove SS14Window.AddToScreen and related systems. 2019-07-18 22:48:51 +02:00
Pieter-Jan Briers 60f46afddd Tooltips do not block the mouse. 2019-07-13 22:03:38 +02:00
Pieter-Jan BriersandGitHub 09c36b57cd Shift half of Clyde around to implement better outline rendering. (#830)
* Attempted Clyde cleanup, didn't get far.

* Add negation operator to Vector2i.

* Add RenderOrder to ISpriteComponent.

* Post process shaders.

Adds "post process" shaders to sprite component.
These are executed on the WHOLE sprite component (every layer)
in one draw.

This is necessary to implement functional outlines.
2019-07-06 19:17:33 +02:00
Pieter-Jan BriersandGitHub 9115610d2f Integration testing v2 (#826)
* Rewrite Integration testing, add support for the client.

* Rewrite AssemblyLoader to not be static.

* Adds ability to post messages into thread.
2019-06-04 19:05:16 +02:00
moneylandPieter-Jan Briers b92ea9a2aa Remove GUI dependence on tscn files (#812)
* Remove unused options menu tscn

* Move SS14Window to pure C#

* Move SpriteView to pure C#

* Move EntitySpawnWindow and EntitySpawnItem to pure C#

* Removes using statements accidentally added by resharper

* Set EntitySpawnWindow default size to normal value

Note that in construction menu and storage menu this had to be done in the object initializer and didn't work if it was set in the Initialize function for the respective menus. For whatever reason setting it in the EntitySpawnWindow.Initialize works fine.
2019-05-24 16:57:13 +02:00
Pieter-Jan Briers 10440648bc Remove IDisplayManager dependency from SS14Window 2019-05-16 14:27:51 +02:00
Pieter-Jan Briers 3bad55a705 Move escape menu out of engine. 2019-05-14 15:19:27 +02:00
Pieter-Jan Briers 0b63dbd1f2 Move TileSpawnWindow to pure C#. 2019-05-13 09:15:03 +02:00