Jump to content

Yue

Members
  • Posts

    2,449
  • Joined

  • Last visited

Everything posted by Yue

  1. I think the most valid option is to leave the default font with a specific size for all buttons, in favor of a fast and efficient change of resolution in real time. Or the other would be to ask the user for a manual reset and use a custom font for each widget with a specific size. There are things, decisions that favor something and harm something else.
  2. I am trying to optimize this as much as possible and all to tip to I have problems when I do a resolution change and the widgets have a custom font that is added with: Widget:SetFont("Assets/Fonts/myFont.ttf",12) The problem here is that when I do a screen resolution change, it removes the window and thus the context is removed and I have to remove the GUI. And rebuilding it again starts the process of loading those fonts for the GUI. Then it happens that after several successful resolution changes the application crashes. It is evident that the more fonts you use, the slower the process is when changing the screen resolution, because it has to load the fonts back into memory. So I have the following questions: Is it possible to leave those fonts in memory, is there any tip for this? Obviously if I don't put custom fonts and leave the default font, this doesn't happen and the change of screen resolution is much fast Translated with www.DeepL.com/Translator (free version)
  3. Animation loading level.
  4. In which cases is this event used in the Gui? I have n .... elseif event.id == Event.WidgetSelect then --System:Print("WidgetSelect") end oticed by chance that it only goes when I move the indicators of a list box when I change the possible screen resolutions.
  5. Full screen no working 4.6 :( - Page 6 - Leadwerks Engine Bug Reports - Ultra Engine Community - Game Engine for VR
  6. I have the mania of wanting to eliminate everything manually, and it is that in the change of resolution the context that also uses the GUI is eliminated. I suppose that nothing happens if I restart it again and it overwrites its new values in the memory. The thing is that I am following the path of many in learning Leadwerks.
  7. I am struggling to implement a correct screen resolution change without bugs. I am on the right track, learning as always something new in this process. But something here is not going right for me, I create a Gui and try to delete it and it crashes the application, any suggestions? myGUI = GUI:Create(Context:GetCurrent()) myGUI:Release()
  8. Solved here, fix change file font ttf for new font. For some reason the font had problems when changing the screen resolution. I don't know what was wrong with it, the thing is that when I changed the source it is working correctly. I do not know if it is because it is a font with Latin characters.
  9. By using SetFont( font path ), the resolution change in several attempts star the application. This I believe is because the file path is passed and not a pointer. The thing is that after a few restarts the window closes on the screen resolution change.
  10. Yue

    Editor WIP

    https://media.giphy.com/media/l4Jz8Vm04dyPC2C64/giphy.gif
  11. while EventQueue:Peek() do local event = EventQueue:Wait() if event.id == Event.WindowClose then System:Print("CLOSE TEST") elseif event.id == Event.WidgetAction then if event.source == self.btnStart then self.Gui:Hide() self.button = self.START end if event.source == self.btnOptions then self.pnlOptions:Show() self.pnlStart:Hide() elseif event.source == self.btnExit then self.pnlStart:Hide() self.pnlBox:Show() elseif event.source == self.btnNot then self.pnlBox:Hide() self.pnlStart:Show() elseif event.source == self.btnYes then self.pnlBox:Hide() self.button = self.YES elseif event.source == self.btnSave then self:SaveConfig() elseif event.source == self.btnCancel then self.pnlOptions:Hide() self.pnlStart:Show() self:CancelConfig() end elseif event.id == Event.WidgetSelect then end end
  12. One question, that only works in C++, I'm in lua, and I can't find the equivalent for the window close event. while EventQueue:Peek() do local event = EventQueue:Wait() if event.id == Event.WindowClose then System:Print("CLOSE TEST") ....
  13. For some reason my limitations when learning something, is that I don't speak English, so I have to learn something by brute force, trial and error, and that's when sometimes, just sometimes I get lucky, in this case with the help of the gooble search engine. The thing is that for some reason the Hooks in loading a map had never worked for me and it was because I implemented them in this way. function Loading() System:Print("Loading...") end myMap = Map:Load("Maps/Start.map", loading() ) The message inside the hook only returns when the map is fully loaded. However thanks to this that I found on google, this works as I really expected, and the problem is that I had no ****ing idea how to implement a pointer. xD This is amazing to me, because implemented in this way, the message is displayed three times on screen, alluding to the fact that there are three entities on the map, a light, a camera and a mesh. So this involves creating an animation of a loading bar. If anyone reads this I hope it is helpful. Likewise thanks to everyone who has touched on this topic in this community.
  14. Well, I'm stuck here. myMap = FileSystem:ReadFile("Map.txt") while not myMap:EOF() do line = myMap:ReadLine() System:Print(line:GetSize() ) -- here line.size end System:Print("Final") myMap = FileSystem:ReadFile("Map.txt") while not myMap:EOF() do line = myMap:ReadLine() System:Print(line.size ) end System:Print("Final")
  15. myMap = FileSystem:ReadFile("C:/TestFile/Map.txt") System:Print(myMap) --Ok File read. for I = 0,9 do myMap:WriteString(I) end
  16. When changing the resolution I delete the window and rebuild the GUI again. However it does not work properly. If I do not rebuild the GUI again the drawing coordinates are in relation to the previous screen resolution in its width and height of context, window and base. I think I can use GUI:SetSCale, but I have to watch how it goes
  17. I am going to try this in Lua, remembering old threads where this topic was discussed, today I understand what you meant, it's just that my English is very bad.
  18. Thank you very much, always something new to learn in this community. One question, the color of the text can still be changed that way, because what I have done is to modify directly the Button.lua, panel.lua etc..
  19. I really don't know how to do this. I'm trying to figure this out, but I have no idea.
×
×
  • Create New...