Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This code causes ols to crash #296

Closed
sackboy19 opened this issue Jan 15, 2024 · 1 comment
Closed

This code causes ols to crash #296

sackboy19 opened this issue Jan 15, 2024 · 1 comment

Comments

@sackboy19
Copy link

package main
import "core:fmt"
import "core:math"

Animation :: struct {
	t, time_clicked, click_t: f32,
	is_click_animating:   bool,
	is_click_deanimating: bool,
	is_holding: bool,
}
animation_table := make(map[ID]^Animation, 32)


AnimatedButton :: proc(label: cstring, start_col: Vec4, hover_col: Vec4, click_col: Vec4, rounding: f32 = 12.0, padding: Vec2 = {20.0, 20.0}, size: Vec2 = {0.0, 0.0}) -> bool {
	elem := animation_table[id]
	none_color := math.lerp(start_col, hover_col, ease_out_cubic(elem.t))
	return ret
}

This code crashes my ols every time

@DanielGavin
Copy link
Owner

It doesn't crash on the new poly branch. I'll keep it open until it's merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants