Advanced Macros

Mods
10,668 Downloads Last Updated: Nov 11, 2019 Game Version: Forge

File Details

Filename advancedmacros-3.11.1.jar
Uploaded by Theincgi
Uploaded Jan 26, 2018
Game Version 1.12.2
Size 1.14 MB
Downloads 64
MD5 5434cca8e4a681cf18727653565a883c
Supported Minecraft 1.12 Versions
1.12.2
Supported Java Versions
Java 8

Changelog

  • Internal:
    • Color and opacity are now merged
    • 2D rendering has better support for z layering
  • Hud text now has default value of "" instead of null
  • hud text now has default text size of 12
  • Text can now be measured with .getWidth() and getHeight() on 2D text elements
  • Hud2D items now have a function .isDrawing()
  • Hud2D's add_______ now includes optional arguments
    • addRectangle(x, y, width, height)
    • addBox(x, y, width, height, thickness)
    • addImage(texture, x, y, width, height)
    • addText(text, x, y, size)
    • Values default as:
      • x = 0
      • y = 0
      • width = 0
      • height = 0
      • thickness = 0
      • size = 12
      • text = ""
      • texture = nil
  • New: Custom gui!  ( gui.newGui() )
    • addRectangle
    • addBox
    • addGroup
    • addText
    • addImage
    • open  - shows gui
    • close  - closes gui
    • setParentGui  - when rendering your gui, the parent gui will be drawn in the background
    • getParentGui
    • getSize - the screen size (width, height)
    • Groups
      • Manage multiple elements at the same time
      • setVisible(boolean)
      • isVisible()
      • move(x, y) - relative movment
      • setPos(x, y)
      • getPos()
      • setParent(parent) - receives events from this element (gui or another group)
      • addSubGroup() - creates a group with this group as the parent
    • Any event is consumed if you return true in its handler function. (does not get passed on to any other elements)
    • Events:
      • setOnMouseEnter()
      • setOnMouseExit()
      • setOnScroll( amount )
      • setOnMouseClick( x, y, buttonNum)  ( 0 = LMB, 1 = RMB, 2 = MMB )
      • setOnMouseRelease(x, y, buttonNum)
      • setOnMouseDrag(x, y, buttonNum, time) time is how long it has been held
      • setOnKeyPressed(typedChar, keyCode)
      • setOnKeyReleased(typedChar, keyCode)
      • setOnKeyRepeated(typedChar, keycode, mod)  mod is used to easily reduce the frequency, use something like if(mod%3==0)then........end
    • Other gui element functions
      • isHover()
      • remove()
      • setVisible(boolean)
      • isVisible()
      • setX(x)
      • setY(y)
      • getX()
      • getY()
      • setPos(x, y)
      • getPos()
      • setZ(z) + is top, - is bottom (layering)
      • getZ()
      • setOpacity(opacity)
      • getOpacity()
      • getWidth
      • getHeight
      • setHoverTint(color)
      • getHoverTint() -> {r=##, g=##, b=##, a=##}
      • setParent(parent)
      • May include setColor(Color) and getColor()

Bug fixes: 

  • Hud2D items can not be added to the drawing list multiple times anymore
  • all errors now use the same color code (&c, some previously used &4 in some spots)
  • Hud2D image doesn't have null texture by default
  • 2D text with \n doesn't go up anymore

 

  • Syntax changes:
    • Hud2D
      • text setSize -> setTextSize
      • getSize -> getTextSize
      • measureWidth -> getWidth
      • measureHeight -> getHeight
      • measure -> getSize