mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 01:34:01 +00:00
## About The Pull Request This PR completely overhauls Midnight and Midnight-derived UIs, as well as does some adjustments to the UI layout.  ### Major changes: * All UI elements for Midnight/Midnight-derived themes have been redrawn to be cleaner, with consistent palettes and up-to-date sprites * Tiny equip E is gone - Drop action has been moved in its place, freeing some space in the bottom right corner * Four minor menu keys have been bundled with actions, now-vertical floor change element taking their place * Action palette (wide thing in the top left corner) is now hidden when it has zero actions bound to it and the player isn't currently dragging an action button. I've also fixed some minor issues with how hand elements are rendered, and given feedback to resist button (it now lights up when pressed or when the hotkey is held down) <details> <summary>Some screenshots of new UIs</summary>    Redrawn UIs now have themed clothing slots    </details> ## Why It's Good For The Game Our UI icons are very outdated and compressed, with very large palettes and odd transparency quirks, making adding new elements or redesigning current ones quite hard and frustrating. A fresh coat of paint can take user experience a long way. As for moved elements, most people either equip things manually or use the equip hotkey - E button is rather obscure and rarely used, while drop button makes sense to be located near hands. Action palette just takes up screen space most of the time, so there's no reason to not hide it when you don't have any use for it. ## Changelog 🆑 qol: Resist button now has visible feedback. qol: Readjusted UI layout. image: Completely redrawn Midnight and Midnight-derived UIs! /🆑
14 lines
587 B
Plaintext
14 lines
587 B
Plaintext
/proc/ui_hand_position(i) //values based on old hand ui positions (CENTER:-/+16,SOUTH:5)
|
|
var/x_off = IS_LEFT_INDEX(i) ? 0 : -1
|
|
var/y_off = round((i-1) / 2)
|
|
return"CENTER+[x_off]:16,SOUTH+[y_off]:5"
|
|
|
|
/proc/ui_swaphand_position(mob/M, which = LEFT_HANDS) //values based on old swaphand ui positions (CENTER: +/-16,SOUTH+1:5)
|
|
var/x_off = (which == LEFT_HANDS) ? -1 : null
|
|
var/y_off = round((M.held_items.len-1) / 2)
|
|
return "CENTER[x_off]:16,SOUTH+[y_off+1]:5"
|
|
|
|
/proc/ui_perk_position(perk_count)
|
|
var/y_off = perk_count < 1 ? 0 : perk_count/2
|
|
return "WEST+0.5:12,NORTH-2-[y_off]:20"
|