This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// collision::Mask m = collision::Mask::JumpThrough | collision::Mask::Solid; | |
// | |
// if ( (m & collision::Mask::Solid) != 0) | |
// { | |
// .... | |
// } | |
// | |
namespace collision |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ImGuiUtils | |
{ | |
static bool EnumSelector<T>(string name, int idOffset, ref T selection) | |
{ | |
bool change = false; | |
int idx = idOffset; | |
var enumType = typeof(T); | |
if (ImGui.BeginCombo(name, Enum.GetName(enumType, selection))) | |
{ | |
var enumValues = Enum.GetValues(enumType); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
pxl::Action<int, int, bool> a; | |
a += [](int p0, int p1, bool p3) | |
{ | |
}; | |
auto id = a.bind([](int p0, int p1, bool p3) | |
{ |