You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Game and Engine Version
Game: Black Myth: Wukong
Engine Version: 5.0
Describe the bug
Code
classWukong : publicCppUserModBase
{
private:int m_private_number{33};
std::shared_ptr<GUI::GUITab> m_less_safe_tab{};
bool show_demo_window = false;
public:Wukong() : CppUserModBase()
{
ModName = STR("Wukong");
ModVersion = STR("1.0");
ModDescription = STR("Gloss Trainer");
ModAuthors = STR("小莫");
register_tab(STR("Gloss Trainer"), [](CppUserModBase *instance)
{
// In this callback, you can start rendering the contents of your tab with ImGui. ImGui::Text("中文测试");
// You can access members of your mod class with the 'instance' param.auto mod = dynamic_cast<Wukong*>(instance);
if (!mod)
{
return;
}
if (mod->show_demo_window)
ImGui::ShowDemoWindow(&mod->show_demo_window);
ImGui::Checkbox("Demo Window", &mod->show_demo_window); // Edit bools storing our window open/close state// You can access both public and private members.
mod->render_some_stuff(mod->m_private_number); });
}
~Wukong() override {}
autoon_update() -> void override
{
}
autoon_unreal_init() -> void override
{
}
autoon_ui_init() -> void override
{
// It's critical that you enable ImGui if you intend to use ImGui within the context of UE4SS.// If you don't do this, a crash will occur as soon as ImGui tries to render anything, for example in your tab.UE4SS_ENABLE_IMGUI();
ImGuiIO &io = ImGui::GetIO();
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
io.Fonts->AddFontDefault();
io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\msyh.ttc", 14.0f, nullptr, io.Fonts->GetGlyphRangesChineseFull());
}
autorender_some_stuff(int Number) -> void
{
auto calculated_value = Number + 1;
ImGui::Text(std::format("calculated_value: {}", calculated_value).c_str());
}
};
Branch or Release
WukongUE4SS 1.2
Game and Engine Version
Game: Black Myth: Wukong
Engine Version: 5.0
Describe the bug
Code
Mod file
Wukong.zip
The text was updated successfully, but these errors were encountered: