TASEmulators / TASEmulators/BizHawk

`gui.DrawNew(..., false)` straight up doesn't work

Open
#2,501 3 comments 0 reactions 1 assignee View on GitHub

@zeromus is already working on this.

Since Dec 1, 2022.

re: Lua API/scripting Repro: Affects 2.3/2.3.1/2.3.2 Repro: Affects 2.5.2 Repro: Affects 2.6
Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

Update: gui.DrawNew was deprecated as part of a large refactor in 2.6, clear is now hardcoded to true in GuiApi

Script:

x = 0;
while true do
	if (x == 100) then
		gui.DrawNew("native", false);
		console.writeline("first drawText call");
		gui.drawText(16, 24, "first string");
		gui.DrawFinish();
	elseif (x == 200) then
		gui.DrawNew("native", false);
		console.writeline("second drawText call");
		gui.drawText(16, 40, "second string");
		gui.DrawFinish();
	end
	x = x + 1;
	emu.frameadvance();
end

I expect to see "first string" appear after 100 frames, then after another 100 frames, see "second string" appear beneath it. In actuality, when "second string" appears, "first string" disappears.

I didn't try ApiHawk but as the gui lib is delegated it should be the same.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.