Initial commit
This commit is contained in:
commit
d8ee2aa096
7 changed files with 941 additions and 0 deletions
223
add after objDebugList/objDebugInspectorControl.object.gmx
Normal file
223
add after objDebugList/objDebugInspectorControl.object.gmx
Normal file
|
|
@ -0,0 +1,223 @@
|
|||
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
||||
<object>
|
||||
<spriteName><undefined></spriteName>
|
||||
<solid>0</solid>
|
||||
<visible>-1</visible>
|
||||
<depth>0</depth>
|
||||
<persistent>-1</persistent>
|
||||
<parentName><undefined></parentName>
|
||||
<maskName><undefined></maskName>
|
||||
<events>
|
||||
<event eventtype="0" enumb="0">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>selection = ds_list_create();
|
||||
selection_instance = noone;
|
||||
inspector_instance = noone;
|
||||
search_instance = noone;
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="1" enumb="0">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>if (instance_exists(selection_instance))
|
||||
instance_destroy(selection_instance);
|
||||
if (instance_exists(inspector_instance))
|
||||
instance_destroy(inspector_instance);
|
||||
if (instance_exists(search_instance))
|
||||
instance_destroy(search_instance);
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="3" enumb="0">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>var _debug_key_held = true;
|
||||
if (global.__synthasmagoria_debug_inspector_debug_key != -1) {
|
||||
_debug_key_held = keyboard_check(global.__synthasmagoria_debug_inspector_debug_key);
|
||||
}
|
||||
|
||||
if (_debug_key_held && mouse_check_button_pressed(mb_left)) {
|
||||
if (instance_exists(selection_instance) || instance_exists(inspector_instance) || instance_exists(search_instance)) {
|
||||
// nothing
|
||||
} else {
|
||||
ds_list_clear(selection);
|
||||
var _inst;
|
||||
with (all) {
|
||||
_inst = collision_point(mouse_x, mouse_y, id, true, false);
|
||||
if (_inst != noone) {
|
||||
ds_list_add(other.selection, _inst);
|
||||
}
|
||||
}
|
||||
var _selection_number = ds_list_size(selection);
|
||||
if (_selection_number > 1) {
|
||||
var _selection = array_create(_selection_number);
|
||||
var _instances = array_create(_selection_number);
|
||||
for (var i = 0; i < _selection_number; i++) {
|
||||
_selection[i] = object_get_name(selection[|i].object_index) + " - inst_" + string(selection[|i]);
|
||||
_instances[i] = selection[|i];
|
||||
}
|
||||
selection_instance = instance_create(mouse_x - view_xview[0], mouse_y - view_yview[0], objDebugInspectorInstanceList);
|
||||
with (selection_instance) {
|
||||
instances = _instances;
|
||||
header = "Instances";
|
||||
items = _selection;
|
||||
selection_callback_instance = other.id;
|
||||
selection_callback_user_event = 0;
|
||||
event_user(0);
|
||||
}
|
||||
} else if (_selection_number == 1) {
|
||||
inspector_instance = instance_create(0, 0, objDebugInspector);
|
||||
with (inspector_instance) {
|
||||
target = other.selection[|0];
|
||||
event_user(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_debug_key_held && mouse_check_button_pressed(mb_middle)) {
|
||||
if (instance_exists(search_instance)) {
|
||||
// nothing
|
||||
} else {
|
||||
if (instance_exists(selection_instance))
|
||||
instance_destroy(selection_instance);
|
||||
if (instance_exists(inspector_instance))
|
||||
instance_destroy(inspector_instance);
|
||||
search_instance = instance_create(4, 4, objDebugAllInstancesList);
|
||||
with (search_instance) {
|
||||
selection_callback_instance = other.id;
|
||||
selection_callback_user_event = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="7" enumb="11">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>/// all instances list selection callback
|
||||
var _selected_instance = search_instance.instances[search_instance.item_highlight_index];
|
||||
if (instance_exists(_selected_instance)) {
|
||||
inspector_instance = instance_create(0, 0, objDebugInspector);
|
||||
with (inspector_instance) {
|
||||
target = _selected_instance;
|
||||
event_user(0);
|
||||
}
|
||||
}
|
||||
instance_destroy(search_instance);
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="7" enumb="10">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>/// instance list selection callback
|
||||
var _selected_instance = selection[|selection_instance.item_highlight_index];
|
||||
if (instance_exists(_selected_instance)) {
|
||||
inspector_instance = instance_create(0, 0, objDebugInspector);
|
||||
with (inspector_instance) {
|
||||
target = _selected_instance;
|
||||
event_user(0);
|
||||
}
|
||||
}
|
||||
instance_destroy(selection_instance);
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
</events>
|
||||
<PhysicsObject>0</PhysicsObject>
|
||||
<PhysicsObjectSensor>0</PhysicsObjectSensor>
|
||||
<PhysicsObjectShape>0</PhysicsObjectShape>
|
||||
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
|
||||
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
|
||||
<PhysicsObjectGroup>0</PhysicsObjectGroup>
|
||||
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
|
||||
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
|
||||
<PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
|
||||
<PhysicsObjectAwake>-1</PhysicsObjectAwake>
|
||||
<PhysicsObjectKinematic>0</PhysicsObjectKinematic>
|
||||
<PhysicsShapePoints/>
|
||||
</object>
|
||||
Loading…
Add table
Add a link
Reference in a new issue