Commit Graph
87 Commits
Author SHA1 Message Date
9d1bec9bb2 Merge FloatMath and MathHelper (#1234)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-08-20 19:21:07 +02:00
Pieter-Jan Briers 1934428c95 Use better file access patterns in engine. 2020-08-16 01:08:07 +02:00
73d529386d Added Console Tab Completion (#1212)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-08-14 22:47:26 +02:00
ShadowCommanderandGitHub 444eecf339 Change BaseWindow and SS14Window to open where they previously closed (#1217)
First open will be top left, centered, or left vertically centered. The subsequent calls to open will open the window at the position the window was closed at.
2020-08-09 00:13:09 +02:00
ShadowCommanderandGitHub 97f0479676 Fix OpenCentered by setting size before position (#1211) 2020-08-06 15:53:37 +02:00
Pieter-Jan Briers c482253b9d Clyde debug stats for light count. 2020-07-29 02:06:39 +02:00
MosesandGitHub 27fccbe74c 1513 Erase mode button toggle (#1194) 2020-07-28 14:12:29 -07:00
Víctor Aguilera Puerto d5e422f34e Debug coordinates panel now displays actual entity transform position 2020-07-26 03:16:10 +02:00
Pieter-Jan Briers fc73f88282 Hitting ~ while console is selected now closes it again.
How did this take me this long to fix.
2020-07-08 01:53:11 +02:00
AJCM-gitandGitHub afa0eb8ada Changing some paths (#1158)
* first commit

* Merging master

* Path changes

* what even is this

* MidiCustom
2020-07-07 19:15:39 +02:00
Pieter-Jan BriersandGitHub 6674be3adc Client NRTs (#1121) 2020-06-12 12:57:39 +02:00
Pieter-Jan Briers afb0624a2b Fix DebugTimePanel to report prediction size correctly.
It was not taking into the account that CurTick increments after the mainloop runs tick meaning that it was offset by one.
2020-06-12 12:42:05 +02:00
ClyybberandGitHub 71b06c0791 Placement improvements (#1105) 2020-06-08 13:51:22 +02:00
Pieter-Jan Briers 537b444eae DebugConsole doesn't spam position changes if hidden. 2020-06-06 14:13:00 +02:00
Pieter-Jan Briers 044eeb61f4 Fix OnClose not firing on windows correctly. 2020-05-28 13:18:39 +02:00
Pieter-Jan Briers 32c1b1e3b2 Split off SS14 into BaseWindow. 2020-05-27 14:08:52 +02:00
Pieter-Jan Briers cc4069d526 Fix clear button in tile spawn window not resetting search results. 2020-05-21 23:39:14 +02:00
Pieter-Jan Briers 7f508f7719 Show largest clyde batch size in F3. 2020-05-21 13:44:41 +02:00
Pieter-Jan Briers b7f3627ef1 Remove List<>/Dictionary<,> usage from low-level GameState serialization.
NetSerializer does not handle these well and sends the entire backing array instead of a more compact representation. This can then cause it to start sending lists of length 1 with a *capacity* of 4096 resulting in 250 KiB/s down to send updates for a single entity. As it just did on the public server...
2020-05-12 18:34:16 +02:00
Pieter-Jan Briers f54f4ffe52 Quite possibly break the whole input system.
Made it so keybinds don't block other keybinds from firing.

Why is this necessary? This allows us to have "same keybind, different functionality" binds sanely, like shift click being both TextCursorSelect and (in content) ExamineEntity. Before this change the latter was temporarily broken in UI controls because of TextCursorSelect taking priority and instantly treating the event as handled because it's CanFocus.

The offshoot of this is that all the "args.CanFocus == mouse left" UI code had to be fixed, since multiple things were now firing for that and breaking everything. For example TextCursorSelect actually BROKE because now ExamineEntity was firing inside UI again and that was seen as a left click.

EngineKeyFunctions.UIClick has been introduced as "mouse left for the UI" for this purpose.
2020-05-05 23:58:21 +02:00
Pieter-Jan Briers 400dcb06fc Server scripting. 2020-04-30 00:06:59 +02:00
Pieter-Jan Briers b366070cd4 Adds entity prototype editor suffix system. 2020-04-26 01:16:49 +02:00
Pieter-Jan BriersandGitHub 0c8f869cb4 Prediction (#1027) 2020-04-18 17:35:54 +02:00
Pieter-Jan Briers 832a4e01f1 High level cursor API. 2020-04-17 16:57:51 +02:00
Pieter-Jan Briers 50abd155c2 Opened() hook for SS14Window 2020-03-25 02:14:01 +01:00
ShadowCommanderandGitHub 2f819cf781 Refactor Controls to default to MouseFilterMode.Ignore (#1011)
* Refactor Controls to default to MouseFilterMode.Ignore

* Clean up MouseFilterMode.Ignore from Controls

* Fix BoxContainer eating UI clicks

* Fix ScrollContainer using the wrong variable

* Refactor ContainerButtons to use a StyleClass for formatting instead of typeof

* Refactor BaseButton to work when child has MouseFilter.Pass
2020-03-15 07:29:51 +01:00
Acruid 0a32938c23 DebugCoordsPanel now just prints the Map and Grid coordinates. This looks more uniform, gives more info, and saves a line in the pannel. 2020-03-05 14:42:11 -08:00
ShadowCommanderandGitHub 91467ecdb9 Implement HistoryLineEdit (#990)
* Implement HistoryLineEdit

* Refactor DebugConsole to use HistoryLineEdit

* Clean up LineEdit

Add args.Handle() for each BoundKeyFunction

Clean up if statements

* Rearrange LineEdit variables

* Reimplement DebugConsole saving and loading
2020-02-22 17:56:35 +01:00
ShadowCommanderandGitHub 3b49e0df82 Implement ContainerButton and refactor buttons (#975)
* Add style to TextureRect

* Implement ContainerButton

ContainerButton is a button that resizes to fit the Controls it contains.

* Refactor OptionButton to use ContainerButton

This allows OptionButton to have an inverted triangle icon on the right to make it more obvious that the button is an OptionButton.

* Fix Popup not updating size when opened

* Fix DrawMode not getting updated when _pressed is changed

* Refactor Button to inherit from ContainerButton

* Refactor CheckBox to inherit from ContainerButton

* Fix Control.StyleClasses.GetEnumerator

It was calling GetEnumerator in an infinite loop instead of getting _styleClasses.GetEnumerator like it was supposed to do.

* Update Button references

* Fix Styling
2020-02-17 11:06:16 +01:00
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