2019-11-10 15:09:14 +10:30
|
|
|
extends "res://main.gd"
|
|
|
|
|
|
|
|
# Draw the bezel for radial gamemode
|
|
|
|
|
|
|
|
func _draw():
|
|
|
|
var bezel_color := Color.black
|
|
|
|
var bezel_colors := PoolColorArray([bezel_color])
|
|
|
|
var bezel_points: PoolVector2Array
|
|
|
|
|
|
|
|
draw_rect(Rect2(0, 0, x_margin, screen_height), bezel_color)
|
|
|
|
draw_rect(Rect2(1920-x_margin, 0, x_margin, screen_height), bezel_color)
|
|
|
|
|
2019-11-13 00:48:06 +10:30
|
|
|
bezel_points = arc_point_list(screen_center, screen_height/2, 0, -90)
|
2019-11-10 15:09:14 +10:30
|
|
|
bezel_points.push_back(Vector2(1920-x_margin, 0))
|
|
|
|
draw_polygon(bezel_points, bezel_colors)
|
|
|
|
|
2019-11-13 00:48:06 +10:30
|
|
|
bezel_points = arc_point_list(screen_center, screen_height/2, -90, -180)
|
2019-11-10 15:09:14 +10:30
|
|
|
bezel_points.push_back(Vector2(x_margin, 0))
|
|
|
|
draw_polygon(bezel_points, bezel_colors)
|
|
|
|
|
2019-11-13 00:48:06 +10:30
|
|
|
bezel_points = arc_point_list(screen_center, screen_height/2, -180, -270)
|
2019-11-10 15:09:14 +10:30
|
|
|
bezel_points.push_back(Vector2(x_margin, screen_height))
|
|
|
|
draw_polygon(bezel_points, bezel_colors)
|
|
|
|
|
2019-11-13 00:48:06 +10:30
|
|
|
bezel_points = arc_point_list(screen_center, screen_height/2, -270, -360)
|
2019-11-10 15:09:14 +10:30
|
|
|
bezel_points.push_back(Vector2(1920-x_margin, screen_height))
|
|
|
|
draw_polygon(bezel_points, bezel_colors)
|