0 Favourites

Turn off Caption in runtime

This forum is currently in read-only mode.
  • Hi

    Can I turn off the caption border in runtime? I've tryed find a way to do this but don't know how, is it possible?

    I want to disable it so I can make the game full screen if the player wants.. but also there is a window mode.

    I don't know why but if I resize the game window to the current resolution of the player's monitor with caption ON the Y size of the new game's window doesn't get fueled..

    example: the player's monitor resolution is 1440x900

    I add a action to make it fullscreen with the window object, the new window size was to be 1446x928 but no, it will be 1446x916 and without the border size it should be 1440x900 but is 1440x888... by desabling the caption at runtime I could fix it..

  • No, there is currently no way to do this unfortunately.

    But there is some good news. The next build of Construct 0.x has a new feature that will change the window size properly:

    [quote:1vmtaff4][ADD] Window: Three new actions (Set client width, Set client height, Set client size). These allow to set the window's dimensions based on the desired client's dimensions (e.g. 'set client size to (640, 480)' makes sure your desired game frame is 640x480 even if caption is selected, whereas 'set size to (640, 480)' is setting the outer boundaries of the window including caption bar and frame to 640x480, leaving less space for the game frame) (tulamide)

    I'm not sure when the next Construct build is being released, but it should be some time soon.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • K thanks ill wait for it..

    but I think the error will still continue after this new update, because change the client size isn't a problem in the current version, just need to do some simple calculations... the problem is when u want to make the client size fullscreen with the caption on, the Y axis is smaller than it should be..

  • Oh wait... you're manually resizing the window to fill the screen? Huh. I guess I don't see the point. Why not just use the Maximize action for the Window object? Or maybe I'm still missing the point of what you're trying to do

    Anyway, yes I suppose I see what you're saying about the Y axis being squished. The only real way around that I suppose is to create your own custom zooming algorithm that changes the Y zoom ratio, but it sounds like you're on the right track with that anyway.

  • By using Maximize action the client size won't go full, only the full window size.

    I want to simply make the client size fullscreen, not the window size, but the clientsize, but by doing this the Y size of the clientsize is a little smaller than what it should be.. why I don't know..

    you can test by yourself by making a test game, select window width and heigth in the application properties and change to your current resolution, also select the option to show more content in 'resizing'(not really necessary) and enable caption. Test the game and check the current Client size, it's not what you added in the properties, at last here is not.

    Add 1 text object and in events make always set text to: ClientWindow.Width&"x"&ClientWindow.Height

  • Right, yes. I did what you just said, and the result was as you say, the height is wrong.

    The original reply I made in this thread will fix that issue, because the Set Client Width and Height will ensure that the viewable area of the window is exactly the size you designate.

    As for toggling the caption and frame at runtime, no you still won't be able to do that, at least not yet.

  • Indeed, the size seems to be clamped somehow. On my 1920x1080-display I tried with 2400x1100 and got 1924x1058

    All windows are childs of the desktop, but I'm not sure what causes this. The height could be a clamp to (desktop height - taskbar height), but it's wild guessing. Also, why then 1924 for the width? It is also in the current window object for the next build. I will have a look at it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)