Commit Graph
25 Commits
Author SHA1 Message Date
pathetic meowmeowandGitHub bbfd27d78f XamlX upgrade (#6288) 2026-07-24 19:00:35 +10:00
PJB3005 7542b1ca16 Don't do work if assigning stylesheet a control already has 2025-10-26 17:40:19 +01:00
acc7bf7595 Add support for overlays to draw controls (#5223)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2025-01-29 22:48:11 +11:00
Pieter-Jan BriersandGitHub 0fadfc2d9b Allow control layout properties to be set via style sheet. (take 2) (#5037)
* Reapply "Allow control layout properties to be set via style sheet." (#5035)

This reverts commit af36d24892.

* Fix tests

MaxSize properties had wrong default. Oops.
2024-04-17 00:42:12 +02:00
metalgearslothandGitHub af36d24892 Revert "Allow control layout properties to be set via style sheet." (#5035)
This reverts commit 8c4deb2067.

# Conflicts:
#	RELEASE-NOTES.md
2024-04-14 14:14:44 +10:00
Pieter-Jan Briers 8c4deb2067 Allow control layout properties to be set via style sheet.
This works by setting the stylesheet values into the regular control property fields when updated. This means 0 performance overhead except when updating styles, and even then it's probably negligible. A bitfield is used to track which properties are set and how.

This code is all done manual for now. I wanted to make a source gen for this but couldn't be arsed at the moment. The code manually written here is basically what a future source gen would generate optimally.
2024-04-14 02:09:00 +02:00
Letter NandGitHub 7a8abb3db7 debug ui ui update (#4782)
* UI Debugger: Make it look better

* cleanup

- Use GetOrNew()
- Use typeof(Control)
- Don't check string prefixes
2023-12-31 06:24:06 +11:00
Leon FriedrichandGitHub ce3b92aea2 Try prevent infinite measure/arrange loops (#4176) 2023-07-10 17:36:22 +10:00
Leon FriedrichandGitHub dea195be4a Change prof tree style & add basic stylesheet support (#4021) 2023-05-13 00:04:35 +10:00
Pieter-Jan Briers 15ff120b97 Add Control.StylePropertyDefault() helper method. 2021-08-30 23:34:14 +02:00
Pieter-Jan Briers 928ae19249 Fix styling not applying to root controls. 2021-08-30 15:17:43 +02:00
Pieter-Jan BriersandGitHub 583b7ebf38 WPF layout (#1581) 2021-02-21 12:28:13 +01: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
b8e5b47e7a Use 'new' expression in places where the type is evident for the engine (#1415)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-11-26 00:16:55 +01:00
89dca78d18 Fix Button Labels not updating styles when Button is disabled/enabled (#1263)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-08-30 00:12:56 +02:00
Pieter-Jan BriersandGitHub 6674be3adc Client NRTs (#1121) 2020-06-12 12:57:39 +02:00
PrPleGooandGitHub 6d8a0f6558 ISelfSerialize interface (#1021)
* Special check for decimal in serialization code. Changed method in IoCManager for a little QoL

* ISelfSerialize stuff

ISelfSerialize interface for stuff that want to implement their own (de)serialization.
Forgot that desialize could exist for decimals earlier.
Added ViewVariablesPropertyEditorISelfSerialzable thing for viewvariables.

* fix TestStylesheetOverride

* Fix improper UT logic

* Somewhat neater VV lineEdit event hanlding

* remove whitespace and unused using

* uninherit ViewVariablesPropertyEditorISelfSerialzable

* Fix improper use or ToString

* seal VV classes
2020-04-08 21:24:32 +02:00
Pieter-Jan Briers ec52102d02 Allow controls to override stylesheets for itself and descendants. 2020-04-04 15:07:53 +02: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
CatTheSystemandPieter-Jan Briers fc67c5069c Allowed multiple Pseudo Classes per element. (#846)
* Quick fix to flashlight radius

* SomethingAbout CSS Class

* Shitty update

* fuck

* Creativ!

* Last But not least

* Quick Change

* Fixed version

* Tiny fix

* Next Fix

* Another fix
2019-08-20 21:22:14 +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 4fd24e8de9 Optimize UI system somewhat.
Especially styling should be significantly faster now.
2019-07-26 17:32:58 +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
moneylandPieter-Jan Briers 6a9a727e1f Add Control.SetOnlyStyleClass (#820)
This clears the collection of style classes and adds the new one. This allows controls to easily switch between several style classes without needing to keep track of the active one in their own code.
2019-05-28 20:32:32 +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