MCPcopy Index your code
hub / github.com/SpaiR/imgui-java / show

Method show

example/src/main/java/ExampleDragAndDrop.java:21–59  ·  view source on GitHub ↗
(final ImBoolean showDragNDropWindow)

Source from the content-addressed store, hash-verified

19 private static String data = "No Data...";
20
21 public static void show(final ImBoolean showDragNDropWindow) {
22 if (ImGui.begin("Drag'N'Drop Demo", showDragNDropWindow, ImGuiWindowFlags.AlwaysAutoResize)) {
23 ImGui.text("Drag from here:");
24
25 ImGui.inputText("String payload", STRING_PAYLOAD.input, ImGuiInputTextFlags.CallbackResize);
26 setupPayload(STRING_PAYLOAD);
27
28 ImGui.inputInt("Integer payload", INTEGER_PAYLOAD.input);
29 setupPayload(INTEGER_PAYLOAD);
30
31 ImGui.button("Class specific payload");
32 setupClassSpecificPayload();
33
34 ImGui.separator();
35
36 ImGui.text("Drop here any:");
37 ImGui.pushID("any");
38 ImGui.button(data, 100, 50);
39 setupTarget();
40 ImGui.popID();
41
42 ImGui.separator();
43
44 ImGui.text("Drop here string payload only");
45 ImGui.pushID("string");
46 ImGui.button(data, 100, 50);
47 setupStringPayloadTarget();
48 ImGui.popID();
49
50 ImGui.separator();
51
52 ImGui.text("Drop here class specific payload only");
53 ImGui.pushID("class");
54 ImGui.button(data, 100, 50);
55 setupClassSpecificPayloadTarget();
56 ImGui.popID();
57 }
58 ImGui.end();
59 }
60
61 private static void setupPayload(final Payload<?> payload) {
62 if (ImGui.beginDragDropSource(ImGuiDragDropFlags.SourceAllowNullID)) {

Callers 1

showMethod · 0.95

Calls 14

beginMethod · 0.95
textMethod · 0.95
inputTextMethod · 0.95
setupPayloadMethod · 0.95
inputIntMethod · 0.95
buttonMethod · 0.95
separatorMethod · 0.95
pushIDMethod · 0.95
setupTargetMethod · 0.95
popIDMethod · 0.95

Tested by

no test coverage detected