Jump to content

NightQuest

Members
  • Content Count

    32
  • Joined

  • Last visited

Community Reputation

5 Neutral

About NightQuest

  • Rank
    Advanced Member
  • Birthday 11/14/1988

Profile Information

  • Gender
    Not Telling
  • Location
    Oregon, USA
  1. With the next VS probably coming out within the year, any news on VS2015 support?

    1. Slastraf

      Slastraf

      in leadwerks 5, It probably takes a while from now

    2. Josh

      Josh

      Nothing has been announced.

    3. Roland

      Roland

      Why not make life more easy and go for CodeBlocks on Windows as in Linux. One IDE for both environmentd. Saves time for the user and for you Josh. One IDE to support instead of two. And then when the day comes for Mac. Codeblocks works there also

       

       

  2. When I visit leadwerks via https, all links are http still. D:

    1. AggrorJorn

      AggrorJorn

      Since you can longer buy Leadwerks via the site, the https probably expired.

    2. NightQuest

      NightQuest

      Naw, it's valid until January 2nd, 2019

  3. There's also HelpScribble, which is made by the same guy that makes RegexBuddy
  4. Forgive me if I'm wrong, but I think your problem may be the const const char* pixelBuf = new char[tex->GetMipmapSize(0)]; tex->GetPixels(pixelBuf); When I did this, I had to cast it GLubyte* tPixels = new GLubyte[tex->GetMipmapSize(0)]; tex->GetPixels(reinterpret_cast<const char*>(tPixels)); I have no idea why it's passed as a const char* since it's obviously modified; if anything, it should be passed as a char* const.
  5. So, steam_api.dll is required now, huh..

    1. Josh

      Josh

      It's needed for the EXE to run, but you do not have to initialize Steam.

  6. it looks like a bug, honestly. This works, though - just use it the same way: class FS : public FileSystem { FS() : FileSystem() {} public: static int GetFileSize(const std::string& path) { std::string file = RealPath(path); struct stat filestat; stat(&path[0], &filestat); return static_cast<int>(filestat.st_size); } };
  7. Same in the new ones, it's only the last parameter that matters, but it's Window::FullScreen instead of 32. The rest of the code is just fluff. You may want to get the system width/height for that window, actually. I don't believe LE has a method to determine the current monitor width/height (only supported ones), though so you'd have to rely on native calls. On Windows (I don't know how on *nix): unsigned int width = GetSystemMetrics(SM_CXSCREEN); unsigned int height = GetSystemMetrics(SM_CYSCREEN);
  8. in C++: unsigned int windowStyle = Window::Titlebar | Window::Center; if( stoi(System::GetProperty("fullscreen")) ) windowStyle = Window::FullScreen; unsigned int width = stoi(System::GetProperty("width", "1920")); unsigned int height = stoi(System::GetProperty("height", "1080")); Window* window = Leadwerks::Window::Create("Test", 0, 0, width, height, windowStyle );
  9. One way it could be done: Compare file with previous versioned file (would require having a .old or having the file hash somewhere), If identical, update. If not identical, offer to update. If user selects No, show them a list of changes from the previous version so they can implement them manually (diff).
  10. Threw this together, seems to work rather well. Source.zip
  11. So.. the top menu is now yelling, just like in LE :(

    1. Josh

      Josh

      SuppressUppercaseConversion=1 in Leadwerks.cfg. ;)

    2. NightQuest
  12. Thanks to this, something like this should work EDIT: I installed XUbuntu 14.04 on dual-boot to test this, below is the working version bool isActiveWindow(Leadwerks::Window* window) { if( window == nullptr ) return false; #if defined(__linux__) && !defined(__ANDROID__) ::Window root = 0L; ::Window active = 0L; Atom _NET_ACTIVE_WINDOW = XInternAtom(window->display, "_NET_ACTIVE_WINDOW", False); Atom actual_type; int actual_format; unsigned long count, bytesAfter; unsigned char* properties = NULL; root = DefaultRootWindow(window->display); if( XGetWindowProperty(window->display, root, _NET_ACTIVE_WINDOW, 0L, sizeof(::Window), False, XA_WINDOW, &actual_type, &actual_format, &count, &bytesAfter, &properties) == Success ) { active = *reinterpret_cast<::Window*>(properties); XFree(properties); } return (window->window == active); #else return window->Active(); #endif }
  13. Those are awesome, but they do not give you the current displaymode - maybe a int System::GetCurrentGraphicsMode()?
  14. We have Window::setLayout which is awesome for resizing.. but what if we want borderless window? Right now, I'm using this platform-specific code for that: if( window->KeyHit(Key::F11) ) { int screenWidth = GetSystemMetrics(SM_CXSCREEN); int screenHeight = GetSystemMetrics(SM_CYSCREEN); if( fullscreen ) { long style = reinterpret_cast<long>(window->GetUserData()); SetWindowLongPtr(window->hwnd, GWL_STYLE, style); int width = stoi(System::GetProperty("width", "1280")); int height = stoi(System::GetProperty("height", "720")); window->SetLayout((screenWidth - width) / 2, (screenHeight - height) / 2, width, height); } else { long style = GetWindowLongPtr(window->hwnd, GWL_STYLE); window->SetUserData(reinterpret_cast<void*>(style)); SetWindowLongPtr(window->hwnd, GWL_STYLE, style & ~(WS_BORDER | WS_OVERLAPPEDWINDOW)); window->SetLayout(0, 0, screenWidth, screenHeight); } fullscreen = !fullscreen; } This would allow us to simply do: if( window->KeyHit(Key::F11) ) { fullscreen = !fullscreen; int width = fullscreen ? GetSystemMetrics(SM_CXSCREEN) : stoi(System::GetProperty("width", "1280")); int height = fullscreen ? GetSystemMetrics(SM_CYSCREEN) : stoi(System::GetProperty("height", "720")); int style = Window::Center; if( fullscreen ) style &= ~Window::Titlebar; else style |= Window::Titlebar; window->setStyle(style); window->setLayout(0, 0, width, height); } And maybe we could get a Vec2 System::GetCurrentMonitorResolution(); or something to retrieve the current monitors display resolution? While I don't mind the Win32API, I'd like to be able to easily do these things on both platforms. GTK+ has gtk-window-set-decorated, and X11 has DefaultScreenOfDisplay.
  15. NightQuest

    Growing Leadwerks

    Thank you for the transparency! I love seeing updates like this. I look forward to seeing these things become a reality.
×
×
  • Create New...