Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@Selyatin
Copy link

I simply used comptime to allow passing of either the GuiIconName enum directly, or an integer.

@Not-Nik
Copy link
Member

Not-Nik commented Jan 3, 2025

I reckon we don't need the integer thing at all right? Having the enum would be enough?

@ve-nt
Copy link
Contributor

ve-nt commented Jan 10, 2025

I know this isn't all that relevant but your icon code could be greatly simplified to this:

    const icon: c_int = switch (@TypeOf(iconId)) {
        GuiIconName => @intCast(@intFromEnum(iconId)),
        else => @intCast(iconId),
    };

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

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.