Skip to content

Mega Documentation PR#124

Open
Sanduhr32 wants to merge 22 commits into
GTNewHorizons:masterfrom
Sanduhr32:master
Open

Mega Documentation PR#124
Sanduhr32 wants to merge 22 commits into
GTNewHorizons:masterfrom
Sanduhr32:master

Conversation

@Sanduhr32
Copy link
Copy Markdown

lots of documentation, will be updated, please review once in a while :)

@Sanduhr32 Sanduhr32 marked this pull request as ready for review May 21, 2026 17:14
@Sanduhr32
Copy link
Copy Markdown
Author

@brachy84 could i get a little help with my todo comments trying to understand the code & docs?

@brachy84
Copy link
Copy Markdown
Collaborator

Oh sorry, i completely missed this pr

Copy link
Copy Markdown
Author

@Sanduhr32 Sanduhr32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick ref to the todos

Comment thread src/main/java/com/cleanroommc/modularui/api/drawable/IDrawable.java Outdated

public static boolean isInside(int x, int y, int w, int h, int px, int py) {
// why does this even need a static object for a simple check?
// if at all, instances may use a shared & stateless static method
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question

}

//TODO: explain for what SHARED is actually used for, as it has no warnings about side effects caused by
// the function above for example.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and that

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally its supposed to be a way to use an area for calculating stuff without having to create an instance. Kind of unecessary.

@Sanduhr32
Copy link
Copy Markdown
Author

dw, the PR was in draft so far, i'm still not done, but some help along the way is appreciated trying to decipher the mix of english & german writing style ^^

Comment thread src/main/java/com/cleanroommc/modularui/widget/sizer/Area.java Outdated
}

/**
* Only enabled recipe viewer in synced GUIs
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should say what the default state actually does.
It enables recipe viewer when its not a client only screen.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I removed documentation in that class, because it was the same as in the interface it's implementing.
But if there is a crucial detail here that's different than the expected behavior depending on implementation, then I'll re-add the documentation.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grafik

import java.util.List;
import java.util.function.Predicate;

//TODO: have to come back to this
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an internal class and should never be used outside this mod.
Apart from explaining why things are written the way they are in comments this shouldn't need any docs.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but such documentation might be helpful regardless, in case MUI(2) gets another rewrite, gets optimized, or other process that would benefit from documentation. even if its just someone learning from it

@Sanduhr32
Copy link
Copy Markdown
Author

@Dream-Master if you update my branch, please use the rebase way if possible in the future :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants