update dependencies, minor change to scrolling speed

This commit is contained in:
Matthew 2025-11-15 19:48:09 +11:00
parent 4cdeb65122
commit 82cb3cb357
7 changed files with 24 additions and 24 deletions

Binary file not shown.

Binary file not shown.

View File

@ -13,7 +13,7 @@
"sourcePaths": ["src/editor", "src/dlib", "src/dlib/external/xxhash", "src/VulkanRenderer"],
"libs-linux": ["xcb", "X11", "X11-xcb", "vulkan", "stdc++", "xcb-xfixes", "freetype"],
"libs-windows": [],
"versions": [],
"versions": ["VULKAN_DEBUG"],
"preGenerateCommands-linux": ["./build.sh"],
"preGenerateCommands-windows": [],
"dflags": ["-Xcc=-mno-sse", "-P-I/usr/include/freetype2", "-Jbuild", "-Jassets", "-link-debuglib"],

@ -1 +1 @@
Subproject commit 614ee40d853d65818fd04e41372e0ae492c8d988
Subproject commit c42238a456f5048c7d1b2d5ebd71ecf13bb10ece

@ -1 +1 @@
Subproject commit c83ffabce69071a3e7a0af3f26aa420082eeda1f
Subproject commit 10b5c0a127ef5fd5a18b956d2d112cae75017150

View File

@ -136,7 +136,8 @@ struct UICtx
PlatformWindow* window;
Renderer rd;
ImageView font_atlas;
Descriptor font_atlas;
Descriptor sampler;
Pipeline pipeline;
DescSetLayout desc_set_layout;
DescSet desc_set;
@ -428,7 +429,7 @@ EaseOutQuint(f32 x)
void
SetScrollOffset(UIPanel* panel)
{
f32 scroll_speed = 0.8 * (g_delta * 60.0);
f32 scroll_speed = 5.0;
U64Vec2 pos = VecPos(&panel.ed.buf);
@ -451,7 +452,7 @@ SetScrollOffset(UIPanel* panel)
if(panel.scroll_offset != panel.scroll_target)
{
panel.scroll_offset += (scroll_speed * (panel.scroll_target - panel.scroll_offset)) * (g_delta * 60.0);
panel.scroll_offset += (scroll_speed * (panel.scroll_target - panel.scroll_offset)) * (g_delta * 2.0);
if(fabsf(panel.scroll_offset-panel.scroll_target) < 0.0009)
{
@ -529,10 +530,6 @@ Panel(UIPanel* panel)
DrawPanel(panel, lc_w, focused);
f32 y_rem = fmod(panel.scroll_offset, TEXT_SIZE);
if(y_rem != 0.0)
{
Logf("rem %f ln %s", y_rem, panel.start_ln);
}
f32 x = panel.rect.x0;
f32 y = panel.rect.y0 + TEXT_SIZE - fmod(panel.scroll_offset, TEXT_SIZE);
@ -776,7 +773,7 @@ InitUICtx(PlatformWindow* window)
DescLayoutBinding[2] layout_bindings = [
{ binding: 0, descriptorType: DT.Image, descriptorCount: 1, stageFlags: SS.All },
{ binding: 1, descriptorType: DT.Storage, descriptorCount: 1, stageFlags: SS.All },
{ binding: 1, descriptorType: DT.Sampler, descriptorCount: 1, stageFlags: SS.All },
];
ctx.desc_set_layout = CreateDescSetLayout(&ctx.rd, layout_bindings);
@ -819,7 +816,10 @@ InitUICtx(PlatformWindow* window)
CreateImageView(&ctx.rd, &ctx.font_atlas, ctx.atlas_buf.atlas.width, ctx.atlas_buf.atlas.height, 4, ctx.atlas_buf.data);
Write(&ctx.rd, ctx.desc_set, &ctx.font_atlas, 0, DT.Image);
ctx.sampler = CreateSampler(&ctx.rd, MipmapMode.Nearest);
ctx.sampler.binding = 1;
Write(&ctx.rd, ctx.desc_set, [ctx.font_atlas, ctx.sampler]);
SetClearColors(&ctx.rd, [0.0, 0.0, 0.0, 1.0], [0.0, 0.0, 0.0, 0.0]);

View File

@ -1,9 +1,9 @@
layout (rgba16f, set = 0, binding = 0) uniform image2D DrawImage;
layout (set = 0, binding = 1) uniform sampler SamplerNearest;
layout (set = 1, binding = 0) uniform texture2D SpriteAtlas;
layout (set = 1, binding = 1) uniform sampler SamplerNearest;
layout (push_constant) uniform Constants {
mat4 projection;
} PC;