Skip to content

Commit

Permalink
feat(imgui): update tab handling, allow all items unfocused
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Aug 3, 2019
1 parent 4f9760d commit 1a63694
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/imgui/src/gui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { IToHiccup } from "@thi.ng/api";
import { setC2, Vec } from "@thi.ng/vectors";
import { GUITheme, IMGUIOpts, KeyModifier } from "./api";

const NONE = "__NONE__";

export class IMGUI implements IToHiccup {
width: number;
height: number;
Expand Down Expand Up @@ -119,8 +121,9 @@ export class IMGUI implements IToHiccup {
this.activeID = "";
} else {
if (this.activeID === "") {
this.activeID = "__NONE__";
this.focusID = this.lastID = "";
this.activeID = NONE;
this.focusID = NONE;
this.lastID = "";
}
}
if (this.key === "Tab") {
Expand Down

0 comments on commit 1a63694

Please sign in to comment.