Slightly different format for this video, wanted to try something new. Let me know what you think!
Пікірлер: 12
@JudahCarusoАй бұрын
Apologies for the audio cut-outs. My microphone's gain was much lower than it usually is and I forgot to adjust it.
@maxrinehart4177Ай бұрын
excellent video, shame it has audio problem. maybe it is time for a new microphone 🎤
@JudahCarusoАй бұрын
Thanks! And it was mostly related to incompetence haha. I forgot to turn up my mic/adjust my noise gate in OBS…
@maxrinehart4177Ай бұрын
man, I love your videos, I learned a lot from them. Please make more Jai videos. ❤
@arl-t8dАй бұрын
damn man, I really want that jai
@ArkDEngalАй бұрын
same, since 2016 TT_TT
@CyberWolf755Ай бұрын
Hi Judah. Love your videos covering Jai. I have a question. Does variable tagging support holding values and can that tag be read during runtime? E.g. for displaying a property UI panel based on the selected context. How would you tag a specific float with a Clamp tag that would have a min and max, so the panel knows how to render the UI for that specific property
@JudahCarusoАй бұрын
Thanks! I appreciate the support! And it depends on what you mean by holding a value. For instance, the value can't be something known at runtime because it's just a constant string put on the declaration. However, you can read them at runtime if you have runtime type information enabled (which it is by default). Your example could definitely work like this: UI_Panel :: struct { parent: *UI_Panel; min: float32; @Clamp(0, parent.min) max: float32; @Clamp(parent.max) } ui_panel_update :: (panel: *UI_Panel) { info := cast(*Type_Info_Struct)type_info(UI_Panel); // if you don't like this style, you could also auto-generate this code with #insert #run for info.members if it.notes.count > 0 { for note: it.notes if starts_with(note, "@Clamp") { // now we know we're looking at the Clamp note of a struct member, // so we can parse the string and do whatever with it. // for example, seeing 'parent.min' in the string, then using its value at runtime // ... if use_parent_min { panel.min = clamp(0, parent.min); } } } }
@CyberWolf755Ай бұрын
@@JudahCaruso Thank you for the detailed reply. It answered my questions :)
@chopsueysenseiАй бұрын
great stuff! do you have a jai LSP for Sublime or something like that here?
@JudahCarusoАй бұрын
it's not exactly an LSP, but there's a sublime plugin called JaiTools which has syntax highlighting and goto definition; then I just have a sublime project that points to the install directory!