diff --git a/display.go b/display.go index 61925db..927d9e7 100644 --- a/display.go +++ b/display.go @@ -115,8 +115,20 @@ func (d *Display) SetAsTarget() { C.al_set_target_backbuffer(d.display) } -func (d *Display) SetIcon(i *Bitmap) { - C.al_set_display_icon(d.display, i.bitmap) +func (d *Display) SetIcon(i ...*Bitmap) { + if len(i) == 0 { + return + } + if len(i) == 1 { + C.al_set_display_icon(d.display, i[0].bitmap) + return + } + + icons := make([]*C.ALLEGRO_BITMAP, len(i)) + for j := range icons { + icons[j] = i[j].bitmap + } + C.al_set_display_icons(d.display, C.int(len(icons)), &(icons[0])) } func (d *Display) SetMouseCursor(c MouseCursor) {