[Kotlin]ArrayList Border
-
RenderUtils.drawRect(-1F, module.higt - 1F, 0F, module.higt + textHeight, rectColor) RenderUtils.drawRect(xPos - 3, module.higt, xPos - 2, module.higt + textHeight, rectColor) if (module != modules[0]) { var displayStrings = if (!tags.get()) modules[index - 1].name else if (tagsArrayColor.get()) modules[index - 1].colorlessTagName else modules[index - 1].tagName if (upperCaseValue.get()) displayStrings = displayStrings?.toUpperCase() RenderUtils.drawRect(xPos - 3 - (fontRenderer.getStringWidth(displayStrings) - fontRenderer.getStringWidth(displayString)), module.higt, xPos - 2, module.higt + 1, rectColor) if (module == modules[modules.size - 1]) { RenderUtils.drawRect(xPos - 3, module.higt + textHeight, 0.0F, module.higt + textHeight + 1, rectColor) } }
You can use this to make a Border in Arraylist.kt
-
@gking undefined: module.higt
-
@gking upd: had a look into liquidsense's src and higt is 0-2 in Module.kt
-
@idk-my-name just change it to "yPos"
-
@gking ok wait hotswapping game
-
ok
-
@idk-my-name same effect.
@Gking fix this code lmao -
it will be like this(![OOIB$U5WDX}9SMFR(3W~1V.png image url
-
@gking nope, it does not work for me.
-
@ohno RenderUtils.drawRect(-1F, yPos - 1F, 0F, yPos + textHeight, rectColor) RenderUtils.drawRect(xPos - 3, yPos, xPos - 2, yPos + textHeight, rectColor) if (module != modules[0]) { var displayStrings = if (!tags.get()) modules[index - 1].name else if (tagsArrayColor.get()) modules[index - 1].colorlessTagName else modules[index - 1].tagName if (upperCaseValue.get()) displayStrings = displayStrings?.toUpperCase() RenderUtils.drawRect(xPos - 3 - (fontRenderer.getStringWidth(displayStrings) - fontRenderer.getStringWidth(displayString)), yPos, xPos - 2, yPos + 1, rectColor) if (module == modules[modules.size - 1]) { RenderUtils.drawRect(xPos - 3, yPos + textHeight, 0.0F, yPos + textHeight + 1, rectColor) } }
what about this one
-
This post is deleted! -
@ushgfyhjg-fdxdfgfdsg no,because I made something private in it
-
@gking Thank you!
-
@gking thx!
-
This post is deleted! -
-
@gking help me, something wrong
-
@some-one eblan....
-
@ohno what should I do?
-
那应该怎么去使用这个呢.