FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
imgui-java/example/src/main/java/ExampleImGuiMemoryEditor.java at main · SpaiR/imgui-java · GitHub
SpaiR
/
imgui-java
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
153
Star
817
Code
Issues
40
Pull requests
12
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
imgui-java
/
example
/
src
/
main
/
java
/
ExampleImGuiMemoryEditor.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
48 lines (42 loc) · 1.8 KB
Breadcrumbs
imgui-java
/
example
/
src
/
main
/
java
/
ExampleImGuiMemoryEditor.java
Copy path
File metadata and controls
48 lines (42 loc) · 1.8 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import
imgui
.
extension
.
memedit
.
MemoryEditor
;
import
imgui
.
flag
.
ImGuiCond
;
import
imgui
.
internal
.
ImGui
;
import
imgui
.
type
.
ImBoolean
;
import
org
.
lwjgl
.
system
.
MemoryUtil
;
import
java
.
awt
.*;
import
java
.
net
.
URI
;
import
java
.
nio
.
ByteBuffer
;
public
class
ExampleImGuiMemoryEditor
{
private
static
final
String
URL
=
"https://github.com/ocornut/imgui_club"
;
private
static
ByteBuffer
demoData
;
private
static
MemoryEditor
memoryEditor
;
private
static
ImBoolean
showingMemoryEditor
=
new
ImBoolean
(
false
);
static
{
demoData
=
MemoryUtil
.
memASCII
(
"Welcome to the demo for Dear ImGui Memory Editor."
+
"
\n
The git repo is located at "
+
URL
+
"."
+
"You can use this memory editor to view the raw memory values at some pointer location."
);
memoryEditor
=
new
MemoryEditor
();
}
public
static
void
show
(
ImBoolean
showImGuiMemoryEditor
) {
ImGui
.
setNextWindowSize
(
400
,
200
,
ImGuiCond
.
Once
);
ImGui
.
setNextWindowPos
(
ImGui
.
getMainViewport
().
getPosX
() +
100
,
ImGui
.
getMainViewport
().
getPosY
() +
100
,
ImGuiCond
.
Once
);
if
(
ImGui
.
begin
(
"ImGuiMemoryEditor Demo"
,
showImGuiMemoryEditor
)) {
ImGui
.
text
(
"This a demo for ImGui MemoryEditor"
);
ImGui
.
alignTextToFramePadding
();
ImGui
.
text
(
"Repo:"
);
ImGui
.
sameLine
();
if
(
ImGui
.
button
(
URL
)) {
try
{
Desktop
.
getDesktop
().
browse
(
new
URI
(
URL
));
}
catch
(
Exception
e
) {
e
.
printStackTrace
();
}
}
ImGui
.
checkbox
(
"Memory Editor"
,
showingMemoryEditor
);
if
(
showingMemoryEditor
.
get
()) {
memoryEditor
.
drawWindow
(
"Example Data"
,
MemoryUtil
.
memAddress
(
demoData
),
demoData
.
capacity
());
}
}
ImGui
.
end
();
}
}
Back
|
FazBrowse Home
|
New Git URL