Files
armorpaint/paint/assets/plugins/hello_world.js
T

32 lines
774 B
JavaScript
Raw Normal View History

2018-02-28 09:53:15 +01:00
2024-04-02 15:45:49 +02:00
let plugin = plugin_create();
2018-04-18 21:35:36 +02:00
2024-09-03 15:52:05 +02:00
let h0 = ui_handle_create();
let h1 = ui_handle_create();
let h2 = ui_handle_create();
let h3 = ui_handle_create();
let h4 = ui_handle_create();
let h5 = ui_handle_create();
let h6 = ui_handle_create();
2018-04-18 21:35:36 +02:00
2024-08-07 22:48:08 +02:00
plugin_notify_on_ui(plugin, function() {
2024-09-03 15:52:05 +02:00
if (ui_panel(h0, "My Plugin")) {
ui_text("Label");
ui_text_input(h1, "Text Input");
if (ui_button("Button")) {
2024-08-07 22:48:08 +02:00
console_info("Hello");
2018-04-18 21:35:36 +02:00
}
2024-09-03 15:52:05 +02:00
ui_row([1 / 2, 1 / 2]);
ui_button("Button A");
ui_button("Button B");
ui_combo(h2, ["Item 1", "Item 2"], "Combo");
ui_row([1 / 2, 1 / 2]);
ui_slider(h3, "Slider", 0, 1, true);
ui_slider(h4, "Slider", 0, 1, true);
ui_check(h5, "Check");
ui_radio(h6, 0, "Radio 1");
ui_radio(h6, 1, "Radio 2");
ui_radio(h6, 2, "Radio 3");
2018-04-18 21:35:36 +02:00
}
2024-08-07 22:48:08 +02:00
});