MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / AS_ImGui_ImageButton

Function AS_ImGui_ImageButton

Source/Scripting/angelscript/asfuncs.cpp:3864–3876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3862}
3863
3864bool AS_ImGui_ImageButton(const TextureAssetRef& user_texture_ref, const vec2& size, const vec2& uv0, const vec2& uv1, int frame_padding, const vec4& background_color, const vec4& tint_color) {
3865 if (user_texture_ref.valid()) {
3866 ImVec2 size_temp(size[0], size[1]);
3867 ImVec2 uv0_temp(uv0[0], uv0[1]);
3868 ImVec2 uv1_temp(uv1[0], uv1[1]);
3869 ImVec4 background_color_temp(background_color[0], background_color[1], background_color[2], background_color[3]);
3870 ImVec4 tint_color_temp(tint_color[0], tint_color[1], tint_color[2], tint_color[3]);
3871 Textures::Instance()->EnsureInVRAM(user_texture_ref);
3872 return ImGui::ImageButton(reinterpret_cast<ImTextureID>(Textures::Instance()->returnTexture(user_texture_ref)), size_temp, uv0_temp, uv1_temp, frame_padding, background_color_temp, tint_color_temp);
3873 }
3874
3875 return false;
3876}
3877
3878bool AS_ImGui_Checkbox(const std::string& label, bool& value) {
3879 return ImGui::Checkbox(label.c_str(), &value);

Callers

nothing calls this directly

Calls 3

EnsureInVRAMMethod · 0.80
returnTextureMethod · 0.80
validMethod · 0.45

Tested by

no test coverage detected