Singtaa
Singtaa
OOneJS
Created by amorphous on 9/15/2024 in #general-discussion
Migrating from v1 -> v2
I will start migrating the headless comps from v1 to v2 https://github.com/Singtaa/onejs-comps Just a slider right now (needed that one for something Yesterday)
5 replies
OOneJS
Created by amorphous on 9/15/2024 in #general-discussion
Migrating from v1 -> v2
oh for Style, you can use Partial<CS.OneJS.Dom.DomStyle> in most cases
5 replies
OOneJS
Created by amorphous on 9/15/2024 in #general-discussion
Migrating from v1 -> v2
1. The def for Fragment was rencently added. But yeah, to get full npm and esbuild workflow working, I had to manually pull in and check every single declaration for onejs-preact and had to leave out some typings that had conflicts at the time. Feel free to PR https://github.com/DragonGround/onejs-preact to get missing typings in. 2. It's been on my mind, but I haven't gotten around to these yet for V2. 3. Nested classes? Those can be tricky when translating them from C# to TS. Half of time, they'll require some manual adjustment, especially when combined with explicit interfaces. 4. Reading over your code again, I think you might have something else that's triggering the delegate bridge error. Do you still get the error if your event is Action<float> instead of Action<bool>? Because it just seem weird that Action<float> works fine and Action<bool> doesn't. The former is being used in both the Ul Meter tutorial and the fortnite UI sample. I didn't need to explicitly declare UsingAction<float> for these.
5 replies
OOneJS
Created by NonextantBat on 9/12/2024 in #general-discussion
Specific Area
I think you use OneJS for "the whole screen" like normal and just set picking-mode={PickingMode.Ignore} for the root div so that it won't block input events. Your phone rectangle can be absolutely positioned or use flexbox.
11 replies
OOneJS
Created by NonextantBat on 9/12/2024 in #general-discussion
Specific Area
Then it should be pretty straight-forward. Though I'm not 100% sure what you meant by absolutely positioning not working. Do you mean the containing root element (the canvas you were referring to) also moves around?
11 replies
OOneJS
Created by NonextantBat on 9/12/2024 in #general-discussion
Specific Area
No description
11 replies
OOneJS
Created by NonextantBat on 9/12/2024 in #general-discussion
Specific Area
If your worldspace UI doesn't need to handle events (for displaying purposes only) then you can use a RenderTexture on the PannelSettings, and use the RT in worldspace however you want
11 replies