userAlexcancel
reposboxcancel

704 Commits over 610 Days - 0.05cph!

1 Year Ago
Move to Tier1, remove Raster and just use Texture
1 Year Ago
Sandbox.UI Abstract Sandbox.UI input, move over RootPanel, data classes, IPanel Move BaseStyles into Sandbox.UI Fix flawed equality logic
1 Year Ago
Sizes passed to ImageRect.Calculate with Undefined unit will correctly use default size Default text overflow to "None", spec default is clip but ours behaves differently - this will do for now Give `line-height`, `letter-spacing` and `word-spacing` default values, no need to null check them Don't implicitly clamp backgrounds if background-size is `cover` Handle LengthUnit.Undefined gracefully, document
1 Year Ago
Call GetPixels() on backdrop filter props instead of getting Value directly, fixes percentage/fraction-based filters
1 Year Ago
1 Year Ago
CSS: Better Autogen (#1222) Leaves out nullability changes for a later pain day, but includes layout cascade auto-gen, transition/animation default value handling w/ auto-generated defaults, and guarantees a value for every property in ComputedStyles (although the compiler isn't aware of this yet).
1 Year Ago
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 Generate FillDefaults() function, call inside PreLayout.BuildFinal, add Length.Undefined Fix a bunch of defaults (need better way to check if a property is set tho) Add `Style.IsDefault( name )` Bad idea to call FillDefaults here since it will stomp previous keyframes backdrop-filter-hueRotate is backdrop-filter-hue-rotate (oops) mask-position defaults to 0,0 Use IsDefault when necessary inside tests (HasValue will always be true for ComputedStyle properties), only check where necessary (i.e. if we're not also checking the value itself) Scrolling fixes Remove DefaultStyles, internalize IsDefault, FillDefaults, ApplyCascading Handle `overflow` prop defaults separately Use HasScrollY inside panel input Get rid of remaining null coalescing shit - ComputedStyle properties are no longer null ComputedStyles has its own class w/ no nullables, helps clean things up Remove unused, clean up
1 Year Ago
1 Year Ago
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 Generate FillDefaults() function, call inside PreLayout.BuildFinal, add Length.Undefined Fix a bunch of defaults (need better way to check if a property is set tho) Add `Style.IsDefault( name )` Bad idea to call FillDefaults here since it will stomp previous keyframes backdrop-filter-hueRotate is backdrop-filter-hue-rotate (oops) mask-position defaults to 0,0 Use IsDefault when necessary inside tests (HasValue will always be true for ComputedStyle properties), only check where necessary (i.e. if we're not also checking the value itself) Scrolling fixes Remove DefaultStyles, internalize IsDefault, FillDefaults, ApplyCascading Handle `overflow` prop defaults separately Use HasScrollY inside panel input Get rid of remaining null coalescing shit - ComputedStyle properties are no longer null ComputedStyles has its own class w/ no nullables, helps clean things up Remove unused, clean up
1 Year Ago
Remove unused, clean up
1 Year Ago
ComputedStyles has its own class w/ no nullables, helps clean things up
1 Year Ago
Get rid of remaining null coalescing shit - ComputedStyle properties are no longer null
1 Year Ago
Use HasScrollY inside panel input
1 Year Ago
Handle `overflow` prop defaults separately
1 Year Ago
Remove DefaultStyles, internalize IsDefault, FillDefaults, ApplyCascading
1 Year Ago
Scrolling fixes
1 Year Ago
backdrop-filter-hueRotate is backdrop-filter-hue-rotate (oops) mask-position defaults to 0,0 Use IsDefault when necessary inside tests (HasValue will always be true for ComputedStyle properties), only check where necessary (i.e. if we're not also checking the value itself)
1 Year Ago
Add `Style.IsDefault( name )` Bad idea to call FillDefaults here since it will stomp previous keyframes
1 Year Ago
Fix a bunch of defaults (need better way to check if a property is set tho)
1 Year Ago
Generate FillDefaults() function, call inside PreLayout.BuildFinal, add Length.Undefined
1 Year Ago
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
1 Year Ago
Initial support for `calc( ... )` Length.Calc (LengthUnit.Expression), evaluate on demand Add failing test for nested calc (`calc( ... + calc( ... ) )`) Add support for nested `calc()` statements Do GetPixels inside calc functions (for percentages) Division by zero throws correct DivideByZeroException Tests & support for invalid syntax, constants (e, pi, nan), scaling percentages Remove token count check, will need to re-think this validation later Rename test class to CalcTests, clean up Check if length unit is expression & evaluate on demand Implicit eval Pass parent property values into ToYoga() for calc
1 Year Ago
Implicit eval Pass parent property values into ToYoga() for calc
1 Year Ago
Rename test class to CalcTests, clean up Check if length unit is expression & evaluate on demand
1 Year Ago
Tests & support for invalid syntax, constants (e, pi, nan), scaling percentages Remove token count check, will need to re-think this validation later
1 Year Ago
Do GetPixels inside calc functions (for percentages) Division by zero throws correct DivideByZeroException
1 Year Ago
Length.Calc (LengthUnit.Expression), evaluate on demand Add failing test for nested calc (`calc( ... + calc( ... ) )`) Add support for nested `calc()` statements
1 Year Ago
Initial support for `calc( ... )`
1 Year Ago
VR: apply mouse scroll with correct direction, only apply if this panel is focused
1 Year Ago
Add Entity.IsPawn Fixes sboxgame/issues/issues/3927
1 Year Ago
Stats.GetPlayerStats uses steamid parameter Fixes sboxgame/issues/issues/3766
1 Year Ago
Menu GameGroup inner div takes pointer events, so that the gaps between cards don't affect scrolling
1 Year Ago
Compatibility - legacy MouseWheel has setter, add obsolete TryScroll( float )
1 Year Ago
Cleanup
1 Year Ago
Old MouseWheel should be float not vector2
1 Year Ago
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)
1 Year Ago
Invert scroll value for emulated horizontal scroll (scrolling down should scroll to the right)
1 Year Ago
Pass keyboard modifiers to mouse wheel event, and interpret mouse scrolls as horizontal if shift key is held
1 Year Ago
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
1 Year Ago
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
1 Year Ago
MouseWheel -> MouseScroll, obsolete old
1 Year Ago
Make mouse wheel a Vector2, implement initial horizontal mouse wheel support for UI
1 Year Ago
Body groups no longer affect hitboxes / hitbox sets Should fix sboxgame/issues/issues/2922
1 Year Ago
CModel::GetAllHitboxSets and CModel::GetAllHitboxes Ignores mesh group mask when fetching
1 Year Ago
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)
1 Year Ago
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
1 Year Ago
Refer to default values in docstrings, inherited/cascading values lerp to their initial `from` values if `to` is unset
1 Year Ago
Tidy up, use same code path for lerps
1 Year Ago
Only use fallback inside Lerp functions if from/to are null Move null checks into Lerp functions, remove logs
1 Year Ago
VirtualScrollPanel uses DefaultStyles