Arcane workbench tooltip refactoring

- Reorganises the huge amount of code in the draw background/foreground methods into a hierarchical object system
- Makes the tooltip box change height to fit the content
- Adds text wrapping support for items/spells with super long names
- Adds proper format arguments to the mana readout translation
- The tooltip now shows the new spells that will be applied with a flashing animation
This commit is contained in:
Electroblob77
2020-04-10 15:56:34 +01:00
parent 5df98d5b95
commit 15d3d9e70b
5 changed files with 508 additions and 190 deletions
@@ -156,7 +156,7 @@ public final class DrawingUtils {
* @return The resulting integer colour code, which will be an 8-digit hexadecimal.
*/
public static int makeTranslucent(int colour, float opacity){
return colour + ((int)(0xff * opacity * 0x01000000));
return colour + ((int)(opacity * 0xff) << 24);
}
/**