Compare commits

...
2 Commits
3 changed files with 27 additions and 0 deletions

No files matched your search

+1
View File
@@ -28,3 +28,4 @@ whitelist.json
src/main/resources/mixins.*.json
*.bat
layout.json
.DS_Store
+13
View File
@@ -0,0 +1,13 @@
# Waila
## Contribution
When forking this repository, make sure to uncheck the `Copy the master branch only` option.
This will copy all tags to your fork, so the build system can detect the latest mod version.
If you leave it checked, you won't be able to enter the world in a local client run because Waila [will think the mod is outdated](https://github.com/GTNewHorizons/waila/blob/master/src/main/java/mcp/mobius/waila/Waila.java#L133).
If you already forked the repository without tags, you can fetch them manually:
```
git remote add upstream https://github.com/GTNewHorizons/waila
git fetch upstream --tags
```
@@ -1,5 +1,7 @@
package mcp.mobius.waila.api;
import java.awt.Dimension;
/**
* Interface for tooltip renderers that adjust their width depending on the width of the rest of the tooltip.
* setMaxLineWidth is called by {@link mcp.mobius.waila.overlay.Tooltip} before every tooltip render to inform the
@@ -7,6 +9,17 @@ package mcp.mobius.waila.api;
*/
public interface IWailaVariableWidthTooltipRenderer extends IWailaTooltipRenderer {
/**
* Return the size of the tooltip. for variable width renderers it is recommended to return the minimum width needed
* for the line, then draw the actual width using getMaxLineWidth(). They do not need to actually match.
*
* @param params Array of string parameters as passed to the RENDER arg in the tooltip
* ({rendername,param1,param2,...})
* @param accessor A global accessor for TileEntities and Entities
* @return Dimension of the reserved area
*/
Dimension getSize(String[] params, IWailaCommonAccessor accessor);
/**
* Informs the renderer of what the length of the longest line is.</br>
* Called by {@link mcp.mobius.waila.overlay.Tooltip} before every tooltip render.</br>