Jump to content

Wrong Window Dimensions with WINDOW_DEFAULT/WINDOW_CLIENTCOORDS


reepblue
 Share

Go to solution Solved by Josh,

Recommended Posts

The last update broke my app. I'm forced to use WINDOW_TITLEBAR for my UI application for the time being. I bet this relates to you improving the scaling with the editor. It breaks with 100% scaling. 

This example should reproduce the error as falling back WINDOW_TITLEBAR  "fixed" it.  

#include "UltraEngine.h"
using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    //Get the display
    auto displays = GetDisplays();
    Vec2 displayscale = displays[0]->GetScale();

    //Create a window
    auto window = CreateWindow("Example", 0, 0, 600 * displayscale.x, 600 * displayscale.y, displays[0], WINDOW_DEFAULT);

    //Main loop
    while (window->Closed() == false)
    {
        if (window->KeyDown(KEY_ESCAPE)) break;
    }
    return 0;
}

 

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

That does look a lot better as the window stretched above my monitor height. I can't say "it's exactly how it was before" without trying it on my machine with my app. 

The window does look bigger than expected in that screenshot, but it could be a few things going on.

Thanks for the quick response. 🙂

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

1 hour ago, Josh said:

I'm using 125% scaling, so everything looks 25% bigger when I post a screenshot.

Ok, should be good then. Couldn't tell if you scaled the dpi down to test it or not.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...