Skip to content

Commit eba6584

Browse files
committed
Add fullscreen toggle to bottom right corner of workspace
1 parent 7422788 commit eba6584

File tree

6 files changed

+59
-0
lines changed

6 files changed

+59
-0
lines changed

scripts/control_draw/control_draw.gml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,21 @@ if (!fullscreen) {
851851
// the fifth parameters are totalrows & totalcols before rounding: ((rh - rhval) / 32), ((rw - 8) / 32)
852852
// this is so it stretches to fill the whole width/height of the screen instead of clipping to the note block area size
853853
}
854+
// Fullscreen button
855+
if (fullscreen) {
856+
xx = rw - sbv_anim
857+
yy = rh - 16
858+
} else {
859+
xx = x1 + totalcols * 32
860+
yy = y1 + totalrows * 32 + 34
861+
}
862+
if (theme = 0) draw_set_color(15790320)
863+
if (theme = 1) draw_set_color(13160660)
864+
if (theme = 2) draw_set_color(c_dark)
865+
draw_rectangle(xx, yy, xx + 16, yy + 16, false)
866+
if (draw_layericon(7 + fullscreen, xx, yy, condstr(!fullscreen, "Expand workspace", "Return"), 0, 0)) {
867+
fullscreen = !fullscreen
868+
}
854869

855870
// Draw layers
856871
for (b = 0; b < totalrows; b += 1) {
165 Bytes
Loading
166 Bytes
Loading
165 Bytes
Loading
166 Bytes
Loading

sprites/spr_layericons/spr_layericons.yy

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)