aboutsummaryrefslogtreecommitdiff
path: root/src/network/clientpackethandler.cpp
Commit message (Expand)AuthorAge
...
* Add clientside translations.Ekdohibs2017-08-24
* Network cleanup (#6302)Loïc Blot2017-08-24
* Minimap: Add new HUD flag for minimap radar modeparamat2017-08-20
* Code modernization: subfolders (#6283)Loïc Blot2017-08-19
* [CSM] Add flavour limits controlled by server (#5930)Loïc Blot2017-07-18
* Chat protocol rewrite (#5117)Loïc Blot2017-07-16
* Verify HudSetParams input when hotbar textures are set (#6013)Loïc Blot2017-06-19
* Cpp11 initializers 2 (#5999)Loïc Blot2017-06-17
* Sound: Add pitch option (#5960)Rui2017-06-11
* Have the server send the player list to the client (#5924)red-0012017-06-08
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
* When minimap is disabled in configuration, really disable it (#5771)Loïc Blot2017-05-19
* Fading soungs: Fix client crash on older serversSmallJoker2017-05-03
* Set sky API: Add bool for clouds in front of custom skyboxparamat2017-05-02
* Sneak: Improve and fix various thingsSmallJoker2017-05-03
* Sound API: Add fading soundsBrandon2017-05-03
* Add clouds APIBen Deutsch2017-04-30
* Rename Scripting API files for consistencyShadowNinja2017-04-25
* Network:Remove old opcodes and fix documentation. (#5573)red-0012017-04-22
* Client handlers: Remove useless stringstream usage in two handlers (#5510)Loïc Blot2017-04-04
* [CSM] Add minimap API modifiers (#5399)Loïc Blot2017-03-16
* [CSM] Add enable_client_modding param (default: false)nerzhul2017-03-13
* [CSM] Add on_death, on_hp_modification & oh_damage_taken callbacks (#5093)Loïc Blot2017-03-13
* [CSM] Add method that display chat to client-sided lua. (#5089) (#5091)red-0012017-03-13
* [CSM] Client side moddingLoic Blot2017-03-13
* Add particle animation, glowsfan52017-01-18
* Revert "Adding particle blend, glow and animation (#4705)"sfan52016-11-14
* Adding particle blend, glow and animation (#4705)Foghrye42016-11-15
* PlayerSAO/LocalPlayer refactor: (#4612)Ner'zhul2016-10-30
* Attached particle spawnersraymoo2016-10-13
* More code cleanup (UNORDERED + RemotePlayer/LocalPlayer)Loic Blot2016-10-08
* Player/LocalPlayer/RemotePlayer inheritance cleanup (part 1 on X)Loic Blot2016-10-08
* Use more unordered_maps to improve performance in c++11 buildsLoic Blot2016-10-06
* Particles: Add option to remove particles on collisionAuke Kok2016-05-28
* Clean up StrfndShadowNinja2016-03-19
* Fix player teleportation bug whilst sneakingHybridDog2016-03-14
* Use warningstream for log messages with WARNINGShadowNinja2015-10-14
* Hide minimap if it has been disabled by serverest312015-09-01
* Clean up threadingShadowNinja2015-08-23
* Fix srp.cpp:815 leakest312015-07-27
* Optional reconnect functionalityest312015-07-23
* Remove raw message output on AOM deserialization failurekwolekr2015-07-13
* Use UTF-8 instead of narrowest312015-07-08
* Client: better m_proto_ver initialisationest312015-07-07
* Typo fix on previous @est31 commitLoic Blot2015-06-23
* Small TOCLIENT_HELLO logging fixest312015-06-23
* Finalize init packets and enable protocol v25est312015-05-16
* Make early protocol auth mechanism generic, and add SRPest312015-05-11
* Protocol 25: wstring -> string for custom access denial reasonsest312015-04-22
* TOCLIENT_ACTIVE_OBJECT_REMOVE_ADD can be unreliable, catch PacketError except...Loic Blot2015-04-05
n class="hl num">2, screensize.Y/2 - 300/2, screensize.X/2 + 580/2, screensize.Y/2 + 300/2 ); DesiredRect = rect; recalculateAbsolutePosition(false); v2s32 size = rect.getSize(); v2s32 topleft_client(40, 0); v2s32 size_client = size - v2s32(40, 0); /* Add stuff */ s32 ypos = 50; changeCtype(""); { core::rect<s32> rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); Environment->addStaticText(wgettext("Old Password"), rect, false, true, this, -1); } changeCtype("C"); { core::rect<s32> rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); gui::IGUIEditBox *e = Environment->addEditBox(L"", rect, true, this, ID_oldPassword); Environment->setFocus(e); e->setPasswordBox(true); } ypos += 50; changeCtype(""); { core::rect<s32> rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); Environment->addStaticText(wgettext("New Password"), rect, false, true, this, -1); } changeCtype("C"); { core::rect<s32> rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); gui::IGUIEditBox *e = Environment->addEditBox(L"", rect, true, this, ID_newPassword1); e->setPasswordBox(true); } ypos += 50; changeCtype(""); { core::rect<s32> rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); Environment->addStaticText(wgettext("Confirm Password"), rect, false, true, this, -1); } changeCtype("C"); { core::rect<s32> rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); gui::IGUIEditBox *e = Environment->addEditBox(L"", rect, true, this, ID_newPassword2); e->setPasswordBox(true); } ypos += 50; changeCtype(""); { core::rect<s32> rect(0, 0, 140, 30); rect = rect + v2s32(size.X/2-140/2, ypos); Environment->addButton(rect, this, ID_change, wgettext("Change")); } ypos += 50; { core::rect<s32> rect(0, 0, 300, 20); rect += topleft_client + v2s32(35, ypos); IGUIElement *e = Environment->addStaticText( wgettext("Passwords do not match!"), rect, false, true, this, ID_message); e->setVisible(false); } changeCtype("C"); } void GUIPasswordChange::drawMenu() { gui::IGUISkin* skin = Environment->getSkin(); if (!skin) return; video::IVideoDriver* driver = Environment->getVideoDriver(); video::SColor bgcolor(140,0,0,0); driver->draw2DRectangle(bgcolor, AbsoluteRect, &AbsoluteClippingRect); gui::IGUIElement::draw(); } bool GUIPasswordChange::acceptInput() { std::wstring oldpass; std::wstring newpass; gui::IGUIElement *e; e = getElementFromId(ID_oldPassword); if(e != NULL) oldpass = e->getText(); e = getElementFromId(ID_newPassword1); if(e != NULL) newpass = e->getText(); e = getElementFromId(ID_newPassword2); if(e != NULL && newpass != e->getText()) { e = getElementFromId(ID_message); if(e != NULL) e->setVisible(true); return false; } m_client->sendChangePassword(oldpass, newpass); return true; } bool GUIPasswordChange::OnEvent(const SEvent& event) { if(event.EventType==EET_KEY_INPUT_EVENT) { if(event.KeyInput.Key==KEY_ESCAPE && event.KeyInput.PressedDown) { quitMenu(); return true; } if(event.KeyInput.Key==KEY_RETURN && event.KeyInput.PressedDown) { if(acceptInput()) quitMenu(); return true; } } if(event.EventType==EET_GUI_EVENT) { if(event.GUIEvent.EventType==gui::EGET_ELEMENT_FOCUS_LOST && isVisible()) { if(!canTakeFocus(event.GUIEvent.Element)) { dstream<<"GUIPasswordChange: Not allowing focus change." <<std::endl; // Returning true disables focus change return true; } } if(event.GUIEvent.EventType==gui::EGET_BUTTON_CLICKED) { switch(event.GUIEvent.Caller->getID()) { case ID_change: if(acceptInput()) quitMenu(); return true; } } if(event.GUIEvent.EventType==gui::EGET_EDITBOX_ENTER) { switch(event.GUIEvent.Caller->getID()) { case ID_oldPassword: case ID_newPassword1: case ID_newPassword2: if(acceptInput()) quitMenu(); return true; } } } return Parent ? Parent->OnEvent(event) : false; }