Commit Graph
24 Commits
Author SHA1 Message Date
Pieter-Jan BriersandGitHub 6674be3adc Client NRTs (#1121) 2020-06-12 12:57:39 +02:00
ClyybberandGitHub 71b06c0791 Placement improvements (#1105) 2020-06-08 13:51:22 +02:00
Pieter-Jan Briers b366070cd4 Adds entity prototype editor suffix system. 2020-04-26 01:16:49 +02: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
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
DamianXandPieter-Jan Briers ae1e9c3a71 Entity spawn window's search bar grabs keyboard focus (#928) 2020-01-21 18:10:04 +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 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
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
Pieter-Jan Briers daf0d1dd6c Fix memory leak with entity spawn window 2019-08-31 18:39:19 +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 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 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
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 BriersandGitHub 17ebeac107 UI Scaling Support. (#809)
Not quite perfect, but quite usable.

Adds the ability to scale the UI. Scaling is controlled via a cvar,
and can be changed at runtime.
Fractional scaling is supported.

Some controls could be better (SpriteView, TextureRect),
but for now it's a good start.
2019-05-11 16:04:14 +02:00
SilverandGitHub 25926a17b7 Renames SS14.* to Robust.* (#793)
RobustToolbox projects should be named Robust.* 

This PR changes the RobustToolbox projects from SS14.* to Robust.*

Updates SS14.* prefixes/namespaces to Robust.*
Updates SpaceStation14.sln to RobustToolbox.sln
Updates MSBUILD/SS14.* to MSBUILD/Robust.*
Updates CSProject and MSBuild references for the above
Updates git_helper.py
Removes Runserver and Runclient as they are unusable
2019-04-15 20:24:59 -06:00