Jump to content

Josh

Staff
  • Posts

    23,315
  • Joined

  • Last visited

Everything posted by Josh

  1. Ah, okay. I will fix it so it emits the correct event indicating it failed to initialize.
  2. Integrated graphics are not currently supported. This is due to the number of shader texture units they support. There is a workaround, and I have successfully run it, but it will take more work to get it completely finished. There is an EVENT_STARTRENDERER event you can look for to tell when the renderer has initialized. If event.data is 1 it initialized correctly. If event.data is 0 it failed to initialize, and even.text may contain additional information.
  3. You have two memory leaks in your code. You should call threads.clear() when the space key is pressed, and you should clear the events queue or it will just get bigger and bigger: while (PeekEvent()) WaitEvent(); After fixing those I did find a problem in the thread constructor where another system is getting initialized. I will have a fix for you soon.
  4. MaxThreads returns the number of threads that can be simultaneously run, not the number of CPU cores.
  5. If you are at less then 100% there is nothing to worry about.
  6. You may be using a lot of threads but you probably aren't using them at max capacity. If you check CPU usage you'll probably be surprised how little they are being used. Ultra uses one high-priority thread for rendering. The main logic thread where your code executes pauses in intervals of 16 milliseconds, so CPU usage should be pretty low. Culling is on another thread, but usage there will be low also. Animation, physics, and navmesh building are each on separate threads, and the animation system may use many threads, but in most cases CPU usage on each will be low unless you are pushing that system. I'd say MaxThreads() - 1 is a good general rule.
  7. I did not get the selection working, but you can duplicate the text entry like this: #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 800, 600, displays[0]); //Create User Interface auto ui = CreateInterface(window); //Create widget auto sz = ui->root->ClientSize(); auto textfield = CreateTextField(20, 20, 300, 32, ui->root, TEXTFIELD_TEXTCHANGEACTIONEVENT); textfield->SetText("Here is some text!"); textfield->SelectText(0, textfield->text.size()); auto textfield2 = CreateTextField(20, 60, 300, 32, ui->root, TEXTFIELD_TEXTCHANGEACTIONEVENT | TEXTFIELD_PASSWORD); textfield2->SetText("Here is some text 2!"); textfield2->SelectText(0, textfield->text.size()); while (true) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WIDGETACTION: if (ev.source == textfield) { textfield2->SetText(textfield->text); textfield2->Redraw(); } break; case EVENT_WINDOWCLOSE: return 0; break; } } return 0; }
  8. Josh

    Editor Progress

    Interesting idea. I'll try it and see what happens.
  9. Okay, well it's my fault, mostly... 😄 In Ultra Engine I got a lot more strict with which members are public and private, and "style" is not meant to be changed once the widget is created. With text fields the style is pretty simple but some other widgets change dramatically in appearance and behavior depending on the style settings they were created with. A simple hack is to call Widget->Redraw() after you change the style, and in this case it will probably be fine. For a forward-compatible solution I would create two text fields and hide and show them based on the current setting. You can get and set the precise text selection position and length so they will match seamlessly when you switch between them.
  10. Josh

    Editor Progress

    You can place scripts in Scripts / Start and they will execute automatically when the program starts up. You can use this to add to or modify the interface to add new features.
  11. Josh

    Editor Progress

    This video just shows some of the main interface and some cool in-editor scripting features.
  12. Ah, okay. You can use GetHandle() and start using the Win32 API. This won't be cross-platform, but it will work on Windows: SetWindowPos(window->GetHandle(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); https://stackoverflow.com/questions/14989062/set-a-window-to-be-topmost
  13. I think Window::Activate() will select the window and bring it to the top.
  14. Updated 1.0.1 Added @reepblue's changes to preprocessor
  15. It's only in the general, programming, and artwork forums.
  16. I see the system now uses a "go to solution" button and leaves the conversation in order. Previously when we tried this people were complaining about the answer being moved to the top, so this fixes that issue.
  17. Awesome, thank you! I still don't see how he was able to compile if his header and C++ file were incompatible, even if they were generated at different times. I have seen this happen with complicated partial builds when the compiler incorrectly links an object file with a mismatched header, but cleaning the project always solves those.
  18. I see you guys are both on Windows 11. There must have been some changes to the window compositing system between how it worked in Win10 and earlier.
  19. Some of the forums now have this feature enabled. Give it a try and see what you think.
  20. Windows should emit a paint event whenever a window is invalidated, whether that comes from resizing or something else. But if you are saying you were able to produce and fix the problem then I can't argue with that.
  21. I did the same, and compiled it for you, just to make sure there's no problem with you receiving updates: windowtest.zip The behavior should look like this:
  22. You don't need to restart the client. On the Updates panel it shows the version installed. Does yours say 1.0.1?'
  23. Not at this time. The challenge isn't the technical implementation of the system, but the content. I won't attempt to do anything like that until the content is lined up and ready to go. Instead, I am trying to focus on making the file loaders reliable so you can easily get models from Sketchfab, CGTrader, Turbosquid, etc.
  24. It waa very good idea. I wonder if the header date or some other value could be declared in both the header and CPP file would work to ensure the two are always in sync? Like, in the component constructor an Assert could compare the two values and make sure they are the same.
×
×
  • Create New...