chore: Add ImGui::NewFrame() to TestEditor::Update()
This commit is contained in:
@@ -9,6 +9,7 @@ namespace yaze_test {
|
|||||||
namespace integration {
|
namespace integration {
|
||||||
|
|
||||||
absl::Status TestEditor::Update() {
|
absl::Status TestEditor::Update() {
|
||||||
|
ImGui::NewFrame();
|
||||||
if (ImGui::Begin("My Window")) {
|
if (ImGui::Begin("My Window")) {
|
||||||
ImGui::Text("Hello, world!");
|
ImGui::Text("Hello, world!");
|
||||||
ImGui::Button("My Button");
|
ImGui::Button("My Button");
|
||||||
@@ -24,14 +25,12 @@ absl::Status TestEditor::Update() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TestEditor::RegisterTests(ImGuiTestEngine* engine) {
|
void TestEditor::RegisterTests(ImGuiTestEngine* engine) {
|
||||||
|
engine_ = engine;
|
||||||
ImGuiTest* test = IM_REGISTER_TEST(engine, "demo_test", "test1");
|
ImGuiTest* test = IM_REGISTER_TEST(engine, "demo_test", "test1");
|
||||||
test->TestFunc = [](ImGuiTestContext* ctx) {
|
test->TestFunc = [](ImGuiTestContext* ctx) {
|
||||||
ctx->SetRef("My Window");
|
ctx->SetRef("My Window");
|
||||||
ctx->ItemClick("My Button");
|
ctx->ItemClick("My Button");
|
||||||
ctx->ItemCheck("Node/Checkbox");
|
ctx->ItemCheck("Node/Checkbox");
|
||||||
ctx->ItemInputValue("Slider", 123);
|
|
||||||
|
|
||||||
ctx->MenuCheck("//Dear ImGui Demo/Tools/About Dear ImGui");
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user