1. Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice
  2. NOTICE: We will be applying a Xenforo update on Tuesday 25th of February. This means that from approximately 10:00 to 14:00 BST the forums will be offline (or possibly longer). Sorry for the inconvenience! Official Announcement here.

GMS 2 Surfaces

Discussion in 'Programming' started by Daniel Mallett, Feb 12, 2020.

  1. Daniel Mallett

    Daniel Mallett Member

    Joined:
    Aug 24, 2017
    Posts:
    183
    I am in the process of migrating some of my code from the application surface to 'an actual' surface. I have had no problems up until now.

    I want to resize my surface using the surface resize function. After doing this I get the width with the get surface width function and it reports correctly but does not reflect this on screen.

    Do I need to reset the surface, draw it again? I have this with no luck.

    Thanks guys.

    Update: I have fixed / fudged this possibly. I am now resizing within the surface draw as part of the routine based on variables. Not happy with this solution though.
     
    Last edited: Feb 12, 2020
  2. Simon Gust

    Simon Gust Member

    Joined:
    Nov 15, 2016
    Posts:
    3,266
    What do you want to do exactly?
    If you resize a Surface, it may get freed and you'd Need to recreate it.
     
  3. Daniel Mallett

    Daniel Mallett Member

    Joined:
    Aug 24, 2017
    Posts:
    183
    I'm drawing a grid to the surface when the grid is resized so is the surface.
     
  4. SilentxxBunny

    SilentxxBunny Epsilon

    Joined:
    Jun 21, 2016
    Posts:
    156
    I'm having the same problem. We are in literally, exactly, the same situation. With that being said - I can't help you, but I'll be refreshing this page every half hour or so. :squirrel:
     
  5. Simon Gust

    Simon Gust Member

    Joined:
    Nov 15, 2016
    Posts:
    3,266
    Can you two show your code?
    There are a lot of ways to draw a grid.
     
  6. Daniel Mallett

    Daniel Mallett Member

    Joined:
    Aug 24, 2017
    Posts:
    183

Share This Page