-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
65 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,4 @@ | |
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export * from "./src/type.ts"; | ||
export * from "./src/enum.ts"; | ||
export * from "./src/call.ts"; | ||
export * from "./src/mod.ts"; | ||
export * from "./src/demo.ts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const DIMGUI_VERSION = "0.1.1"; | ||
export const DIMGUI_VERSION = "0.2.0"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export * from "./type.ts"; | ||
export * from "./enum.ts"; | ||
export * from "./call.ts"; | ||
export * from "./imgui_font_atlas.ts"; | ||
export * from "./imgui_input_text_callback_data.ts"; | ||
export * from "./imgui_io.ts"; | ||
export * from "./imgui_style.ts"; | ||
export * from "./callback.ts"; | ||
export { cString, jsString, type StringSource } from "./ffi.ts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,18 +7,15 @@ import { | |
} from "https://deno.land/x/[email protected]/mod.ts"; | ||
import * as gl from "https://deno.land/x/[email protected]/api/gles23.2.ts"; | ||
import * as imgui from "../mod.ts"; | ||
import { Bool, ImGuiConfigFlagBits } from "../mod.ts"; | ||
import { showDemoWindowWidgets } from "./test_demo.ts"; | ||
import { Bool, ImGuiConfigFlagBits, showWidgetDemoWindow } from "../mod.ts"; | ||
|
||
function queryWindowSizeAndFontSize() { | ||
const aspectRatio = 16 / 9; | ||
const lines = 40; | ||
|
||
const monitor = getPrimaryMonitor(); | ||
const height = Math.ceil(monitor.workArea.height * 0.7); | ||
const width = Math.ceil(height * aspectRatio); | ||
const fontSize = Math.min(32, Math.ceil(height / lines)); | ||
|
||
return { width, height, fontSize }; | ||
} | ||
const windowInfo = queryWindowSizeAndFontSize(); | ||
|
@@ -28,7 +25,6 @@ const window = createWindow({ | |
title: "IMGUI DWM", | ||
width: windowInfo.width, | ||
height: windowInfo.height, | ||
|
||
resizable: true, | ||
glVersion: "v3.2", | ||
gles: false, | ||
|
@@ -98,7 +94,7 @@ await mainloop(() => { | |
imgui.implGlfwNewFrame(); | ||
imgui.newFrame(); | ||
showControllWindow(); | ||
showDemoWindowWidgets(); | ||
showWidgetDemoWindow(); | ||
imgui.render(); | ||
const drawData = imgui.getDrawData(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters