You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
145 lines
5.0 KiB
145 lines
5.0 KiB
<!--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>-99</depth>
|
|
<persistent>0</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>// yes this is a copy of oEditrButton no i didn't use a parent why are you asking?
|
|
/* be sure to set these variables manually in a with or something or else
|
|
this won't work.. and we sure don't need more spaghetti like THAT
|
|
button_width = 40; divides this number by 2 in draw
|
|
button_height = 10; also divides this by 2 in draw
|
|
button_x = 0; uses this to link to oEditorTab properly (0 = middle)
|
|
button_y = 0; uses this to link to oEditorTab properly (0 = top)
|
|
button_flag = -1; determines what oEditorTab will recieve and likewise send to oTrialEditor
|
|
button_string = "String"; says a funny
|
|
button_sprite = -1; shows a funny (only if button_string isn't filled)
|
|
button_border = c_white; button border color. amazing
|
|
below are included vars. don't bother setting them yourself*/
|
|
button_alpha = 1; // rises in value initially for a nice little fade in effect
|
|
button_highlight = 0;
|
|
</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>// highlight code
|
|
if (mouse_x > x-(button_width/2) && mouse_x < x+(button_width/2) && mouse_y > y-(button_height/2) && mouse_y < y+(button_height/2) && oEditorInfo.type_mode == -1){ // still ew, but... no, no "buts." this is ew.
|
|
button_highlight = 1;
|
|
if (mouse_check_button_pressed(mb_left)){
|
|
oEditorInfo.relay_button = button_flag;
|
|
sfx_play(sndMenuSel);
|
|
}
|
|
}else{
|
|
button_highlight = 0;
|
|
}
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="8" enumb="73">
|
|
<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>// move x/y
|
|
x = oEditorInfo.x+button_x;
|
|
y = oEditorInfo.y+button_y;
|
|
|
|
// everything is drawn from the center
|
|
var round_x = round(x);
|
|
var round_y = round(y);
|
|
draw_set_color(button_border);
|
|
// the contents
|
|
// the box
|
|
draw_set_alpha(1);
|
|
draw_rectangle(round_x-(button_width/2),round_y-(button_height/2),round_x+(button_width/2),round_y+(button_height/2),true);
|
|
// the contents
|
|
if (button_string == ""){ // sprite
|
|
var sw = sprite_get_width(button_sprite);
|
|
var sh = sprite_get_height(button_sprite);
|
|
draw_sprite_part(button_sprite,0,0,0,sw,sh,(0-(sw/2))+round_x,(0-(sh/2))+round_y); // this is a really dumb way of forcing the sprite to the middle
|
|
}else{ // string
|
|
draw_set_font(fontMenuTinyDefault);
|
|
draw_set_color(c_white);
|
|
draw_set_halign(fa_center);
|
|
draw_set_valign(fa_center);
|
|
draw_text(round_x+1,round_y-1,button_string);
|
|
}
|
|
// box hlight
|
|
if (button_highlight){
|
|
draw_set_alpha(0.3);
|
|
draw_set_color(button_border);
|
|
draw_rectangle(round_x-(button_width/2),round_y-(button_height/2),round_x+(button_width/2),round_y+(button_height/2),false);
|
|
}
|
|
</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>
|