Icon

Widescreen Bars

Editllise

You must be logged in to obtain assets

Description

Widescreen Bars - is an extension, which will help you decorate annoying black bars in your game in a few clicks.

How to use:

1) Check, if screen is really wide enough:

isWidescreen = screen_check_wideness();

2) Let my script automatically setup your screen (will return viewWidth, which you will use later):

viewWidth = screen_auto_setup(gameWidth,gameHeight,viewId);
  • gameWidth - game view width
  • gameHeight - game view height
  • viewId - room view id

3) Get screen borders' coordinates via:

border = screen_get_borders(viewWidth,gameWidth,viewId,whichBorder)
  • viewWidth - width of the customized view
  • gameWidth - game view width
  • viewId - room view id
  • whichBorder - 0(left) / 1(right)

4) Draw bars in Post Draw Event, using borders' coordinates.

if (isWidescreen){
    // DRAW BORDERS
    draw_set_color(make_color_rgb(233,148,72))

    draw_rectangle(-1,0,leftBorder,window_get_height(),0)
    draw_rectangle(rightBorder,0,window_get_width(),window_get_height(),0)
}

In order to understand the principle of work, I advise you to look into the project or ask a question here ;)

End User Licence Agreement (EULA).

Age Rating: None

Version

GMS1 - Version 1.0.2. Published July 18, 2018

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait