123456789101112131415161718192021222324252627 |
- #include "client/gui/StartGUI.h"
- StartGUI::StartGUI(BaseGUI b)
- : base(b), address(base.addInput()), test(base.addInput()) {
- }
- void StartGUI::tick() {
- base.tick();
- }
- void StartGUI::render(float lag, ShaderMatrix& sm, Renderer& r) {
- base.updateScale(sm);
- Vector2 size = Vector2(BaseGUI::FIXED_SIZE[0] - 80.0f, 110.0f);
- Vector2 pos = (base.scaledSize - size) * 0.5f;
- address.pos = pos + Vector2(40.0f, 30.0f);
- address.size = Vector2(size[0] - 80.0f, 30.0f);
- test.pos = pos + Vector2(40.0f, 70.0f);
- test.size = Vector2(size[0] - 80.0f, 30.0f);
- r.drawRectangle(pos, size, Color4(0x50, 0x50, 0x50, 0xFF));
- base.drawCenteredString(r, pos, Vector2(size[0], 30.0f),
- "Connect to server ...");
- base.render(lag, sm, r);
- }
|