Pixel-Composer/objects/o_dialog_graph_grid/Create_0.gml

31 lines
939 B
Plaintext
Raw Normal View History

2022-09-21 06:09:40 +02:00
/// @description init
event_inherited();
#region data
2022-11-03 11:44:49 +01:00
dialog_w = ui(320);
2022-11-21 06:38:44 +01:00
dialog_h = ui(220);
2022-09-21 06:09:40 +02:00
destroy_on_click_out = true;
#endregion
#region data
cb_enable = new checkBox(function(str) {
2023-08-01 19:21:51 +02:00
if(PANEL_GRAPH.project == noone || !PANEL_GRAPH.project.active) return;
PANEL_GRAPH.project.graphGrid.snap = !PANEL_GRAPH.project.graphGrid.snap;
2022-09-21 06:09:40 +02:00
})
tb_size = new textBox(TEXTBOX_INPUT.number, function(str) {
2023-08-01 19:21:51 +02:00
if(PANEL_GRAPH.project == noone || !PANEL_GRAPH.project.active) return;
PANEL_GRAPH.project.graphGrid.size = max(1, real(str));
2022-09-21 06:09:40 +02:00
})
2022-11-01 03:06:03 +01:00
sl_opacity = new slider(0, 1, .05, function(str) {
2023-08-01 19:21:51 +02:00
if(PANEL_GRAPH.project == noone || !PANEL_GRAPH.project.active) return;
PANEL_GRAPH.project.graphGrid.opacity = clamp(real(str), 0, 1);
2022-11-01 03:06:03 +01:00
})
2022-11-21 06:38:44 +01:00
2023-02-28 09:43:01 +01:00
cl_color = new buttonColor(function(color) {
2023-08-01 19:21:51 +02:00
if(PANEL_GRAPH.project == noone || !PANEL_GRAPH.project.active) return;
PANEL_GRAPH.project.graphGrid.color = color;
2023-02-28 09:43:01 +01:00
}, self);
2022-09-21 06:09:40 +02:00
#endregion