|
Hello, today i'm going to show off my interface placing.
Most clients (with fullscreen/resizable) just make the interface get placed in the middle of the screen, but that's buggy because if some buttons overlap the minimap or chatbox, you can't click on them.
Other clients might have it so that when you resize, it checks the size of the client, and if the client's height & width are not big enough, interfaces just get drawn at coordinates 0,0 which in my opinion just looks ugly.
So today what I've done was made it so that when you resize the client, it places the interface in the middle of the screen, and avoids the minimap and the chatbox, so the interface is placed close to the middle of the screen, so it looks good
I made a video, I haven't watched it or anything, it's probably super laggy cus of my shit laptop (2 core processor @ 2.13ghz + 4gb ram > lmao)
but I hope you think it's cool, i don't think I've seen a client who actually has something like this, and it's kinda sad.
Features:
-Places itself nicely on the screen so you can click on it (near center if the client is not big enough)
-If client height is low, the interface still centers itself by the width.
-If client width is low, the interface still centers itself by the height.
-The clicking areas for the things on the interface adjust to the placement of the interface automatically...
Watch the video.
Feedback plox!
I might release this if enough people like it and want it
VIDEO:
goodjob, seen some great work form you lately
thanks hehe
yeah lol, I remember every server I played with fullscreen/resizable, and all of them had it so the interfaces were placed directly in the middle of the screen, and I found that really annoying when you want to play on resizable but with a smaller screen, and the interfaces overlap the minimap. So I fixed it
Tanks for the reply
Omg Galkon replied to my thread
Brb cleaning my pants.
epic nice interface placement11!!1
Good job, I think jagex added that on 508+.
heres the code if anyone is interestedCode:static final void updateInterfacePosition(final JagexInterface jagexInterface, final int screenWidth, final int screenHeight) { if (jagexInterface.dynamicXValue == 0) { jagexInterface.x = jagexInterface.originalX; } else if (jagexInterface.dynamicXValue == 1) { jagexInterface.x = jagexInterface.originalX + (screenWidth - jagexInterface.width) / 2; } else if (jagexInterface.dynamicXValue == 2) { jagexInterface.x = -jagexInterface.originalX + -jagexInterface.width + screenWidth; } else if (jagexInterface.dynamicXValue == 3) { jagexInterface.x = jagexInterface.originalX * screenWidth >> 14; } else if (jagexInterface.dynamicXValue == 4) { jagexInterface.x = (jagexInterface.originalX * screenWidth >> 14) + (screenWidth - jagexInterface.width) / 2; } else { jagexInterface.x = -(screenWidth * jagexInterface.originalX >> 14) + -jagexInterface.width + screenWidth; } if (jagexInterface.dynamicYValue == 0) { jagexInterface.y = jagexInterface.originalY; } else if (jagexInterface.dynamicYValue == 1) { jagexInterface.y = jagexInterface.originalY + (-jagexInterface.height + screenHeight) / 2; } else if (jagexInterface.dynamicYValue == 2) { jagexInterface.y = screenHeight + -jagexInterface.height - jagexInterface.originalY; } else if (jagexInterface.dynamicYValue == 3) { jagexInterface.y = screenHeight * jagexInterface.originalY >> 14; } else if (jagexInterface.dynamicYValue == 4) { jagexInterface.y = (jagexInterface.originalY * screenHeight >> 14) + (screenHeight - jagexInterface.height) / 2; } else { jagexInterface.y = -(jagexInterface.originalY * screenHeight >> 14) + screenHeight + -jagexInterface.height; } if (Class120_Sub30_Sub1.qaOpTestEnabled && (client.getClickMask(jagexInterface).optionMask != 0 || jagexInterface.type == 0)) { if (jagexInterface.x < 0) { jagexInterface.x = 0; } else if (jagexInterface.x + jagexInterface.width > screenWidth) { jagexInterface.x = screenWidth - jagexInterface.width; } if (jagexInterface.y < 0) { jagexInterface.y = 0; } else if (jagexInterface.height + jagexInterface.y > screenHeight) { jagexInterface.y = screenHeight - jagexInterface.height; } } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |