Soulbound Armory

Soulbound Armory

20.1k Downloads

GUI cleanup

nnym opened this issue ยท 0 comments

commented

A rewrite or transformation of the widget module has been in order for a while. It is a big, inefficient and flexible yet rigid generic and lambda mess that can be a hassle. Problems:

  • "self types" in every subclass and instance of Node and Widget for method chaining
  • too many lambdas for computing widgets' properties
  • complicated relationships between widgets leading to problems and bad workarounds
  • ScalableWidget's lack of multiple states.

Discarding self types leaves the options of overriding every method in every subclass of Widget, using an alternative language with a feature that solves the problem and not having chaining. Overriding every method is obviously excluded. Using an alternative language would bring along with it unnecessary baggage and probably be a bigger hassle in the long term. That leaves no chaining.

Widget needs more methods of computing properties like position and size. The current solution of using lambdas works and is flexible but it cas slow development down: adding or modifying a lambda incompatibly requires a JVM restart (except for DCEVM which is slow at runtime class redefinition and crashes occasionally).