-
Notifications
You must be signed in to change notification settings - Fork 77
Container UI #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Container UI #308
Conversation
…ssible) -Added `Language`, with resource pack support, loading the original b1.7.3 lang files -Now, the `IngameBlockSelectionScreen` will show all the creative items -Fixed projection matrix znear not being accurate to b1.7.3, causing depth issues
|
Can you push the lang files? They would just be another ridiculous hurdle that people would need to conquer in order to play the game. Plus, we will likely end up changing the lang files in areas. |
| m_pInventory(inventory), | ||
| m_pContainer(container) | ||
| { | ||
| const int defaultHeight = 222; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make these constexpr
| hoveredSlot = slot; | ||
| int slotX = slot->m_x; | ||
| int slotY = slot->m_y; | ||
| fillGradient(slotX, slotY, slotX + 16, slotY + 16, -2130706433, -2130706433); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The colors should not be large negative numbers.
| int tx = m_menuPointer.x - m_leftPos + 12; | ||
| int ty = m_menuPointer.y - m_topPos - 12; | ||
| int w = m_pFont->width(name); | ||
| fillGradient(tx - 3, ty - 3, tx + w + 3, ty + 8 + 3, -1073741824, -1073741824); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
| bool contains(const std::string& key) const; | ||
| const std::string& get(const std::string& key) const; | ||
|
|
||
| static Language* getInstance() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should get or create the instance, and it should return a reference, not a pointer.
| Vec3 delta = m_pos - m_oPos; | ||
| dist = Mth::sqrt(delta.z * delta.z + delta.x * delta.x); | ||
| field_E8_2 = field_E8; | ||
| field_E8_2 = m_yBodyRot; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rename this local variable as well?
| while (x5 >= 180.0f) | ||
| x5 -= 360.0f; | ||
|
|
||
| field_E8_new = field_E8_2 + (float)(x5 * 0.3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
| ChestMenu(Container* inventory, Container* container); | ||
|
|
||
| bool stillValid(Player* player) const override; | ||
| virtual ItemStack quickMoveStack(int index) override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove virtual keyword.
| #include "DyeColor.hpp" | ||
|
|
||
| const char* DyeColor::IDS[] = {"black", "red", "green", "brown", "blue", "purple", "cyan", "silver", "gray", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white"}; | ||
| const int DyeColor::RGBS[] = { 1973019, 11743532, 3887386, 5320730, 2437522, 8073150, 2651799, 2651799, 4408131, 14188952, 4312372, 14602026, 6719955, 12801229, 15435844, 15790320 }; No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aren't these hex?
|
Also, please don't have mouseX and mouseY arguments in functions, we should be getting these values from the MenuPointer of the Screen. This should only be done for GuiComponents. |
InventoryScreenandChestScreen(inaccessible)Language, with resource pack support, loading the original b1.7.3 lang filesIngameBlockSelectionScreenwill show all the creative items