478 Commits over 396 Days - 0.05cph!
Length.Calc (LengthUnit.Expression), evaluate on demand
Add failing test for nested calc (`calc( ... + calc( ... ) )`)
Add support for nested `calc()` statements
Initial support for `calc( ... )`
VR: apply mouse scroll with correct direction, only apply if this panel is focused
Add Entity.IsPawn
Fixes sboxgame/issues/issues/3927
Stats.GetPlayerStats uses steamid parameter
Fixes sboxgame/issues/issues/3766
Menu GameGroup inner div takes pointer events, so that the gaps between cards don't affect scrolling
Compatibility - legacy MouseWheel has setter, add obsolete TryScroll( float )
Old MouseWheel should be float not vector2
Make mouse wheel a Vector2, implement initial horizontal mouse wheel support for UI
MouseWheel -> MouseScroll, obsolete old
Ignore scroll if it's not moving in the same direction that the panel overflows in
e.g. stops us interfering with vertical scrolls on horizontally
scrolling panels:
https://files.facepunch.com/alexguthrie/1b3011b1/sbox-dev_12znz25nJC.mp4
Invert scroll X axis
Update some more places where I forgot to change MouseWheel to MouseScroll, obsolete `Input.MouseWheel` and `InputData.MouseWheel`
WorldInput uses Vector2 for scroll
Pass keyboard modifiers to mouse wheel event, and interpret mouse scrolls as horizontal if shift key is held
Invert scroll value for emulated horizontal scroll (scrolling down should scroll to the right)
Invert scroll value for emulated horizontal scroll (scrolling down should scroll to the right)
Pass keyboard modifiers to mouse wheel event, and interpret mouse scrolls as horizontal if shift key is held
Invert scroll X axis
Update some more places where I forgot to change MouseWheel to MouseScroll, obsolete `Input.MouseWheel` and `InputData.MouseWheel`
WorldInput uses Vector2 for scroll
Ignore scroll if it's not moving in the same direction that the panel overflows in
e.g. stops us interfering with vertical scrolls on horizontally
scrolling panels:
https://files.facepunch.com/alexguthrie/1b3011b1/sbox-dev_12znz25nJC.mp4
MouseWheel -> MouseScroll, obsolete old
Make mouse wheel a Vector2, implement initial horizontal mouse wheel support for UI
Body groups no longer affect hitboxes / hitbox sets
Should fix sboxgame/issues/issues/2922
CModel::GetAllHitboxSets and CModel::GetAllHitboxes
Ignores mesh group mask when fetching
Add WarningsAsErrors support for projects
Supports a list of errors (e.g. `CS8613;CS8601;CS8625`).
Does not support the `nullable` shorthand yet because of a .NET issue
(would need to expand manually, which is messy)
Turn BaseStyles members into a table containing type, default value, and inheritance state, generate BaseStyles.Defaults
Auto-generate layout cascading based on inheritance state
Use BaseStyles.Default instead of hardcoding defaults
Similar to `css-defaults` branch but this does it better - so I'm
deleting that in favour of this.
Rather than hard-coding the default value every time we fetch it:
```cs
var value = Styles.BackgroundColor ?? Color.White;
```
We should be doing something like:
```cs
var value = Styles.BackgroundColor ?? Default.BackgroundColor;
```
Provide default values as fallbacks for style transitions, use LerpProperty inside BaseStyles.FromLerp
In FromLerp, check if the property we're trying to change is actually changing
Prevents us from stomping property changes when a transition is running
with `transition: all` if you have an animation running simulataneously
Move default styles into `DefaultStyles`, make everything readonly
VirtualScrollPanel uses DefaultStyles
Only use fallback inside Lerp functions if from/to are null
Move null checks into Lerp functions, remove logs
Tidy up, use same code path for lerps
Refer to default values in docstrings, inherited/cascading values lerp to their initial `from` values if `to` is unset
Merge fixes, Name -> TypeName
Refer to default values in docstrings, inherited/cascading values lerp to their initial `from` values if `to` is unset
Tidy up, use same code path for lerps
Only use fallback inside Lerp functions if from/to are null
Move null checks into Lerp functions, remove logs
VirtualScrollPanel uses DefaultStyles
Turn BaseStyles members into a table containing type, default value, and inheritance state, generate BaseStyles.Defaults
Auto-generate layout cascading based on inheritance state
Use BaseStyles.Default instead of hardcoding defaults
Similar to `css-defaults` branch but this does it better - so I'm
deleting that in favour of this.
Rather than hard-coding the default value every time we fetch it:
```cs
var value = Styles.BackgroundColor ?? Color.White;
```
We should be doing something like:
```cs
var value = Styles.BackgroundColor ?? Default.BackgroundColor;
```
Provide default values as fallbacks for style transitions, use LerpProperty inside BaseStyles.FromLerp
In FromLerp, check if the property we're trying to change is actually changing
Prevents us from stomping property changes when a transition is running
with `transition: all` if you have an animation running simulataneously
Move default styles into `DefaultStyles`, make everything readonly
Generate Style.Unset(), start using IsSet()
Remove nullability from public-facing BaseStyles properties
We'll keep the internal nullable fields, allowing us to automatically
refer back to default property values if these are null (these are now
defined alongside the properties themselves).
This means we don't have to keep remembering the default values for each
CSS property and check for null manually each time - which is a massive
pain in the ass and was spilling over into our menu addon(!)
Mirror UV when sampling inside filter - prevents ugly border around some elements when using `filter: blur()`
Default to using opposite value inside BaseStyles.Lerp functions if a value is null
PanelTransform.Lerp will handle null for us, we don't need to do it inside BaseStyles.Lerp
Pull Styles.FromLerp up to BaseStyles, auto-generate for all properties matching select types
Add auto-generated BaseStyles.LerpProperty
Update transition logic to use new auto-generated functions
Handle box-shadow transitions / animations separately for now
Welcome screen link tweaks: "Wiki" becomes "Getting Started", move to top
UI: Add support for keyframed box shadows - should probably take a look at changing this so that we have consistent property support between transitions and animations
CSS: Flex shorthand support
CSS: Fix nesting inside `background` (fixes devcam)
CSS `background` shorthand no longer requires specific order, more compliant with spec
st&alone: Use test grid texture instead of non-existent burger billboard texture (moved to asset.party)
`background` shorthand color transition
CSS `animation` shorthand, same syntax as web (https://drafts.csswg.org/css-animations/#animation) - any order
Can opt out of drag scrolling with `Panel.CanDragScroll = false;`, enabled by default (sboxgame/issues/issues/3491)
`@readonly` and `@editable` asset browser filters (sboxgame/issues/issues/3205)
Basic parsing support for CSS `background` shorthand
Move position/length shorthand parsing into Parse.TryReadPositionAndSize (used for both mask & background shorthands)
UI: don't clamp UVs in shader when BgRepeat mode is Clamp, fixes angled gradients
Background angles conform to css spec - add offset to match +x as being 0 degrees instead of +y
Local transforms for hand info, we'll convert back to world transforms in managed after anchor transform changes
When loading game project (through welcome screen), if it fails to compile, don't immediately bail - load the project but don't show menu
Disable all game projects when entering content mode
Use s&box logo as window icon for welcome screen 👋
Revert "Don't clean up Release path when running processor codegen shit, fixes razor gen when testing release builds"
This reverts commit 738d6ef11f5591743600177ff476b7d5138f9741.
Don't clean up Release path when running processor codegen shit, fixes razor gen when testing release builds
Max 32 chars for ident edit, don't show sandbox gamemode twice
Add icons for all file menu items
Add "Open in Editor" context menu option to ProjectRow, shows up for library/tools/addon projects
Make StartScreen a BaseWindow, add HasMaximizeButton
StartScreen is no longer modal
Cap IdentEdit to 16 chars
Split out Explorer into 3 tabs now that our docking doesn't suck
Draw active project at top of Project tab
When closing or opening a game project, run disconnect & close active menu