EasterEgg Insert vimix logo source

This commit is contained in:
Bruno Herbelin
2024-01-13 00:15:59 +01:00
parent f8b5b1db9c
commit e36bae2ab6
3 changed files with 70 additions and 2 deletions

View File

@@ -640,6 +640,7 @@ set(VMIX_RSC_FILES
./rsc/shaders/filters/earlybird.glsl
./rsc/shaders/filters/logo.glsl
./rsc/shaders/filters/whitebalance.glsl
./rsc/images/logo.vmx
)
cmrc_add_resource_library(vmix-resources ALIAS vmix::rc NAMESPACE vmix WHENCE rsc ${VMIX_RSC_FILES})

57
rsc/images/logo.vmx Normal file

File diff suppressed because one or more lines are too long

View File

@@ -5804,8 +5804,18 @@ void Navigator::RenderMainPannel(const ImVec2 &iconsize)
// Logo (if enougth room)
if (remaining_height > icon_height + button_height + g.Style.ItemSpacing.y) {
static unsigned int vimixicon = Resource::getTextureImage("images/vimix_256x256.png");
ImGui::SetCursorScreenPos( rightcorner - ImVec2( (icon_height + pannel_width_) * 0.5f, icon_height + button_height + g.Style.ItemSpacing.y) );
ImGui::Image((void*)(intptr_t)vimixicon, ImVec2(icon_height, icon_height));
const ImVec2 draw_pos = rightcorner
- ImVec2((icon_height + pannel_width_) * 0.5f,
icon_height + button_height + g.Style.ItemSpacing.y);
ImGui::SetCursorScreenPos(draw_pos);
ImGui::Image((void *) (intptr_t) vimixicon, ImVec2(icon_height, icon_height));
// Hidden action: add a source with vimix logo if double clic on vimix logo
const ImRect bb(draw_pos, draw_pos + ImVec2(icon_height, icon_height));
const ImGuiID id = ImGui::GetCurrentWindow()->GetID("##easteregg");
bool hovered, held;
if (ImGui::ButtonBehavior(bb, id, &hovered, &held, ImGuiButtonFlags_PressedOnDoubleClick) )
Mixer::manager().paste( Resource::getText("images/logo.vmx") );
index_label = 1;
}
// Button About