#kayak_ui

2041 messages ยท Page 3 of 3 (latest)

quasi sun
#

on latest master everything works just fine for me )

#

finally I can finish my update to bevy 0.12

#

thank you working on this )

buoyant marsh
#

Any progress on porting to 0.13 yet?

quasi sun
#

@whole edge do you have a plans to support this lib in a long term?

buoyant marsh
#

I think the plan is for bevy_ui to eventually make kayak_ui obsolete ...

#

Also I would've tried porting kayak_ui to 0.13 myself but bevy_svg hasn't gotten a 0.13 release either ๐Ÿ™ƒ

quasi sun
buoyant marsh
#

It's not close at all unfortunately. bevy_ui is missing a lot of really basic UI features and you'd need to set up some custom logic to turn interactions into a pattern similar to what kayak_ui has (where you give a button a on_click handler, rather than slapping systems that handle clicks on UI elements with specific components)

#

I think there are some plugins that add some of the missing functionality, tho I haven't tested them to see how well they work

quasi sun
buoyant marsh
#

I'll take a look and see if I can port it easily ... I will have to disable bevy_svg tho ๐Ÿค”

buoyant marsh
#

I think it's running on 0.13 ๐Ÿ‘€

buoyant marsh
#

Got my UI working too so I guess it works fine ๐Ÿค”

quasi sun
#

good news. gonna check it in my game

whole edge
#

The new Bevy UI will eventually replace kayak but it's not complete yet.

dusty zodiac
#

In the hello world example [https://github.com/StarArawn/kayak_ui/blob/main/book/src/chapter_1.md], I'm getting an error if i change the font path to an /assets subdirectory e.g. font_mapping.set_default(asset_server.load("fonts/roboto.kttf")); . It works if I put the font directly into the assets folder. I am using Void's 0.13 branch. Error:
called `Result::unwrap()` on an `Err` value: AssetReaderError(NotFound("C:\\Users\\MyName\\Documents\\Bevy\\blender_workflow_test\\assets\\roboto.ttf"))

buoyant marsh
#

Did you change the path in the kttf file? (it's a json file iirc)

dusty zodiac
raw raven
#

does kayak_ui work with asset rsx files? it would be nice for modding support

whole edge
#

You'd need a scripting language to support this

raw raven
ripe fern
#

What if a font I want to use has ranges with spaces between them?

#
20-7e a0-107 10a-113 116-11b 11e-123 126-12b 12e-133 136-137 139-148 14a-14d 150-15b 15e-16b 16e-17e 181 186-18a 18e-194 196-199 19d 1a0-1a1 1a4-1a5 1a9 1ac-1b4 1b7 1c0-1c3 1cd-1df 1e6-1e7 1fe-1ff 218-21b 228-22b 241-244 24b-24c 250-276 278-27b 27d-27e 280-284 288-292 294-295 298-299 29b-29d 29f 2a1-2a2 2a4 2a7 2bc 2c6-2c7 2d8-2dd 309 31b 323 326 32d 331 3b2 3b8 3c0 3c7 401-40c 40e-44f 451-45c 45e-45f 462-463 472-475 490-4f9 4fc-4fd 510-513 51c-51d 524-527 1dc4-1dc7 1e04-1e05 1e0c-1e0f 1e12-1e13 1e24-1e25 1e2e-1e2f 1e36-1e37 1e3c-1e3f 1e44-1e47 1e4a-1e4d 1e50-1e53 1e62-1e63 1e6c-1e71 1e80-1e85 1e92-1e93 1ea0-1ef9 2013-2014 2018-201a 201c-201e 2020-2022 2026 2030 2039-203a 203d 2044 20ac 2122 2126 215b-215e 2202 2206 220f 2211-2212 2219-221a 221e 222b 2248 2260 2264-2265 25ca 2c64 2c6d 2c72-2c73 2e18 fb01-fb02```
buoyant marsh
#

I'd see what happens if you put in your desired range first (probably not all of the characters combined, since that would create a huge font atlas) ... Otherwise you'd need multiple fonts but I'm not sure if font fallbacks are even supported ๐Ÿค”

ripe fern
#

The problem would be with user input, I don't know what they'd want to write

buoyant marsh
#

If you were to configure 20 - 2e18 (skipping those last two characters) your texture would be a bit smaller than an 8k texture ... Assuming it will even generate the font when characters are missing

ripe fern
#

I see, for now I should go 20-7f, I guess

#

7f is not inclusive, though?

buoyant marsh
#

I also have it set to 20-7f and I don't see a blank space at the end so I guess it's not inclusive

ripe fern
#

Thanks!

ripe fern
#

I can't seem to get my intro text rendered, I don't know what I've done wrong at this point:

use bevy::prelude::*;
use kayak_ui::{
    prelude::{*, widgets::*},
    CameraUIKayak,
};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_plugins(KayakContextPlugin)
        .add_plugins(KayakWidgets)
        .add_systems(Startup, main_menu)
        .run()
}

fn main_menu (mut commands: Commands, mut font_mapping: ResMut<FontMapping>, asset_server: Res<AssetServer>) {
    let camera = commands
        .spawn(Camera2dBundle::default())
        .insert(CameraUIKayak)
        .id();

    let mut widget_context = KayakRootContext::new(camera);

    let parent_id = None;

    widget_context.add_plugin(KayakWidgetsContextPlugin);

    font_mapping.set_default(asset_server.load("roboto.kttf"));

    rsx! {
        <KayakAppBundle>
            <TextWidgetBundle
                text={TextProps {
                    content: "Hello World".into(),
                    size: 20.0,
                    ..Default::default()
                }}
            />
        </KayakAppBundle>
    };

    commands.spawn((widget_context, EventDispatcher::default()));
}```
#

Is the documentation targeted at Bevy 0.13 but 0.5 still no?

#

What was the original example?

buoyant marsh
#

Some of the documentation might be outdated yea ... The examples in the examples folder should all be up to date, it's what I've been using to check if my migration PRs worked ... Not seeing anything in specific that would explain why text doesn't show up ... Maybe it fails to load something, but it would probably throw a warning about that I think ๐Ÿค”

#

The examples folder variant of that one would be hello_world.rs

ripe fern
#

Thank you

rich ice
#

I just checked the repo - is kayak_ui abandoned? It seems to have last supported bevy 0.12 from 2 years ago