aboutsummaryrefslogtreecommitdiff
path: root/src/unittest
Commit message (Expand)AuthorAge
* fix: some code tidy about includes & irr namespacesLoic Blot2021-05-03
* refacto: don't use RenderingEngine singleton on CAOLoic Blot2021-05-03
* Schematic: Properly deal with before/after node resolving and document (#11011)SmallJoker2021-03-20
* Encode high codepoints as surrogates to safely transport wchar_t over networksfan52021-02-02
* Drop wide/narrow conversion functionssfan52021-02-02
* Refactor utf8_to_wide/wide_to_utf8 functionssfan52021-02-02
* Rework use_texture_alpha to provide three opaque/clip/blend modessfan52021-01-29
* Settings: Purge getDefault, clean FontEngineSmallJoker2021-01-29
* Settings: Proper priority hierarchySmallJoker2021-01-29
* Remove unused functions reported by cppcheck (#10463)SmallJoker2020-10-05
* (se)SerializeString: Include max length in the nameSmallJoker2020-10-01
* Clean up serializationSmallJoker2020-10-01
* Settings: Fix unittest memory leak, change input typesSmallJoker2020-09-22
* Remove Thread::kill() and related unittest (#10317)Sebastien Marie2020-09-10
* Load media from subfolders (#9065)DS2020-08-20
* TestBan: Clean up properly after completing test (#9994)ANAND2020-06-05
* Rename “Minimal development test” to “Development Test” (#9928)Wuzzy2020-05-26
* Allow ObjDefManager instances to be clonedsfan52020-05-05
* Optimize get_objects_inside_radius calls (#9671)Loïc Blot2020-04-16
* Drop content_sao.{cpp,h}Loic Blot2020-04-11
* Collision various fixes (#9343)TheTermos2020-04-08
* Add limit parameter to decompressZlibBen Deutsch2020-02-01
* Settings: Add get_flags API for mapgen flags (mg_flags, mgv6_spflags, ...) (#...SmallJoker2020-01-25
* StaticText/EnrichedString: Styling support (#9187)SmallJoker2020-01-22
* Fix AreaStore's IDs persistence (#8888)SmallJoker2019-09-21
* Inventory: Send dirty lists where appropriate (#8742)SmallJoker2019-08-24
* Fix compare between pointer and 0 in unittestsJozef Behran2019-08-13
* Optimize string (mis)handling (#8128)Jozef Behran2019-05-18
* Add Irrlicht-specific smart pointer (#6814)Vitaliy2019-04-12
* LINT fixLoïc Blot2019-02-15
* Fix Address::isLocalhost algorithmLoic Blot2019-02-09
* Use true pitch/yaw/roll rotations without loss of precision by pgimeno (#8019)Paul Ouellette2019-02-07
* Proselytize the network. Use IEEE F32 (#8030)SmallJoker2019-01-03
* Fix the part of the float test that requires IEC559/IEEE754 compliancePedro Gimeno2018-12-18
* Add an activeobject manager to hold active objects (#7939)Loïc Blot2018-12-13
* Network: Send IEEE floats (#7768)SmallJoker2018-12-13
* Add testWrapDegrees_0_360_v3f unittestsLoïc Blot2018-12-04
* Move client-specific files to 'src/client' (#7902)Quentin Bazin2018-11-28
* Fix temporary path crash in TestAuthDatabase (#7753)SmallJoker2018-09-28
* Replace auth.txt with SQLite auth database (#7279)Ben Deutsch2018-08-05
* Add a MSVC / Windows compatible snprintf function (#7353)nOOb31672018-07-22
* Revert 6587 - Optimize entity-entity collision (#7539)lhofhansl2018-07-08
* Server: move shutdown parts to a specific shutdown state object (#7437)Loïc Blot2018-06-13
* LINT fixLoic Blot2018-05-29
* Fix GameUI flag value regression introduced by a78659ed0529226ad937f5e241ad72...Loic Blot2018-05-29
* Fix i386 bit build at OpenBSD (#7259)mazocomp2018-04-21
* Add online content repositoryrubenwardy2018-04-19
* Fix various clang-tidy reported performance-type-promotion-in-math-fnLoïc Blot2018-04-03
* Optimize entity-entity collision (#6587)Vitaliy2018-04-03
* Fix many issues reported by clang-tidy (#7189)Loïc Blot2018-04-02
580/2, screensize.Y/2 - 300/2, screensize.X/2 + 580/2, screensize.Y/2 + 300/2 ); DesiredRect = rect; recalculateAbsolutePosition(false); v2s32 size = rect.getSize(); /* Add stuff */ { core::rect<s32> rect(0, 0, 300, 30); rect = rect + v2s32(size.X/2-300/2, size.Y/2-30/2-25); #if USE_FREETYPE gui::IGUIElement *e = (gui::IGUIElement *) new gui::intlGUIEditBox(text.c_str(), true, Environment, this, 256, rect); e->drop(); #else gui::IGUIElement *e = Environment->addEditBox(text.c_str(), rect, true, this, 256); #endif Environment->setFocus(e); irr::SEvent evt; evt.EventType = EET_KEY_INPUT_EVENT; evt.KeyInput.Key = KEY_END; evt.KeyInput.PressedDown = true; e->OnEvent(evt); } changeCtype(""); { core::rect<s32> rect(0, 0, 140, 30); rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25); wchar_t* text = wgettext("Proceed"); Environment->addButton(rect, this, 257, text); delete[] text; } changeCtype("C"); } void GUITextInputMenu::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(); } void GUITextInputMenu::acceptInput() { if(m_dest) { gui::IGUIElement *e = getElementFromId(256); if(e != NULL) { m_dest->gotText(e->getText()); } delete m_dest; m_dest = NULL; } } bool GUITextInputMenu::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) { 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<<"GUITextInputMenu: 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 257: acceptInput(); quitMenu(); // quitMenu deallocates menu return true; } } if(event.GUIEvent.EventType==gui::EGET_EDITBOX_ENTER) { switch(event.GUIEvent.Caller->getID()) { case 256: acceptInput(); quitMenu(); // quitMenu deallocates menu return true; } } } return Parent ? Parent->OnEvent(event) : false; }