* Add DatePicker
* DatePicker fixes
- Now uses `DateOnly` (currently fails sandbox, but PJB has promised to add
it in engine)
- Add MinDate and MaxDate fields
- Use constructor instead of parsing date string
* Content - change the (should-be-obsolete) DisposeAllChildren into the more robust RemoveAllChildren.
* Remove duplicate calls.
---------
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
* Borg hands & hand whitelisting
* yaml linted
* yaml linted (x2)
* yaml linted (x3)
* my storage tests so pass
* no need for SetCount
* ok new stuff you can get fixed too
* oops
* staque
* what if we addressed feedback
* my place so holder
* what if we addresesd feedback
* what if i did it correctly
* terminating or deleted
* Add ENERGYWATTHOURS() loc function
Takes in joules (energy), displays as watt-hours.
* Add simple OnOffButton control
* Re-add Inset style class
This was sloppily removed at some point?? Whatever, I need it.
* Add helper functions for setting title/guidebook IDs on FancyWindow
Reagent dispenser uses these, more in the next commits.
* Add BuiPredictionState helper
This enables me to implement coarse prediction manually in the battery UI.
Basically it's a local buffer of predicted inputs that can easily be replayed against future BUI states from the server.
* Add input coalescing infrastructure
I ran into the following problem: Robust's Slider control absolutely *spams* input events, to such a degree that it actually causes issues for the networking layer if directly passed through. For something like a slider, we just need to send the most recent value.
There is no good way for us to handle this in the control itself, as it *really* needs to happen in PreEngine. For simplicity reasons (for BUIs) I came to the conclusion it's best if it's there, as it's *before* any new states from the server can be applied. We can't just do this in Update() or something on the control as the timing just doesn't line up.
I made a content system, BuiPreTickUpdateSystem, that runs in the ModRunLevel.PreEngine phase to achieve this. It runs a method on a new IBuiPreTickUpdate interface on all open BUIs. They can then implement their own coalescing logic.
In the simplest case, this coalescing logic can just be "save the last value, and if we have any new value since the last update, send an input event." This is what the new InputCoalescer<T> type is for.
Adding new coalescing logic should be possible in the future, of course. It's all just small helpers.
* Battery interface
This adds a proper interface to batteries (SMES/substation). Players can turn IO on and off, and they can change charge and discharge rate. There's also a ton of numbers and stuff. It looks great.
This actually enables charge and discharge rates to be changed for these devices. The settings for both have been set between 5kW and 150kW.
* Oops, forgot to remove these style class defs.
* it works! kinda
* so it works now
* minor cleanup
* central button now is useful too
* more cleanup
* minor cleanup
* more cleanup
* refactor: migrated code from toolbox (as it was rejected as too specific)
* feat: moved border drawing for radial menu into RadialMenuTextureButton. Radial menu position setting into was moved to OverrideArrange to not being called on every frame
* refactor: major reworks!
* renamed DrawBagleSector to DrawAnnulusSector
* Remove strange indexing
* Regularize math
* refactor: re-orienting segment elements to be Y-mirrored
* refactor: extracted radial menu radius multiplier property, changed color pallet for radial menu button
* refactor: removed icon backgrounds on textures used in current radial menu buttons with sectors, RadialContainer Radius renamed and now actually changed control radius.
* refactor: in RadialMenuTextureButtonWithSector all sector colors are converted to and from sRGB in property getter-setters
* refactor: renamed srgb to include Srgb suffix so devs gonna see that its srgb clearly
* fix: enabled any functional keys pressed when pushing radial menu buttons
* fix: radial menu sector now scales with UIScale
* fix: accept only one event when clicking on radial menu ContextualButton
* fix: now radial menu buttons accepts only click/alt-click, now clicks outside menu closes menu always
* feat: simple radial menu prototype for easier creation
* refactor: cleanup, restored emote filtering, button models now have class hierarchy
* refactor: remove usage of closure from 'outside code'
* refactor: remove non existing type from UiControlTest
* refactor: remove unused using
* refactor: revert ability to declare radial menu layers in xaml, scale 32px sprites using scale in radial menu
* refactor: whitespaces
* refactor: subscribe for dispose on existing radial menus
* feat: now simple radial menu button models can have custom color for each sector background (and hover background color). Also added OpenOverMouseScreenPosition inside SimpleRadialMenu
* fix: AI door menu now can be closed by verb if it gets unpowered
* overlay and its registration
* radial menu shader but it requires wierd offset
* remove unused file
* smol cleanup
* remove unused code
* neat internal subsctors in radial menu shaders
* refactor finalize visual style
* comments, simplify, extract variable and other minor refactors on radial-menu shader
* refactor: extract more data from radial menu with sector to radial container for shader drawing
* replaced DrawSeparators for RadialMenuTextureButtonWithSector with DrawBorder (no reason to make them separate), also now colors are properly applied
* refactor: simplify hiding border, extended xml-doc for simple radial menu settings
* refactor: remove duplication of radial menu shaders, use ValueList to collect ClearExistingChildrenRadialButtons buttons to remove
* refactor: remove linq
* fix: fix AI radial action serialization using invalid type
* refactor: fix duplicate ShowDeviceNotRespondingPopup for AI by properly checking if it can interact
* refactor: removed *if* blocks from shader, replaced with branchless logic
* refactor: whitespaces, changed list to array in simple radial button preparing methods
* fix: merge duplicated code
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
* it works! kinda
* so it works now
* minor cleanup
* central button now is useful too
* more cleanup
* minor cleanup
* more cleanup
* refactor: migrated code from toolbox (as it was rejected as too specific)
* feat: moved border drawing for radial menu into RadialMenuTextureButton. Radial menu position setting into was moved to OverrideArrange to not being called on every frame
* refactor: major reworks!
* renamed DrawBagleSector to DrawAnnulusSector
* Remove strange indexing
* Regularize math
* refactor: re-orienting segment elements to be Y-mirrored
* refactor: extracted radial menu radius multiplier property, changed color pallet for radial menu button
* refactor: removed icon backgrounds on textures used in current radial menu buttons with sectors, RadialContainer Radius renamed and now actually changed control radius.
* refactor: in RadialMenuTextureButtonWithSector all sector colors are converted to and from sRGB in property getter-setters
* refactor: renamed srgb to include Srgb suffix so devs gonna see that its srgb clearly
* fix: enabled any functional keys pressed when pushing radial menu buttons
* fix: radial menu sector now scales with UIScale
* fix: accept only one event when clicking on radial menu ContextualButton
* fix: now radial menu buttons accepts only click/alt-click, now clicks outside menu closes menu always
* feat: simple radial menu prototype for easier creation
* refactor: cleanup, restored emote filtering, button models now have class hierarchy
* refactor: remove usage of closure from 'outside code'
* refactor: remove non existing type from UiControlTest
* refactor: remove unused using
* refactor: revert ability to declare radial menu layers in xaml, scale 32px sprites using scale in radial menu
* refactor: whitespaces
* refactor: subscribe for dispose on existing radial menus
* feat: now simple radial menu button models can have custom color for each sector background (and hover background color). Also added OpenOverMouseScreenPosition inside SimpleRadialMenu
* fix: AI door menu now can be closed by verb if it gets unpowered
* refactor: simplify hiding border, extended xml-doc for simple radial menu settings
* refactor: remove linq
* fix: fix AI radial action serialization using invalid type
* refactor: fix duplicate ShowDeviceNotRespondingPopup for AI by properly checking if it can interact
* refactor: whitespaces, changed list to array in simple radial button preparing methods
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
* Test entered tree fix
* Use Opened override
* Fix keyboard focus on window open for DialogWindow
This affects Phone, Pray, Rename, and multiple other admin verbs.
* Clean up
* it works! kinda
* so it works now
* minor cleanup
* central button now is useful too
* more cleanup
* minor cleanup
* more cleanup
* refactor: migrated code from toolbox (as it was rejected as too specific)
* feat: moved border drawing for radial menu into RadialMenuTextureButton. Radial menu position setting into was moved to OverrideArrange to not being called on every frame
* refactor: major reworks!
* renamed DrawBagleSector to DrawAnnulusSector
* Remove strange indexing
* Regularize math
* refactor: re-orienting segment elements to be Y-mirrored
* refactor: extracted radial menu radius multiplier property, changed color pallet for radial menu button
* refactor: removed icon backgrounds on textures used in current radial menu buttons with sectors, RadialContainer Radius renamed and now actually changed control radius.
* refactor: in RadialMenuTextureButtonWithSector all sector colors are converted to and from sRGB in property getter-setters
* refactor: renamed srgb to include Srgb suffix so devs gonna see that its srgb clearly
* fix: enabled any functional keys pressed when pushing radial menu buttons
* fix: radial menu sector now scales with UIScale
* fix: accept only one event when clicking on radial menu ContextualButton
* fix: now radial menu buttons accepts only click/alt-click, now clicks outside menu closes menu always
---------
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
* Adds Support for Guidebook Buttons in UIs
* read it from the component
* the code is perfect
* moony review
---------
Co-authored-by: ike709 <ike709@github.com>
* Always display item status panel fully
Initial feedback from the UI changes seems to be that a lot of people go "why is there empty space" so let's fix that.
* Fix item status middle hand being on the wrong side
I think I switched this around when fixing the left/right being inverted in the UI code.
* Minor status panel UI tweaks
Bottom-align contents now that the panel itself doesn't dynamically expand, prevent weird gaps.
Clip contents for panel
* Fix clipping on implanters and network configurators.
Made them take less space. For implanters the name has to be cut off, which I did by adding a new ClipControl to achieve that in rich text.
* Update visibility of item status panels based on whether you have hands at all.
This avoids UI for borgs looking silly.
Added a new "HandUILocation" enum that doesn't have middle hands to avoid confusion in UI code.
* Use BulletRender for laser guns too.
Provides all the benefits like fixing layout overflow and allowing multi-line stuff. Looks great now.
This involved generalizing BulletRender a bit so it can be used for not-just-bullets.
* Fix geiger word wrapping if you're really fucked
* Adds the option to fit your viewport to your vertical screenspace
* fixes documentation
* Removes commented-out leftover
* Hides the viewport width slider and also we dont know if the viewport width causing stretching/squishing was a bug present before but we fixed that while we were at it
* Removes commented out leftovers
* Initial radial menu prototyping for the RCD
* Radial UI buttons can send messages to the server
* Beginning to update RCDSystem
* RCD building system in progress
* Further updates
* Added extra effects, RCDSystem now reads RCD prototype data
* Replacing tiles is instant, multiple constructions are allowed, deconstruction is broken
* Added extra functionality to RadialContainers plus documentation
* Fixed localization of RCD UI strings
* Menu opens near cursor, added basic RCD
* Avoiding merge conflict
* Implemented atomized construction / deconstruction rules
* Increased RCD ammo base charges
* Moved input context definition to content
* Removed obsoleted code
* Updates to system
* Switch machine and computer frames for electrical cabling
* Added construction ghosts
* Fixed issue with keybind detection code
* Fixed RCD construction ghost mispredications
* Code clean up
* Updated deconstruction effects
* RCDs effects don't rotate
* Code clean up
* Balancing for ammo counts
* Code clean up
* Added missing localized strings
* More clean up
* Made directional window handling more robust
* Added documentation to radial menus and made them no longer dependent on Content
* Made radial containers more robust
* Further robustness to the radial menu
* The RCD submenu buttons are only shown when the destination layer has at least one children
* Expanded upon deconstructing plus construction balance
* Fixed line endings
* Updated list of RCD deconstructable entities. Now needs a component to deconstruct instead of a tag
* Bug fixes
* Revert unnecessary change
* Updated RCD strings
* Fixed bug
* More fixes
* Deconstructed tiles/subflooring convert to lattice instead
* Fixed failed tests (Linux doesn't like invalid spritespecifer paths)
* Fixing merge conflict
* Updated airlock assembly
* Fixing merge conflict
* Fixing merge conflict
* More fixing...
* Removed erroneous project file change
* Fixed string handling issue
* Trying to fix merge conflict
* Still fixing merge conflicts
* Balancing
* Hidden RCD construction ghosts when in 'build' mode
* Fixing merge conflict
* Implemented requested changes (Part 1)
* Added more requested changes
* Fix for failed test. Removed sussy null suppression
* Made requested changes - custom construction ghost system was replaced
* Fixing merge conflict
* Fixed merge conflict
* Fixed bug in RCD construction ghost validation
* Fixing merge conflict
* Merge conflict fixed
* Made required update
* Removed lingering RCD deconstruct tag
* Fixing merge conflict
* Merge conflict fixed
* Made requested changes
* Bug fixes and balancing
* Made string names more consistent
* Can no longer stack catwalks
* Use new Subs.CVar helper
Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.
This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.
* Fix a bunch of warnings
* More warning fixes
* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.
* Get rid of some more ISerializationHooks for enums
* And a little more
* Apply suggestions from code review
Co-authored-by: 0x6273 <0x40@keemail.me>
---------
Co-authored-by: 0x6273 <0x40@keemail.me>
* add Placeholder and make default buttons flags consistent w old behaviour
* DialogWindow ops
* make QuickDialog use DialogWindow
* Update Content.Client/UserInterface/Controls/DialogWindow.xaml
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>