[Example] Add example of Canvas Editor (#126)
* [Example] Add example of Canvas Editor * [Example] Adjust Canvas Editor example (#126) * [Example] Wrap examples to their own window * Tweaks Co-authored-by: SpaiR <klimbetoo@gmail.com>
This commit is contained in:
1 parent
5b0e867bfe
commit
3a494ba6a3
3 files changed
+165
-11
No files matched your search
@@ -6,6 +6,7 @@ import imgui.app.Application;
|
||||
import imgui.app.Configuration;
|
||||
import imgui.flag.ImGuiConfigFlags;
|
||||
import imgui.flag.ImGuiInputTextFlags;
|
||||
import imgui.flag.ImGuiWindowFlags;
|
||||
import imgui.type.ImString;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -70,18 +71,21 @@ public class Main extends Application {
|
||||
|
||||
@Override
|
||||
public void process() {
|
||||
ImGui.text("Hello, World! " + FontAwesomeIcons.Smile);
|
||||
if (ImGui.button(FontAwesomeIcons.Save + " Save")) {
|
||||
count++;
|
||||
if (ImGui.begin("Demo", ImGuiWindowFlags.AlwaysAutoResize)) {
|
||||
ImGui.text("Hello, World! " + FontAwesomeIcons.Smile);
|
||||
if (ImGui.button(FontAwesomeIcons.Save + " Save")) {
|
||||
count++;
|
||||
}
|
||||
ImGui.sameLine();
|
||||
ImGui.text(String.valueOf(count));
|
||||
ImGui.inputText("string", str, ImGuiInputTextFlags.CallbackResize);
|
||||
ImGui.text("Result: " + str.get());
|
||||
ImGui.sliderFloat("float", flt, 0, 1);
|
||||
ImGui.separator();
|
||||
ImGui.text("Extra");
|
||||
Extra.show(this);
|
||||
}
|
||||
ImGui.sameLine();
|
||||
ImGui.text(String.valueOf(count));
|
||||
ImGui.inputText("string", str, ImGuiInputTextFlags.CallbackResize);
|
||||
ImGui.text("Result: " + str.get());
|
||||
ImGui.sliderFloat("float", flt, 0, 1);
|
||||
ImGui.separator();
|
||||
ImGui.text("Extra");
|
||||
Extra.show(this);
|
||||
ImGui.end();
|
||||
}
|
||||
|
||||
private static byte[] loadFromResources(String name) {
|
||||
|
||||
Reference in new issue
Block a user