23 Commits

Author SHA1 Message Date
IntegratedQuantum
c2ef9aba62 Remove the root . . . . . . . . . . import, replacing it with @import("main")
To fully solve the ZLS issues I had to also add the import to the other executables.
2025-03-27 21:16:35 +01:00
IntegratedQuantum
09fc516828 Move all the allocators to a separate file. They can now be imported with main.heap (analogous to std.heap)
I also removed the unused BufferFallbackAllocator which was from a time where I was still experimenting with different allocators.
2025-03-09 16:26:41 +01:00
IntegratedQuantum
bc02bb0587
Use (an adapted version) of zig fmt to format the source code. (#1140)
* Format all the files

* Fix compilation error.

* The install scripts now patch render.zig from the zig standard library.

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update ci.yml

* Update the formatter, it doesn't need to run on .zig files anymore.

* Update ci.yml

* Update ci.yml

* Add a mistake to check if it works

* IT WORKS!
2025-03-02 16:36:58 +01:00
IntegratedQuantum
22488a28ae CI: Check for trailing spaces and (missing) newlines at the end of the file
fixes #737
2025-02-12 17:36:44 +01:00
IntegratedQuantum
0a8b9de3a9 Don't print any numbers and remove default localhost multiplayer IP address.
These were causing some problems.
2024-12-03 21:18:20 +01:00
IntegratedQuantum
76476faa84 Fix the sliders.
fixes #590
2024-07-27 16:01:47 +02:00
IntegratedQuantum
337e014d88 Store settings and gui layout whenever it gets changed.
fixes #469
2024-07-04 10:24:57 +02:00
IntegratedQuantum
899083569d Remove redundant window ids. They were asserted to be equal to the file name, now they are initialized to the file name, removing the need for setting it manually.
This makes adding new windows simpler, also affects #273.
2024-03-19 22:17:46 +01:00
IntegratedQuantum
de004841b7 Handle OutOfMemory errors centrally for the globalAllocator and derivatives.
To let the rest of the code know about this decision I implemented a wrapper over the Allocator interface which cannot fail.

This is just the first step in the upcoming refactoring attempt.
2024-01-29 17:22:20 +01:00
IntegratedQuantum
e398824cab Refactoring: Use const instead of var where possible.
When I started to use zig, I mostly used `var`. But over time I adapted to using `const` where possible which is more readable and the compiler is currently optimizing it better.
2023-10-22 21:12:45 +02:00
IntegratedQuantum
7cb347ce3c Update zig to 0.11.0-dev.3990+f2d433a19 2023-07-14 11:24:18 +02:00
IntegratedQuantum
93b2a29cc8 Add a volume slider. 2023-07-03 11:27:50 +02:00
IntegratedQuantum
b0ea868fa4 Remove the window title and fix ItemSlot pressed behavior. 2023-04-08 14:58:25 +02:00
IntegratedQuantum
3212e00b42 Add a userData argument to all gui callbacks and some more refactoring. 2023-04-04 21:50:57 +02:00
IntegratedQuantum
9fdfa04734 Refactor: Limit window components to one. Also use better formatting for tooltips. 2023-03-29 22:11:08 +02:00
IntegratedQuantum
758fe2c8ab Use @hasDecl and automatically assign the window function pointers. 2023-03-23 17:13:40 +01:00
IntegratedQuantum
219c3214e9 Add a ScrollBar to the VerticalList. 2023-03-21 11:45:29 +01:00
IntegratedQuantum
9e7f3defe2 Add HorizontalList, add alignment to list components and fix a bug. 2023-03-17 16:18:43 +01:00
IntegratedQuantum
5c74694611 Refactor how components are handled.
- A `GuiComponent` now is union of pointers.
- `pos` and `size` are now stored in each component rather than being passed down through functions.
2023-03-17 13:47:07 +01:00
IntegratedQuantum
fd0e903431 Refactor: Simplify window creation by limiting it to a single window per namespace. 2023-03-17 11:25:46 +01:00
IntegratedQuantum
44eed8026d Refactor: Use one global allocator for all gui related stuff. 2023-03-10 17:24:36 +01:00
IntegratedQuantum
c9c6bcaece Add the controls settings and some other things. 2023-03-03 19:26:15 +01:00
IntegratedQuantum
17dead15da Prepare the menu/settings related windows. 2023-02-24 19:36:18 +01:00