-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
globalvar log; | ||
log = self; | ||
|
||
data = dsl_create(); | ||
|
||
visible = true; | ||
|
||
capacity = 8; | ||
added = 0; | ||
|
||
slot_w = 360; | ||
slot_h = 24; | ||
off = 4; | ||
height = 0; | ||
opacity = 0.85; | ||
|
||
|
||
add = function(str) | ||
{ | ||
if (added >= capacity) | ||
dsl_delete(data, 0); | ||
else | ||
{ | ||
added++; | ||
height = added * slot_h; | ||
} | ||
|
||
dsl_add(data, str); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
var sty = rh - off - height; | ||
|
||
for (var i=0; i<added; i++) | ||
{ | ||
draw_set_alpha(opacity); | ||
draw_set_color((even(i) ? cl_black : cl_black_light)); | ||
draw_rectangle(off, sty+slot_h*i, slot_w+off, sty+slot_h*(i+1), false); | ||
|
||
draw_set_alpha(1); | ||
draw_set_color(cl_white); | ||
draw_rectangle(off, sty+slot_h*i, slot_w+off, sty+slot_h*(i+1), true); | ||
|
||
draw_text(off*2, sty+slot_h*i, dsl(data, i)); | ||
} | ||
|
||
draw_reset(); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,38 @@ | ||
/// @desc Macros I use for shortening a bunch of GML variables. | ||
function macros_set() | ||
{ | ||
#macro g global | ||
/// @desc Macros I use for shortening a bunch of GML variables and functions. | ||
|
||
// Constants | ||
#macro NULL -1 | ||
#macro EMPTY "" | ||
|
||
|
||
// Variables | ||
#macro g global | ||
|
||
#macro rw room_width | ||
#macro rh room_height | ||
} | ||
#macro rw room_width | ||
#macro rh room_height | ||
|
||
#macro arg argument | ||
#macro argc argument_count | ||
|
||
|
||
// String Functions | ||
#macro str string | ||
|
||
// Keyboard | ||
#macro key keyboard_check | ||
#macro key_press keyboard_check_pressed | ||
#macro key_release keyboard_check_released | ||
|
||
// Mouse | ||
#macro mbutton mouse_check_button | ||
#macro mbutton_press mouse_check_button_pressed | ||
#macro mbutton_release mouse_check_button_released | ||
|
||
// DS Lists | ||
#macro dsl ds_list_find_value | ||
#macro dsl_create ds_list_create | ||
#macro dsl_add ds_list_add | ||
#macro dsl_delete ds_list_delete | ||
#macro dsl_size ds_list_size | ||
#macro dsl_value ds_list_find_value | ||
#macro dsl_index ds_list_find_index |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.