Commit Graph
173 Commits
Author SHA1 Message Date
5fac3f4adb UserInterface/RichTextEntry: Rich Text Fixes (Round 2) (#2340)
Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
2021-12-15 10:25:33 +01:00
ShadowCommander ac781e51ec Clean up unused variables in OutputPanel 2021-12-12 23:17:38 -08:00
E F RandGitHub e050af31af Controls/OutputPanel: Conslidate logic in _invalidateEntries, and get rid of some rogue LineHeight calculations (#2332) 2021-12-12 23:10:24 -08:00
E F RandGitHub 2a8887d0b4 Rich text redux (#2213)
* Shared/Utility: Define new FormattedMessage core types

* Shared/Utility: Move MarkupParser to a new namespace, update to new FormattedText

* Shared/Serialization: Temporary fix for FormattedMessageSerializer

* Scripting/ScriptInstanceShared: Move to new FormattedMessage.Builder

* Shared/Utility: Add a FormattedMessage loader to the .Builder

* Server/Scripting: Port SciptHost to FormattedMessage.Builder

* UserInterface/RichTextEntry: NOP out almost everything

not gonna bother fixing it until more groundwork is laid

* Shared/Utility: Expand Utility.Extensions a bit

strictly for pesonal reasons

* Client/UserInterface: Add the base TextLayout engine

* Client/Graphics: Add a Font Library manager

* Graphics/TextLayout: Finish up implementing the TextLayout engine

* Utility/FormattedMessage: Add yet another hack to keep the serializer in service

* Commands/Debug: Use FormattedMessage.Builder

* Console/Completions: Use FormattedMessage.Builder

* Utility/FormattedMessage: Add `AddMessage` methods

* Console/ScriptConsole: Use FormattedMessage.Builder

* Client/Log: Use FormattedMessage.Builder

* CustomControls/DebugConsole: Use FormattedMessage.Builder

* Controls/OutputPanel: Use FormattedMessage.Builder, NOP `Draw` pending rewrite

* Controls/RichTextLabel: Use FormattedMessage.Builder, NOP `Draw` pending rewrite

* UnitTesting: Update FormattedMessage/Markup Tests

They will NOT pass yet, but I don't care; it compiles.

* Utility/FormattedMessage: Fix some off-by-one Builder bugs

* Utility/FormattedMessage: Continue cleanup, test compliance

* Utility/FormattedMessage: Work around https://github.com/dotnet/roslyn/issues/57870

* Utility/FormattedMessage: Move ISectionable from TextLayout, implement it for FormattedMessage

* UserInterface/TextLayout: Add a `postcreate` function to set up new `TIn`s

Apparently Roslyn isn't big-brained enough to understand that a
closure of type `Func<T>` means that `var n = new(); return n;` requires
`new()` to return a `T`.

Ironically, it's significantly less cbt to add this than to convert
that big tuple in `Layout` in to a class or struct of some sort
(to initialize the `List<>`s).

* UserInterface/TextLayout: Throw if `Meta` isn't recognized

TODO warning go brrr

* Graphics/FontLibrary: Add a `DummyVariant`

* UserInterface/UITheme: Move to FontLibraries

* UserInterface/TextLayout: Move to an un-nested `ImmutableArray`

* UserInterface/RichTextEntry: Go ahead. Draw.

* Markup/Basic: Add extension & helpers for FormattedMessage.Builder

* Markup/Basic: Add `EscapeText` back in

A forgotten casualty of the great Markup separation of 2021

* Graphics/FontLibrary: Clean up bit magic, ensure that at least one font is picked

* Graphics/FontLibrary: Add diagnostics to the "no fonts" exception

* UserInterface/TextLayout: Scrap `Word`, return to `Offset`

* UserInterface/TextLayout: A whole bunch of hard-fought bugfixes

* Utility/FormattedMessage: Add a static, empty FormattedMessage

* Utility/FormattedMessage: Fix. Bugs.

* UserInterface/RichTextEntry: Bug fixin'

* UserInterface: CSS teim

* Markup/Basic: Add an optional "default" style to use

* Utility/FormattedMessage: I'm surprised I only made this mistake once.

* Log/DebugConsoleLogHandler: work around lack of a default style
2021-12-12 14:35:26 -08:00
ShadowCommanderandGitHub 3e718575ff Change Button Pressed to work with non-focus keybinds (#1978) 2021-11-21 14:52:41 +01:00
80308a799f Adds collapsible widgets (#2199)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2021-11-16 19:09:59 +01:00
Pieter-Jan Briers 7f03e88e97 OSWindow not adjusts SetSize when window is resized. 2021-11-10 11:57:12 +01:00
Alex EvgrashinandGitHub 341c279265 Bandaid sprite animation in SpriteView (#2181) 2021-11-02 19:50:29 +01:00
E F RandGitHub 884fade25a Add tab "completion" for the server-side C# console (#2176) 2021-10-30 13:26:23 +02:00
ShadowCommanderandGitHub b8cb037151 Fix _enableAllKeybinds buttons breaking due to Use (#2157) 2021-10-24 01:43:46 -07:00
Alex EvgrashinandGitHub 8b54ad79cf Int slider with input field (#2142) 2021-10-22 09:07:45 +02:00
Leon FriedrichandGitHub ad7370f0b3 Add option to make ScrollContainer return size. (#2107) 2021-10-08 16:01:01 +02:00
metalgearslothandGitHub ebaba35e8b Aggressively sleep physics bodies (#2078)
* Aggressively sleep physics bodies

* Fix tests

* Also buff angular damping
2021-09-29 20:06:56 +10:00
Pieter-Jan Briers cd2942a0da Fix splitcontainer layout calculations. 2021-09-25 18:18:33 +02:00
VisneandGitHub a5be8e723e Remove some unused obsolete stuff (#2049) 2021-09-20 10:59:50 +02:00
VisneandGitHub 30f39dfb66 Remove MarginContainer (#2050) 2021-09-20 10:43:12 +02:00
Pieter-Jan Briers 9117f8c776 These IRenderHandle APIs are going public, deal with it. 2021-09-19 23:37:47 +02:00
Visne 8f1386cb19 Remove VBoxContainer/HBoxContainer completely 2021-09-19 18:41:10 +02:00
VisneandGitHub 1c7f19bf67 Add OptionButton margin (#2020) 2021-09-15 01:49:49 +02:00
Pieter-Jan Briers 6328bddb52 Fix GridContainer looking at Size in its ArrangeOverride()
This fixes tests.
2021-09-07 07:47:17 +02:00
Pieter-Jan Briers 1d7f4b4501 Improve comments on BoxContainer a bit. 2021-09-07 02:27:56 +02:00
Pieter-Jan Briers 4ba5654253 Allow modifying selection/cursor colors on LineEdit 2021-08-30 23:34:28 +02:00
Pieter-Jan Briers a7f85b53f8 Background color for UIRoot. 2021-08-30 02:14:22 +02:00
Pieter-Jan Briers 033e20cbf1 Add Closed (past tense) event to OSWindow.
Change a bunch of window event stuff up.
2021-08-24 04:49:04 +02:00
Pieter-Jan Briers e6be04cb83 OSWindow control to make OS windows much easier. 2021-08-24 02:05:25 +02:00
Pieter-Jan Briers f137a6e3a5 Add InheritChildMeasure bool to LayoutContainer 2021-08-22 11:32:15 +02:00
Pieter-Jan Briers bebd638412 Make SplitContainer properties VV. 2021-08-22 02:07:42 +02:00
Pieter-Jan Briers 4fea277541 Make some SplitContainer stuff [ViewVariables] 2021-08-22 02:07:42 +02:00
VisneandGitHub a2398da324 Replace most VBox/HBoxContainers with BoxContainers (#1867) 2021-07-18 18:42:08 +02:00
Pieter-Jan Briers 85782bda92 Make Split- and BoxContainer orientation adjustable, obsolete subtypes. 2021-07-13 17:21:21 +02:00
AcruidandGitHub dadd7b4cc3 Remove Static Component NetIds (#1842)
* ComponentNames are not sent over the network when components are created.

* Removed ComponentStates array from EntityState, now the state is stored directly inside the CompChange struct.

* Remove the unnecessary NetID property from ComponentState.

* Remove Component.NetworkSynchronizeExistence.

* Change GetNetComponents to return both the component and the component NetId.

* Remove public usages of the Component.NetID property.

* Adds the NetIDAttribute that can be applied to components.

* Removed Component.NetID.

* Revert changes to GetComponentState and how prediction works.

* Adds component netID automatic generation.

* Modifies ClientConsoleHost so that commands can be called before Initialize().

* Completely remove static NetIds.

* Renamed NetIDAttribute to NetworkedComponentAttribute.

* Fixing unit tests.
2021-07-12 10:23:13 +02:00
e1a199e060 Removed old Loc.GetString() use instances (#1814)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2021-06-21 02:12:53 +02:00
Pieter-Jan Briers 393bdc04bc ItemList doesn't render things outside its clip region. 2021-06-20 19:48:24 +02:00
ShadowCommander d1a83134e3 Fix SpriteView when UI is scaled 2021-06-05 19:47:26 -07:00
Pieter-Jan Briers 720f1b1d05 Fix a bunch of compiler warnings. 2021-05-12 00:16:12 +02:00
Pieter-Jan BriersandGitHub 8efffc471d Multi-window support (#1713) 2021-05-02 14:05:50 +02:00
Pieter-Jan Briers 81f49d5eb2 Fix moving to the end of a textbox. 2021-03-17 01:22:45 +01:00
Pieter-Jan Briers 516b2cd372 Handle surrogate pairs correctly in LineEdit. 2021-03-10 16:55:12 +01:00
Pieter-Jan Briers 1bf8b2a52b Use Rune for rendering text instead of char.
Fixes crashes with surrogates.
2021-03-09 23:25:27 +01:00
e5b6fccf67 Add a scroll speed property to ScrollContainer (#1590)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2021-02-25 10:39:53 +00:00
RemberBLandGitHub 95a912c329 Adds args.Handle(); into UI code for scrolling (#1595) 2021-02-25 11:08:19 +01:00
Pieter-Jan Briers b814fc851a Fix more scrollbar DPI scaling bugs. 2021-02-24 12:18:29 +01:00
Pieter-Jan BriersandGitHub 583b7ebf38 WPF layout (#1581) 2021-02-21 12:28:13 +01:00
AcruidandGitHub fdb5e014b5 PauseManager moved to Shared (#1553)
* Moved IPauseManager from server to shared.

* Moved ITimerManager from Timers to Timing.

* Added missing IConsoleHost to server/client RegisterIoC. Tests work again.
2021-02-18 20:12:26 -08:00
chairbenderandGitHub 68ab3d504a Various fixes to support new chatbox (#1547)
* #272 no arrow, actually change id on channel changer

* #272 ability to apply style class to child

* #272 try methods for selecting items in OptionButton.cs

* #272 allow escaping right angle bracket in formatted message

* #272 ability to detect when local player is set / unset

* #272 make RemoveModal public since PushModal is as well, so modals can be removed on-demand if needed rather than relying on a click elsewhere

* #272 revert
2021-02-12 18:20:29 -08:00
AcruidandGitHub 2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00
Vera Aguilera PuertoandGitHub 8b9dadffb1 MIDI improvements (#1526) 2021-02-02 18:46:24 +01:00
Pieter-Jan Briers 3e5efd5ed0 Add AnimatedTextureRect 2021-01-24 23:00:02 +01:00
Pieter-Jan Briers cd01ca924b Fix broken PanelContainer due to previous commit.
God I am tired.
2021-01-24 04:20:51 +01:00
Pieter-Jan Briers 38ad8ce132 Fix UI scaling weirdness with PanelContainer. 2021-01-23 21:51:35 +01:00