Compare commits

...

1177 Commits

Author SHA1 Message Date
Nuno Gonçalves (Ulukyn) 7df9b2f255 Merge branch '58-add-rotz-roty-and-dist-reflect-lua-to-3dcamera-of-a-scene' into 'main/gingo-test'
Resolve "Add rotz roty and dist reflect lua to 3DCamera of a scene"

See merge request ryzom/ryzom-core!48
3 years ago
Nuno Gonçalves (Ulukyn) 8697553956 Resolve "Add rotz roty and dist reflect lua to 3DCamera of a scene" 3 years ago
nimetu d2508c8b15 Update hunter to 0.23.321 3 years ago
Nuno Gonçalves (Ulukyn) d385dedabc Merge branch '56-message-bubble-is-very-high-on-fh-alarm-plants' into 'main/gingo-test'
Resolve "Message bubble is very high on FH alarm plants"

See merge request ryzom/ryzom-core!45
3 years ago
Nuno Gonçalves (Ulukyn) ae33eb99bf Resolve "Message bubble is very high on FH alarm plants" 3 years ago
Nuno Gonçalves (Ulukyn) 2b88fd66ba Merge branch '46-rework-item-buff-icon-placement' into 'main/gingo-test'
Hide 1x quantity for equipable items, dynamic buff icon placement

See merge request ryzom/ryzom-core!43
3 years ago
Ben Saine be5bfd992c Hide 1x quantity for equipable items, dynamic buff icon placement 3 years ago
Nuno Gonçalves (Ulukyn) 9a24e7557f Merge branch '54-improve-the-way-to-reskin-ryzhome-items-and-preview' into 'main/gingo-test'
Resolve "Improve the way to reskin ryzhome items and preview"

See merge request ryzom/ryzom-core!44
3 years ago
Nuno Gonçalves (Ulukyn) 8708fd74c6 Resolve "Improve the way to reskin ryzhome items and preview" 3 years ago
Nuno db86219eab Added NL_NO_ASSERT to remove asserts in server 3 years ago
Nuno Gonçalves (Ulukyn) c6ec8a8d7d Merge branch '40-dragging-from-player-trade-to-inventory-takes-two-tries' into 'main/gingo-test'
Resolve "Dragging from player trade to inventory takes two tries"

See merge request ryzom/ryzom-core!39
3 years ago
Ben Saine 357934fcde Resolve "Dragging from player trade to inventory takes two tries" 3 years ago
Nuno Gonçalves (Ulukyn) e784c3aab1 Merge branch '37-remove-open-menu-option-from-scroll-items-when-item-use-a-scroll-label' into 'main/gingo-test'
Resolve "Remove Open menu option from scroll items when item use a Scroll.Label"

See merge request ryzom/ryzom-core!37
3 years ago
Nuno Gonçalves (Ulukyn) 22b4c074e8 Resolve "Remove Open menu option from scroll items when item use a Scroll.Label" 3 years ago
Nuno Gonçalves (Ulukyn) 255257a7f5 Merge branch '36-add-ability-to-have-translated-titles-with-untraslated-fields' into 'main/gingo-test'
Resolve "Add ability to have translated titles with untraslated fields"

See merge request ryzom/ryzom-core!36
3 years ago
Nuno Gonçalves (Ulukyn) 855410f3d0 Resolve "Add ability to have translated titles with untraslated fields" 3 years ago
Nuno Gonçalves (Ulukyn) 71a2c6f6e8 Merge branch '35-allow-drag-and-drop-between-zig-and-guild' into 'main/gingo-test'
Resolve "Allow drag and drop between zig and guild"

See merge request ryzom/ryzom-core!35
3 years ago
Ben Saine 3b2553e3dd Resolve "Allow drag and drop between zig and guild" 3 years ago
Nuno Gonçalves (Ulukyn) 54c7e09a10 Merge branch '21-fix-nopatch-without-argument-crash' into 'main/gingo-test'
Fix crash when --nopatch is used without argument

See merge request ryzom/ryzom-core!29
3 years ago
Meelis Mägi aebab35cad Fix crash when --nopatch is used without argument 3 years ago
Nuno Gonçalves (Ulukyn) 7cb6d4287e Merge branch '27-fixed-crash-with-html-image-downloads' into 'main/gingo-test'
Fixed cleanup of html downloads

See merge request ryzom/ryzom-core!25
3 years ago
Meelis Mägi 663de25cbe Fixed cleanup of html downloads 3 years ago
Nuno a7811f553e Merge branch '16-drag-drop-to-player-trade-window-from-all-inventories' into main/gingo-test 3 years ago
Nuno 743bf7f601 Merge remote-tracking branch 'origin/main/atys-live' into main/gingo-test 3 years ago
Nuno Gonçalves (Ulukyn) e891dddd1e Merge branch 'fix-area-effect-flying-text' into 'main/gingo-test'
Fix flying text for area magic/combat actions

See merge request ryzom/ryzom-core!19
3 years ago
Meelis Mägi e185ddc19f Fix flying text for area magic/combat actions 3 years ago
Nuno Gonçalves (Ulukyn) b12c7ac25c Merge branch 'add-screenshot-dir-to-config' into 'main/gingo-test'
Add ScreenShotDirectory entry to client.cfg

See merge request ryzom/ryzom-core!16
3 years ago
Meelis Mägi 9cff221a1e Add ScreenShotDirectory entry to client.cfg 3 years ago
Nuno Gonçalves (Ulukyn) 219bf0e066 Merge branch 'fix-viewtext-localized-text' into 'main/gingo-test'
Fix CViewText always returning localization key

See merge request ryzom/ryzom-core!34
3 years ago
Meelis Mägi c012e7ffcf Fix CViewText always returning localization key 3 years ago
Ben Saine 82b724fe88 Resolve "Encoding issues in client beta (after core4 merge)" 3 years ago
Nuno Gonçalves (Ulukyn) 9f2d2e7dda Merge branch '26-encoding-issues-in-client-beta-after-core4-merge' into 'main/gingo-test'
Resolve "Encoding issues in client beta (after core4 merge)"

See merge request ryzom/ryzom-core!33
3 years ago
Ben Saine 5df8ec43a0 Resolve "Encoding issues in client beta (after core4 merge)" 3 years ago
Nimetu 7c82f26bac Fix CViewText always returning localization key 3 years ago
Nimetu 3521d2d02e Fix macOS build, missing include 3 years ago
Nuno 88280ef02f Merge remote-tracking branch 'origin/main/atys-live' into main/atys-live 3 years ago
Nimetu 7344c98e6e Add macOS to azure pipeline 3 years ago
Nimetu 005e714f7d Add macOS to azure pipeline 3 years ago
Nimetu 37abc25dcb Add ubuntu-18.04 hunter image to azure pipeline 3 years ago
kaetemi ec41ba753f Download with aria2 instead and enable the DX drivers 3 years ago
kaetemi 63b4ea547a Download and extract DX SDK 3 years ago
Nimetu c31747a939 Add windows-2019 to azure pipeline 3 years ago
Nimetu 8aa1aed3bd Use Windows SDK if DirectX SDK not installed 3 years ago
Nimetu 19c5b582bc Fix linking with static OpenAL under windows 3 years ago
Nuno 993d749dba Use Hunter package manager to compile external libraries 3 years ago
Nimetu f6ac9bc4c1 Fix moving fullscreen window between monitors 3 years ago
Nuno Gonçalves (Ulukyn) 9e3064871a Merge branch 'fix-fullscreen-window-move' into 'main/gingo-test'
Fix moving fullscreen window between monitors

See merge request ryzom/ryzom-core!32
3 years ago
Nimetu 36e83e32f4 Fix moving fullscreen window between monitors 3 years ago
Nuno 0df3879358 Reapply changes reverted into atys-live because bad merge 3 years ago
Nuno b7e5ac18e9 Merge branch 'main/atys-live' into main/gingo-test 3 years ago
Nuno Gonçalves (Ulukyn) 80623a20cc Merge branch '31-wrong-fullscreen-resolution-in-opengl-win' into 'main/gingo-test'
Fix initial fullscreen window on OpenGL/Windows

See merge request ryzom/ryzom-core!31
3 years ago
Nuno Gonçalves (Ulukyn) efbceec12e Merge branch '31-wrong-fullscreen-resolution-in-opengl-win' into 'main/gingo-test'
Fix initial fullscreen window on OpenGL/Windows

See merge request ryzom/ryzom-core!31
3 years ago
Nimetu 013aad73d2 Fix initial fullscreen window on OpenGL/Windows 3 years ago
Nuno de638dfe6c Remove fmod option 3 years ago
Nuno 177e2395a5 Revert "Merge branch '32-remove-fmod-option-not-used-or-client-crash' into main/atys-live"
This reverts commit 0e2ec103ab.
3 years ago
Nuno 0e2ec103ab Merge branch '32-remove-fmod-option-not-used-or-client-crash' into main/atys-live 3 years ago
Nuno 574efe0c36 Remove fmod option 3 years ago
Nuno e43515e88a Fix generate_module_interface.xslt used to server shard_unifier_service/nel_database_mapping.xml file 3 years ago
Nuno 41794a1122 Merge branch 'main/atys-pre-live' into main/atys-live 3 years ago
Nimetu c47db9bf94 Fix utf8 encoding on sphrase info window 3 years ago
Nimetu b325126b20 Fixed cleanup of html downloads 3 years ago
Nuno 35a7a6628b Adde default value to _HeadPitch. Change bounds 3 years ago
Nimetu aa34e88101 Fix crash when --nopatch is used without argument 3 years ago
Nuno b667ccb6b6 Merge branch 'fixes' into main/atys-pre-live 3 years ago
Nuno Gonçalves (Ulukyn) 568d8ab895 Merge branch '28-add-command-to-switch-small-full-map' into 'main/gingo-test'
Resolve "Add command to switch small/full map"

See merge request ryzom/ryzom-core!26
3 years ago
Nuno Gonçalves (Ulukyn) 7f01b21d11 Merge branch '29-fix-camera-vertical-rotation-prevent-see-under-the-char' into 'main/gingo-test'
Resolve "Fix camera vertical rotation (prevent see under the char)"

See merge request ryzom/ryzom-core!27
3 years ago
Nuno Gonçalves (Ulukyn) d436d5616a Merge branch 'modify-item-buff-icons' into 'main/gingo-test'
Fix item buff icon overlapping with quantity

See merge request ryzom/ryzom-core!22
3 years ago
Nuno Gonçalves (Ulukyn) 973e183f2e Merge branch 'add-craftplan-buffs-to-craft-interface' into 'main/gingo-test'
Add craftplan buffs to crafting interface

See merge request ryzom/ryzom-core!23
3 years ago
Nuno 5c56c87d09 Adde default value to _HeadPitch. Change bounds 3 years ago
Nuno c616010246 Remove nlerror in getCurrentWindowUnder (useless)
Add debug when lua error
3 years ago
Nuno 700a9aadb7 Add command to switch small/full map 3 years ago
Nuno Gonçalves (Ulukyn) a246f3e5d0 Merge branch '26-encoding-issues-in-client-beta-after-core4-merge' into 'main/gingo-test'
Resolve "Encoding issues in client beta (after core4 merge)"

See merge request ryzom/ryzom-core!24
3 years ago
Meelis Mägi bbc291b9d3 Resolve "Encoding issues in client beta (after core4 merge)" 3 years ago
Nuno Gonçalves (Ulukyn) a64981a92a Merge branch '25-remove-lock-option-from-item-menu-in-guild-inventory' into 'main/gingo-test'
Resolve "Remove lock option from item menu in guild inventory"

See merge request ryzom/ryzom-core!21
3 years ago
Nuno Gonçalves (Ulukyn) 17c9dd061a Resolve "Remove lock option from item menu in guild inventory" 3 years ago
Ben Saine b72a71e87c Revert "add: sorting (initial draft)"
This reverts commit b4ce38099f
3 years ago
bensaine b4ce38099f add: sorting (initial draft) 3 years ago
Nimetu 9eaf7d3550 Add craftplan buffs to crafting interface 3 years ago
Nimetu 26827d2c66 Fix item buff icon overlapping with quantity 3 years ago
Nuno Gonçalves (Ulukyn) b6781af51e Merge branch 'inventory-fixes' into 'main/gingo-test'
Inventory fixes

See merge request ryzom/ryzom-core!12
3 years ago
Nuno Gonçalves (Ulukyn) e1b611f219 Inventory fixes 3 years ago
Nuno Gonçalves (Ulukyn) 8d7932a271 Merge branch 'self-kill' into 'main/gingo-test'
Merge selfkill

See merge request ryzom/ryzom-core!13
3 years ago
Nuno Gonçalves (Ulukyn) 0cc7a35dad Merge selfkill 3 years ago
Nuno 2304445c39 Remove bad commit (core4 path will be used in a next merge) 3 years ago
Ulu Kyn 701d7309e5 Revert "Merge ryzom-data into ryzom-core"
This reverts commit f3d0c9dc5b.
3 years ago
Ulu Kyn f3d0c9dc5b Merge ryzom-data into ryzom-core 3 years ago
Ulu Kyn a71f022c1a Merge ryzom-data into ryzom-core 3 years ago
Nuno cc3d42737e Merge branch 'fixes' into main/gingo-test 3 years ago
Nuno 1e590f1a69 Remove CPath::memoryCompress() because break CPath::lockup() 3 years ago
Nuno f450b57be0 Merge branch '6-resolve-show-lock-status-of-items-in-room-and-guild' into main/yubo-dev 3 years ago
Nuno fbb343ad51 Added resal_flag to databases 3 years ago
bensaine e1527b724b fix: typo 3 years ago
bensaine c3a633ae50 add: srcInvIndex 3 years ago
Nuno a76e8e1a64 Merge branch 'fixes' into main/gingo-test 3 years ago
Nuno 2df441225c Add RYZOM_PRODUCT_VERSION 3 years ago
Nuno 56cbc51005 Merge branch 'fixes' into main/gingo-test 3 years ago
Nuno 7ce53abffe Missing serialization (client can't load the icfg) 3 years ago
Nuno 4c4028822e Missing serialization (client can't load the icfg) 3 years ago
Nuno b4323b6515 Missing serialization (client can't load the icfg) 3 years ago
Nuno 9923062417 Merge branch 'main/gingo-test' into fixes 3 years ago
Nuno 8f74ba7851 Merge branch 'feature/develop-atys' into main/gingo-test 3 years ago
Nuno d6f367b2ba Merge remote-tracking branch 'origin/2-rework-player-trade-window' into main/yubo-dev 3 years ago
Nuno 3f5c3c5d98 Merge remote-tracking branch 'origin/2-rework-player-trade-window' into main/yubo-dev 3 years ago
Nuno 514f4613a8 Remove CPath::memoryCompress() because break CPath::lockup() 3 years ago
Ben Saine 24b0c99034 add: change slot # 3 years ago
Nuno 3dc2aa1bb6 Merge remote-tracking branch 'origin/self-kill' into main/yubo-dev 3 years ago
Nuno 543be4bc4c Merge branch 'translations' 3 years ago
Nuno 80007bc602 Merge branch 'translations' into yubo 3 years ago
Nuno cf9855a6d5 Merge branch 'fixes' into yubo 3 years ago
Nuno bec18c661d Merge branch 'fixes' 3 years ago
Nimetu 13eef096b4 Merge branch 'develop' into develop-atys 3 years ago
Nimetu d8deff3f23 Linux multi-monitor fullscreen support 3 years ago
Nimetu 2efc16ce52 Use configured resolution for login/outgame/ingame 3 years ago
Nimetu 5064f0417b Fix UI restore when window is resized while in loading screen 3 years ago
Nimetu d893d15daf Remove loading certs from native Windows cert store. 3 years ago
kaetemi 82ef7e5e81 Fix for MySQL 8 client lib support 3 years ago
kaetemi 8f839dc9c7 Properly follow StartupVerify setting 3 years ago
kaetemi 5fcaafbc60 Show more useful error on login failure 3 years ago
kaetemi 6d60cfee71 Stop sound when patching sound bnp 3 years ago
kaetemi 3076b62063 Fix build when using ValyriaTear/luabind (on Ubuntu) 3 years ago
kaetemi 3d208e024d Improve c++0x check 3 years ago
kaetemi af16f09d52 Ubuntu 16.04 is EOL 3 years ago
kaetemi b9d4aa2abd Add Ubuntu 20.04 target to Azure Pipelines configuration 3 years ago
Nimetu 759ece01d0 Merge branch 'atys' into develop-atys 3 years ago
Nuno 4a06fe15dd Merge branch 'master' into fixes 3 years ago
Nuno 575d5d9957 Merge branch 'fixes' into atys 3 years ago
Nuno 0d68ca05e2 Revert xml_macros 3 years ago
Nuno 6091e76516 Merge branch 'atys' into fixes 3 years ago
Nuno 0fbbf10361 Merge branch 'fixes' into atys 3 years ago
Nuno 557f5d3d6c Changes made after code-to-root-atys branch 3 years ago
Nuno d7d1bc60c2 Changes from Core 3 years ago
Nuno 3709ea4520 Revert All core changes (to be reapplied on next commit) 3 years ago
Nuno 70286d36a9 Remove unwanted files 3 years ago
Ulu Kyn 92ff9f12b0 Move to root 3 years ago
Nimetu 8cbb306db8 Remove loading certs from native Windows cert store. 3 years ago
Nuno 36c2ff5b86 Remove files in code 3 years ago
Nuno 1a49c4cd0b Merge branch 'atys' into fixes 3 years ago
Ben Saine 111d4a7a0a self kill command 3 years ago
bensaine 6cfc9585f5 Update .gitignore 3 years ago
Nimetu f76ad7a3eb Remove loading certs from native Windows cert store. 3 years ago
Nimetu ce0d1234cc Add missing WITH_FFMPEG option 3 years ago
Nuno Gonçalves (Ulukyn) 5d91c33ddd Merge branch 'master' into translations 3 years ago
Nimetu 78478e32cd Merge branch 'develop' into develop-atys 3 years ago
Nimetu ea6e4d91c3 Html special chars for title/textarea tags should remain decoded 3 years ago
Nimetu d388ff78ec Merge branch 'develop' into develop-atys 3 years ago
Nimetu 0b503e352b Fix htmlEscape function from deadlocking 3 years ago
Nimetu df4833bf0f Update gitignore 3 years ago
Nuno Gonçalves (Ulukyn) 8ef89b80b0 Fix resell issue (use uint16 instead of uint8 for Index) 3 years ago
Nuno Gonçalves (Ulukyn) bdea7d24d2 Fix resell issue (use uint16 instead of uint8 for Index) 3 years ago
Nuno Gonçalves (Ulukyn) 90161cd121 Fix resell issue (use uint16 instead of uint8 for Index) 3 years ago
Nuno Gonçalves (Ulukyn) 583a16d126 Merge remote-tracking branch 'origin/feature/develop-atys' into fixes 3 years ago
Nimetu 591ea6869e Remove shortcut to moveToAction().
sendExecuteToServer() will be called before clientExecute() and that
will cause "stuck stanza" client side when server rejects the action.
Reproducible with forage stanza with material specialization.
3 years ago
Nuno Gonçalves (Ulukyn) 01a2508567 Merge branch 'silan_refactoring' into yubo 3 years ago
Nuno Gonçalves (Ulukyn) b86b9283b2 Merge branch 'master' into silan_refactoring 3 years ago
Nimetu 0225beefa6 Merge branch 'develop' into develop-atys 3 years ago
Nimetu 0de1580520 Fix background overflow on items limited with maxw/maxh 3 years ago
Nimetu d9dd9863b7 Merge branch 'develop' into develop-atys 3 years ago
Ulukyn 7bed39665e Updated visual_slot.tab 3 years ago
Nimetu 9ecda65791 Fix table td background color inheriting from row 3 years ago
Nimetu fc6ecc7dbd Fix html,body background not using container opacity 3 years ago
Nimetu 5c53148907 Fix downloaded background images not showing 3 years ago
Nimetu 028f6cdd3e Add -ryzom-modulate-text-color to separate text from background, ryzom/ryzomcore#644 3 years ago
Nuno 6a1ea5ff59 Merge branch 'master' into yubo 3 years ago
Nuno Gonçalves (Ulukyn) 72ccfc9a02 Update from core4 branch 3 years ago
Ulukyn 0e2a14c822 Updated visual_slot.tab 3 years ago
Nimetu a4248d5fa1 Merge branch 'atys' into develop-atys 3 years ago
Nimetu 984b2b3590 Merge branch 'develop' into develop-atys 3 years ago
Nimetu 3f3991816b Fix missing css length type 3 years ago
Nimetu e0d54f7897 Draw table background/border using css renderers 3 years ago
Nimetu 37eec8cd7f Dotted/dashed border styles 3 years ago
Nimetu 2046c4bf6e Draw browser background with CSSBackgroundRenderer 3 years ago
Nimetu 12c515c264 Parse background style into own class 3 years ago
Nimetu 285cfb163f Fix possible deadlock in css content attribute 3 years ago
Nimetu a40ddf7955 Methods to preallocate texture id and swap texture for existing id 3 years ago
Nimetu dff191a7c2 Move loading texture from file/memory into own functions 3 years ago
Nimetu f26dc534c8 Split CDataDownload into subclasses 3 years ago
Nimetu dfe45029ab Add CSSLength, CSSBackground, CSSBackgroundRenderer classes 3 years ago
Nimetu 65edd9f95d Draw double/groove/ridge border styles 3 years ago
Nuno 4331e35227 Added build scripts for windows client and 3dsmax plugin 3 years ago
Nuno Gonçalves (Ulukyn) ce5817721a Merge branch 'fixes' into atys 3 years ago
Nuno Gonçalves (Ulukyn) aae899b65a Fix string to ucstring 3 years ago
Nimetu 487f9f060e Fix css rule declaration splitting 3 years ago
Nimetu 2e816ddf6e Add "transparent" to html color list 3 years ago
Nimetu 5d4a04169b Update getCssLength for new types, enable reading negative values. 3 years ago
Nimetu b2ec03d1a1 Fix background shorthand for -position and -clip 3 years ago
Nimetu 234465387b Fix getCssLength returning false for '0' 3 years ago
Nimetu 2133f6d2b7 Fixed bad type for _RenderLayer 3 years ago
Nimetu 63f1fb73dd Fix table background color and image draw order 3 years ago
Nimetu a040f7a2a8 CSS background color should not inherit its value 3 years ago
Nimetu 565932c18d Expand css margin shorthand 3 years ago
Nimetu cade609a3a Fix textarea not preserving linebreaks, keep tab char 3 years ago
Nimetu 093702a704 Fix web link in item customtext being visible 3 years ago
Nuno Gonçalves (Ulukyn) 4c66865de7 Merge branch 'fixes' into atys 3 years ago
Nimetu c00a9be398 Fix web link in item customtext being visible 3 years ago
Nuno Gonçalves (Ulukyn) 458861951b Merge branch 'fixes' into atys 3 years ago
Nuno Gonçalves (Ulukyn) 3f991d3781 Remove useless nlassert, just skip 3 years ago
Nuno Gonçalves (Ulukyn) 8d5c0facf8 Merge branch 'fixes' into atys 3 years ago
Nuno Gonçalves (Ulukyn) 178a22d961 Skip auto-select of char when player is reselecting char 3 years ago
Nuno Gonçalves (Ulukyn) f9dafe720c Merge branch 'rewards' 3 years ago
Nuno Gonçalves (Ulukyn) 72691a3379 Merge branch 'rewards' into yubo 3 years ago
Nuno Gonçalves (Ulukyn) bc991c8146 Merge branch 'master' into rewards 3 years ago
Riasan 62a821bc1d Changed: modify atys account urls 3 years ago
Riasan 103179ece7 Changed: modify account urls on client_default_cfg , allow read account manage url from client_default_cfg 3 years ago
Nimetu 19d0162332 Fix possible crash from unset variable 3 years ago
Nimetu 5bf139f690 Fix css rule declaration splitting 3 years ago
Nimetu d0d38238a8 Fix crash on reading background shorthand with single value 3 years ago
Nimetu 95716b65ca Fix comparing x twice in Direct3d setupScissor 3 years ago
Nimetu 75f490d394 Fix comparing same variable twice in CRingAccess 3 years ago
Nuno 64bff20e03 Merge branch 'silan_refactoring' into yubo 3 years ago
Nuno 1eb651a946 Merge branch 'master' into silan_refactoring 3 years ago
Nuno 7da7d8cbbe Merge branch 'interface_textures' into yubo 3 years ago
Nuno 0ee26a6488 Merge branch 'master' into interface_textures 3 years ago
Nuno 9e404a5965 Merge branch 'deco_objects' into yubo 3 years ago
Nuno 97099768dc Merge branch 'master' into deco_objects 3 years ago
kaetemi 7d1661df42
Merge branch 'develop' into feature/develop-atys 3 years ago
kaetemi 19a0d929bb
Exclude commits from attribution 3 years ago
Nuno a443848924 Merge branch 'rewards' into yubo 3 years ago
Nuno ca0dc24aa0 Merge branch 'rewards' 3 years ago
Nuno 6d68e96dd4 Merge branch 'master' into rewards 3 years ago
kaetemi 0c5f4cdc1a
Implement NLNET sleepUntilDataAvailable for Win32 build 3 years ago
kaetemi 8a7e96f7a6
Fix crash with bad `parts[next]` index 3 years ago
kaetemi a227dccbb8
Fix PHP setup script 4 years ago
kaetemi 6d4b58c281
Update GPL headers 4 years ago
kaetemi fcf97d93df
Merge remote-tracking branch 'ryzomcore/develop' into feature/develop-atys 4 years ago
kaetemi c5658cfe26
Merge remote-tracking branch 'ryzomcore/merge-into-atys' into feature/develop-atys 4 years ago
Nimetu bc0071ac57
Fix issue with single enchant icon on jewels not showing 4 years ago
kaetemi 37a729b5cc
Merge remote-tracking branch 'ryzomcore/atys' into feature/develop-atys
# Conflicts:
#	code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp
4 years ago
Nuno Gonçalves (Ulukyn) efc1883cca Move files to root 4 years ago
Nuno 83a021e1e6 Merge branch 'master' into translations 4 years ago
kaetemi 9d303b2a9a
Preload data in dev client as well, ref kaetemi/ryzomclassic#168 4 years ago
Nuno 58b5941bbe
Flag to use preset folders 4 years ago
Nuno 431b1ea339 Merge branch 'atys' into atys-live 4 years ago
kaetemi c70ca1f8ab
Update GPL headers 4 years ago
Nuno 6c3d6403b0 Merge branch 'atys' into merge-into-atys 4 years ago
Nuno 405974c9c0 Merge remote-tracking branch 'origin/fixes' into atys 4 years ago
kaetemi bb03f80d84
Remove dead code, ref kaetemi/ryzomclassic#93 4 years ago
kaetemi c6f8baa058
Use streaming vertex buffer for animating regular skinned meshes, writing to a read locked and shared vertex buffer is illegal, fix kaetemi/ryzomclassic#93 4 years ago
kaetemi 2c167fb360
Don't apply skin color to weapons in info preview, caused by conflicting naming of lead weapon textures, fix ryzomclassic/issues#201 4 years ago
kaetemi b9bdabd1f0
Add missing path to georges config 4 years ago
kaetemi d4a3a5bc06
Weld vertices 4 years ago
kaetemi cdc2cacfc0
Fixup shape2obj 4 years ago
kaetemi c5ed59638e
Add missing lookup entries to object viewer config 4 years ago
kaetemi 85ec6e618e
Fix build on vs2008 4 years ago
kaetemi 1aba4c13cb
Reduce audio log when switching between looping and streaming source 4 years ago
kaetemi 56d747fa02
Merge remote-tracking branch 'ryzomcore/develop' into develop 4 years ago
Nuno cc5bd3ddae Merge branch 'interface_textures' into yubo 4 years ago
Nuno 5613eb855e Remove useless visual_slot.tab 4 years ago
Nimetu 5614028f63 Fix bad merge 4 years ago
Nimetu a28bda89e6 Fix issue with single enchant icon on jewels not showing 4 years ago
Nimetu b2d6c313db Merge branch 'develop' into develop-atys 4 years ago
Nuno 74c643f147 Merge branch 'ark' into yubo 4 years ago
Nuno 3d43c3c626 Merge branch 'ark' 4 years ago
Nimetu 78fa873003 Merge branch 'atys' into develop-atys 4 years ago
Nimetu 96a03d1cf5 Changed: Preserve icon text case as is 4 years ago
Nimetu 52e0e71c4a Simple html/css test tool 4 years ago
Nimetu 3b91146d23 Changed: Allow to use 2x/4x hi-res texture atlas for GUI elements 4 years ago
Nimetu 474802810b Fixed throw(type) deprecated in C++11 warning 4 years ago
Nuno 6bd853f7bf Merge branch 'master' into ark 4 years ago
Nuno 49b4295765 Merge remote-tracking branch 'origin/fixes' into atys 4 years ago
Nimetu 1e465b6cff Show reload link when curl fails to open connection to website 4 years ago
Nimetu 5abdccfd63 Inherit -ryzom-modulate-bgcolor in table/td 4 years ago
Nimetu a7bc98b0b4 Fix mission give item window sometimes not appearing. 4 years ago
Nimetu 825d70a80e Minor refactor 4 years ago
Nimetu acd12c7c37 Add initial support for centered multiline text in table 4 years ago
Nimetu aaa699014e Ignore any tags inside title, textarea elements. 4 years ago
Nimetu 624d78fe1a Methods to serialize CHtmlElement back to string 4 years ago
Nimetu f8d498e4b2 Minor refactor 4 years ago
Nimetu cd4914ab94 Cleanup CGroupHTML old properties 4 years ago
Nimetu 3362afaa4d Fix mission give item window sometimes not appearing. 4 years ago
Nuno c5b34c927e Merge tag 'live/871' into atys-live 4 years ago
Nuno fa3eab3305 Merge branch 'storyline/s2e0' into atys 4 years ago
Nuno 7d1534fb31 Fix bad commit 4 years ago
Nuno 791eb639df Merge branch 'atys' into storyline/s2e0 4 years ago
Nuno 772990d421 Added missing check when get node 4 years ago
Nuno c8fd716f8a Added #include <sys/sysctl.h> for Mac 4 years ago
Nuno 72f7cbe4fa Merge branch 'rewards' into yubo 4 years ago
Nuno 9d2fc8c630 Merge branch 'rewards' 4 years ago
Nuno b4e54d5ad4 Merge branch 'master' into rewards 4 years ago
Nuno 904daebd88 Merge branch 'ryzom/ark/features' into atys 4 years ago
Nuno 9c996b5fe3 Added getTimestampHuman, isShiftDown and isCtrlDown.
Improved getMouseDown getMouseMiddleDown and getMouseRightDown
4 years ago
Nuno 7964a42927 Merge branch 'atys' into ryzom/ark/features 4 years ago
Nuno 24cb13d744 Merge branch 'feature/bonusmalus-timers' into atys 4 years ago
Nuno c8f4a85f0c Merge branch 'translation-settings-improvements' into atys 4 years ago
Nuno 7bd936ea24 Merge branch 'atys' into fixes 4 years ago
Nuno 4bcea9a70e Merge branch 'fixes' into atys 4 years ago
Nuno 762e3b603e -ryzom-modulate-bgcolor can be false 4 years ago
Nuno 292e142319 Merge branch 'fixes' into atys 4 years ago
Nuno cdb1786018 Remove useless #include <sys/sysctl.h> 4 years ago
Nimetu 1299484163 Fix uninitialized value 4 years ago
Nimetu 668e15e394 Add initial support for centered multiline text in table 4 years ago
Sit Melai cdf1bacee1 Added checks if the DB leafs aren't present 4 years ago
Nuno 1ec4f88471 Added check if node are null 4 years ago
Sit Melai 673ce18e72 Fix crash if bubble message isn't translated 4 years ago
Nuno 54fd022501 Merge branch 'silan_refactoring' into yubo 4 years ago
Nuno 5fe26ec6d6 Merge branch 'new_interface_features' 4 years ago
Nuno 40a9e782c3 Merge branch 'new_interface_features' into yubo 4 years ago
Nuno 155e268ece Merge branch 'master' into new_interface_features 4 years ago
Nuno 649527039b Merge branch 'ryzom/op_refactoring' into atys 4 years ago
Nuno d350b1621d Merge branch 'translations' 4 years ago
Nuno 22bab29654 Merge branch 'translations' into yubo 4 years ago
Nuno 5632fffa44 Merge branch 'me-translations' into translations 4 years ago
Nuno 1cc000cc6c Merge branch 'translations' into me-translations 4 years ago
Nuno e9b7345ba5 Update GvE outpost options 4 years ago
Nuno 6f4319bfcb Merge branch 'translations' into yubo 4 years ago
Nuno ab958d1891 Merge branch 'master' into translations 4 years ago
Nuno c3c7e15c81 Merge branch 'master' into new_interface_features 4 years ago
Nuno 568a7a10a9 Merge branch 'new_interface_features' 4 years ago
Nuno f886d5eac7 Merge branch 'new_interface_features' into yubo 4 years ago
Nuno 540ab1ffc8 Fixed issue with families 4 years ago
Nuno 629e8f5272 Added Gen and Mar OP mats 4 years ago
Nuno 868f462d5f Added Gen and Mar OP mats 4 years ago
Nuno 5a7d067a71 Added Gen and Mar OP mats 4 years ago
Nuno 17f818eace Added GvE option 4 years ago
Nuno 5825332757 Merge branch 'atys' into ryzom/op_refactoring 4 years ago
Nimetu c1170a0a4d Ignore last linebreak in pre tag 4 years ago
Nimetu 291d332b56 Fix css style order when using external css files 4 years ago
Nimetu d8f54820c4 Ignore first linebreak after pre, textarea open tag 4 years ago
Nimetu 155418b20b Fix temp file collision and image update on http/304 response 4 years ago
Nimetu d665e1fc45 Fix detecting jpg image 4 years ago
Nimetu 36f9888b91 Merge branch 'atys' into develop-atys 4 years ago
Nimetu 17782d5d21 Merge branch 'develop' into develop-atys 4 years ago
Nimetu 8f1db24504 Fix detecting jpg image 4 years ago
Nuno 85e788da81 Merge branch 'master' into new_interface_features 4 years ago
Nimetu 04b4ae5333 Ignore last linebreak in pre tag 4 years ago
Nimetu cc44eaf935 Ignore first linebreak after pre, textarea open tag 4 years ago
Nimetu e1e7bd837c Fix temp file collision and image update on http/304 response 4 years ago
Nimetu e5c0c63e3e Draw tab char as space 4 years ago
Nimetu dbc77c7fc0 Update gitignore 4 years ago
Nimetu db7afb07bd Fix parsing css selectors with commas 4 years ago
Nimetu 95cacf75a6 Add css :lang selector 4 years ago
Nimetu 92eb1dcdc7 Forward declare xmlNode 4 years ago
Nimetu 89a921e140 Function to get html element lang value 4 years ago
Nimetu 87e88cee6f Initial support for css var() function 4 years ago
Nimetu 36d482e6d1 Fixed parsing of css unversal (*) selector 4 years ago
Nimetu 4505ecf8a2 Revert "Add missing PowerRoot effect families to sheetid conversions table."
This reverts commit ff9aa6c608.
4 years ago
Nimetu 2f5b4d7c5b Add custom formatter for regen text 4 years ago
Nimetu 27826eb448 Show bonus/malus timer text if available 4 years ago
Nimetu d210c23b26 Add xml options for icon regen text 4 years ago
Nimetu 9262302baa Add macros to read properties from xmlNode 4 years ago
Nuno 54de87acf4 Merge branch 'fixes' into atys 4 years ago
Nuno ebab993e3e Merge branch 'ryzom/ui/improvements' into atys 4 years ago
Nuno 3613dfd305 Merge branch 'storyline/s2e0' into atys 4 years ago
Nuno c09f82db16 Added boost icons 4 years ago
Nuno 6402a31e4e Added boost allegories family 4 years ago
Nuno 27cdcf1e02 Merge branch 'atys' into storyline/s2e0 4 years ago
Nuno de90245f27 Added GvE and GvG to TPVPType enum 4 years ago
Nuno bf2f8e39a5 Added nopatch arg for use with Ryztart 4 years ago
Nimetu 26482eef1b Revert "Add missing PowerRoot effect families to sheetid conversions table."
This reverts commit ff9aa6c608.
4 years ago
Nimetu 383e362ed7 Show bonus/malus timer text if available 4 years ago
Nimetu c09ed63120 Add xml options for icon regen text 4 years ago
Nimetu fdb271bdb3 Add macros to read properties from xmlNode 4 years ago
kaetemi dba92deea5 Avoid useless string operations 4 years ago
Nuno 0fb9422426 Merge branch 'master' into translations 4 years ago
kaetemi 2528e542cb Don't probe if normal received in probe state, otherwise server will not enter probe state, ryzom/ryzomcore#622, ryzom/ryzomcore#133 4 years ago
kaetemi 719f178f70 Disconnect if UDP Login fails, ryzom/ryzomcore#622 4 years ago
Riasan f83d8a206e Merge branch 'atys' of gitlab.com:ryzom/ryzom-core into atys 4 years ago
Riasan 8cd863ff44 Added: new privs TESTER for teleport via Map / Command 4 years ago
Nuno 89065eee3f Merge branch 'me-translations' 4 years ago
Sit Melai 91b3ff25b4 Add disabling of translation per channel 4 years ago
Nimetu 4bcf9270eb Show reload link when curl fails to open connection to website 4 years ago
Sit Melai c75071b488 Handle hiding the flag and inversing translations for each language 4 years ago
Nimetu 04a5aa372b Merge branch 'develop' into develop-atys 4 years ago
Nimetu 65415dfc55 Fixed infinite loop crash from string comparison 4 years ago
Nimetu 29ef76e537 utf-8 fixes, ryzom/ryzomcore#335 4 years ago
Nimetu 040eee5c9e Merge branch 'atys' into develop-atys 4 years ago
Nimetu c6ede4a8b4 Merge branch 'develop' into develop-atys 4 years ago
Nuno adf9a646b7 Merge branch 'ryzom/ui/improvements' into atys 4 years ago
Nuno 2aaa928cdc Fixed potential security hole 4 years ago
Nuno 83d0e600f1 Merge branch 'ryzom/ui/improvements' into atys 4 years ago
Nuno df69a1706f Fixed potential security hole 4 years ago
Nuno 6651e839f3 Merge branch 'translations' into me-translations 4 years ago
Nuno 62be2ab1fb Merge branch 'stline/s2e1' 4 years ago
Nuno 8c62f4e64c Merge branch 'master' into stline/s2e1 4 years ago
Nuno 2075bf7443 Merge branch 'translations' 4 years ago
Nuno 44caf59afd Merge branch 'master' into translations 4 years ago
Nuno 057cf828f4 Merge branch 'translations' 4 years ago
Nuno 8d2071524c Merge branch 'master' into translations 4 years ago
Nuno 6db93a0ef0 Merge branch 'ryzom/ui/improvements' into atys 4 years ago
Nuno f61d10c75e Added executeRyzomScript, executeTutorial and processTutorialEvent lua callbacks 4 years ago
Nuno 90728f372a Merge branch 'feature/hires-textures' into atys 4 years ago
Nuno 8fa5de61e3 Merge branch 'fixes' into atys 4 years ago
Nuno 74dbe1e52c Merge branch 'ryzom/ui/improvements' into atys 4 years ago
Nuno 6adf44f0b0 Merge branch 'fx' into atys 4 years ago
Nuno 98124a3bd5 Merge branch 'deco_objects' 4 years ago
Nuno 46ecaac095 Merge branch 'master' into deco_objects 4 years ago
Nuno 06e2840be5 Merge branch 'new_interface_features' 4 years ago
Nuno bbabe75247 Merge branch 'master' into new_interface_features 4 years ago
Nuno b62ddc49d2 Merge branch 'interface_textures' 4 years ago
Nuno 690286b2c4 Merge branch 'master' into interface_textures 4 years ago
Nuno ada7dec7d3 Merge branch 'stline/s2e1' 4 years ago
Nuno 98b091ab63 Added TeleportMarauder 4 years ago
Nuno 53252d40db Merge branch 'new_interface_features' into yubo 4 years ago
Nuno 2b648934ea Merge branch 'master' into new_interface_features 4 years ago
Nuno 46c7b0309d Added icons to broadcast 4 years ago
Nuno 347ed4b2fb Merge remote-tracking branch 'origin/ryzom/ui/improvements' into ryzom/ui/improvements 4 years ago
Nuno b9d29d5cfe Merge branch 'atys' into ryzom/ui/improvements 4 years ago
Nuno ea212bcba2 Merge branch 'stline/s2e1' into yubo 4 years ago
Nuno 281ec4ba60 Merge branch 'master' into stline/s2e1 4 years ago
Nuno 951f000be4 Keep missions window open when player accept one of them 4 years ago
Nuno 4726e74dcd Added marauder to static fames 4 years ago
Nuno c5fffb9ff0 Merge branch 'atys' into fixes 4 years ago
Nuno ae9989dfe4 Updated default textures in client 4 years ago
Nuno d35ae0db80 Merge branch 'ark' into yubo 4 years ago
Nuno 3dbdbad80a Merge branch 'master' into ark 4 years ago
Riasan 0a81f40606 Fixed: Typo 4 years ago
kaetemi 00037b3644 Apply elevation to ig_static_other 4 years ago
Nuno c63b21150e Merge branch 'atys' into feature/hires-textures 4 years ago
Nuno 9771d79bc3 Fixed bad conversion in getPlayerVp*Hex and getTargetVp*Hex 4 years ago
kaetemi ea1b3dbc28 Without extending coords, expect an additional 1px to align 4 years ago
kaetemi 93ad5e469c Ignore broken zone 4 years ago
kaetemi b6b05b595a Make heightmap bitmap coordinates stable between map extensions 4 years ago
kaetemi 46410206ad Weld borders again after elevation, for bindings 4 years ago
Nimetu b70573d1dc Merge branch 'atys' into develop-atys 4 years ago
Nimetu 7111cf44b3 Merge branch 'develop' into develop-atys 4 years ago
Nimetu cb77552121 Remove file from bad merge 4 years ago
Nuno 2bf8faf29e Fixed bad check of args 4 years ago
Nuno b984e2e3d8 Missing definition of getSheetShape 4 years ago
Nuno 140c380eb5 Merge branch 'ryzom/ark/features' into atys 4 years ago
Nuno 1225fc0fe8 Added onover options for createArkPointButton in map 4 years ago
Nuno 13cb05c732 Merge branch 'atys' into ryzom/ark/features 4 years ago
Nimetu f39038f98d Change glyph cache to map lookup, ryzom/ryzomcore#626 4 years ago
Nimetu 990c38ca81 Change letter cache to map lookup, ryzom/ryzomcore#626 4 years ago
Nimetu 661a2bdaf7 Added small program to measure font atlas performance, ryzom/ryzomcore#626 4 years ago
Nuno f84184af25 Merge branch 'atys' into feature/hires-textures 4 years ago
Nuno 4b6e0184a3 Merge branch 'atys' into feature/develop-atys 4 years ago
kaetemi 87b5a77d4f Add elevation snippets to weld bound vertices 4 years ago
Nuno 269526e87f Fixed bad check of args 4 years ago
kaetemi 30ece314c5 Add tool to unbuild heightmaps 4 years ago
Nuno b8668813df Merge branch 'interface_textures' into yubo 4 years ago
Nuno 6f9dce0fdc Merge branch 'master' into interface_textures 4 years ago
kaetemi 3164e5fe3e Parallel ig light 4 years ago
kaetemi 06be2d003c Parallel wmap sizes 4 years ago
kaetemi 06006cffd3 Parallel processing of rbank, zone heightmap, and zone lighter 4 years ago
kaetemi 8fff5b8754 Disable CPU mask in zone lighter 4 years ago
kaetemi 00520d6c11 Process rbank in parallel 4 years ago
Nuno fd8b2436ff Merge branch 'master' into me-translations 4 years ago
Nuno 588bd79535 Merge branch 'translations' 4 years ago
Nuno ced0ca3e1c Merge branch 'translations' into yubo 4 years ago
Nimetu 76d29b2eda Fixed: Only call curl cleanup when needed. 4 years ago
kaetemi a1f1bd888c Fix rbank water mapping 4 years ago
kaetemi e998d3a85c Merge remote-tracking branch 'ryzomcore/atys' into feature/develop-atys 4 years ago
kaetemi 5c3b0cf14b Merge remote-tracking branch 'ryzomcore/develop' into feature/develop-atys 4 years ago
Nuno c327303222 Merge branch 'master' into translations 4 years ago
Nuno 864eba1629 Merge branch 'master' into me-translations 4 years ago
Nuno 29c3651063 Merge branch 'translations' 4 years ago
Nimetu d9d9c6e1e6 Fix css style order when using external css files 4 years ago
Nimetu 779f87d6e7 Change CFile::setRWAccess to only set rw-rw-r-- (+x for directories) on linux/macOS. 4 years ago
Nimetu 53437989d4 Add --list-verbose, --extract options to bnp_make 4 years ago
Nuno acfb37103f Merge branch 'translations' into yubo 4 years ago
Nuno 3d38a8ca89 Merge branch 'master' into translations 4 years ago
Nuno 4f34ce36ae Merge branch 'atys' into ryzom/ui/improvements 4 years ago
Nuno 8d2b26b738 Merge branch 'fixes' into atys 4 years ago
Nuno 79e65a6b9e Rollback bad commit 4 years ago
Nuno 6e59af8dc9 Merge remote-tracking branch 'origin/fixes' into fixes 4 years ago
Nuno d23166ae49 Fixed getTargetVpcHex and getTargetVpc 4 years ago
Nuno 0b110c6a88 Fixed getTargetVpcHex and getTargetVpc 4 years ago
Nuno 13398f094a Merge branch 'fixes' into atys 4 years ago
Nuno 7018a4439c Fixed getTargetVpcHex and getTargetVpc 4 years ago
Riasan cbbbc74a60 Changed: add lua function 4 years ago
Nuno dab6321caa Merge branch 'ark' 4 years ago
Nuno 07390fed37 Merge branch 'ark' into yubo 4 years ago
Nuno ec98cd2e65 Merge branch 'master' into ark 4 years ago
Nuno ad52a23437 Merge branch 'translations' 4 years ago
Nuno c78d1d934f Merge branch 'ark' into yubo 4 years ago
Nuno 677933ed98 Merge branch 'ark' 4 years ago
Nuno 541529bb3f Merge branch 'interface_textures' into yubo 4 years ago
Nuno a273f78851 Merge branch 'interface_textures' 4 years ago
Nuno cb207bdd9d Merge branch 'master' into interface_textures 4 years ago
Nuno 8ec332fefa Merge branch 'master' into ark 4 years ago
Nuno 2f776eab9c Merge branch 'master' into translations 4 years ago
Nuno 04aa097781 Merge branch 'master' into yubo 4 years ago
Nuno 3996327394 Merge branch 'translations' 4 years ago
Nuno 27e553ccb5 Merge branch 'master' into ark 4 years ago
Nimetu 6bed86797b Add --url, --app options for client patcher 4 years ago
Nuno 323be1612e Merge branch 'fixes' into atys 4 years ago
Nuno 184582cfc9 Removed uiBotChatPhrase 4 years ago
Nimetu e39cd0a8d3 Add --url, --app options for client patcher 4 years ago
Nuno 0b9599c57b Merge branch 'friend_list_groups_and_notes' into atys 4 years ago
Sit Melai 9d7f2af1a7 Fixed not correctly removing Group Containers when removing people (causing crash at char change) 4 years ago
Nuno e021c09051 Merge branch 'interface_textures' into yubo 4 years ago
Nuno 52ff736ee9 Merge remote-tracking branch 'origin/master' into interface_textures 4 years ago
Nuno d2c56f4b7c Merge branch 'rewards' 4 years ago
Nuno 2bdc6fb7ae Merge branch 'rewards' into yubo 4 years ago
Nuno a848eab99c Merge remote-tracking branch 'origin/master' into rewards 4 years ago
kaetemi abf2715fa3 Create more consistent R2 maps 4 years ago
kaetemi 147cb75a80 Temporary cache implementation for lightmapping during export 4 years ago
kaetemi 3df1fd3857 Notes 4 years ago
kaetemi 257f6a6e23 Build fix 4 years ago
kaetemi aa7d667b10 Show angle 4 years ago
kaetemi 813b4d72d1 Notes 4 years ago
kaetemi b3bed095f8 Write XML file, ryzom/ryzomcore#621 4 years ago
kaetemi 210515addd Merge remote-tracking branch 'ryzomcore/develop' into develop 4 years ago
kaetemi 57fbaf1feb Erase things from reference that aren't plants, ryzom/ryzomcore#621 4 years ago
kaetemi d6fe42f6a0 Load and map instances to plants, ryzom/ryzomcore#621 4 years ago
kaetemi 47d6e09099 Tool for reverse building flora primitive, load plants, ryzom/ryzomcore#621 4 years ago
kaetemi 23110247de Script for rebuilding ring landscapes 4 years ago
Nimetu f3f67af69e Added: form,formaction attributes to submit button 4 years ago
kaetemi b1ef06d900 These asserts don't make sense 4 years ago
kaetemi 470b48ea0d Fix Max version 4 years ago
kaetemi b0f1c73d77 Merge remote-tracking branch 'ryzomcore/atys' into feature/develop-atys 4 years ago
kaetemi 109ed7eba5 Merge branch 'develop' into feature/develop-atys 4 years ago
Nuno 9ae2df4527 Merge remote-tracking branch 'origin/fixes' into atys 4 years ago
kaetemi f9cc9a1abe Fix build 4 years ago
kaetemi 2e0b00d93c Keep a spare memory block in fixed size allocator to avoid large allocation overhead on the chunk boundary 4 years ago
kaetemi 14da4d1e61 Stricter UTF-8, so ascii characters can't get encoded as multi-bytes and pass validations 4 years ago
kaetemi 66ef424af0 Add template for pointer with deep copy and move semantics 4 years ago
kaetemi b884360c0e Add template for pointer with deep copy and move semantics 4 years ago
kaetemi 5fed277adf Cleanup 4 years ago
kaetemi cb949ae13a Correct ascii behaviour in tool 4 years ago
kaetemi c770191bef Explicitly use toLowerAscii for filenames and identifiers 4 years ago
Nimetu 762962ef25 Fixed: Only download own platform exedll_.ref files 4 years ago
Nimetu 9f3250f4db Fixed: patching single file with multiple version in a row. 4 years ago
kaetemi 8809d39835 Rebuild string case tables 4 years ago
kaetemi 773f27dfcb Just pass utf-8 4 years ago
kaetemi 99df03dad0 Don't allow unmatched surrogates in input 4 years ago
kaetemi e20af7828a Additional size check to avoid stuck empty string cache files, caused by exception handling 4 years ago
kaetemi bb564a6302 Trim unsupported unicode for now, since they mess with input 4 years ago
kaetemi 3b6e27e800 Find offset by index 4 years ago
kaetemi 297de1d19a Fix memory release 4 years ago
kaetemi 2444d94f4f Don't expose ucstring to Lua, unless compatibility flag is set 4 years ago
kaetemi 0d2633b697 Cleanup string 4 years ago
kaetemi c9f967b52b Fix memory release 4 years ago
kaetemi e9fdac30a2 Fix memory release 4 years ago
kaetemi 64b978b77a Fix memory release 4 years ago
kaetemi 0ba45054d0 Fix memory release 4 years ago
kaetemi f50b59702e Fix memory release 4 years ago
kaetemi b220dac7b3 Fix memory release 4 years ago
Nimetu 465a36b250 fix build 4 years ago
Nimetu e8c18b1b44 fix build 4 years ago
Nimetu 73610be10d utf-8 fixes, ryzom/ryzomcore#335 4 years ago
Nimetu 72098f624d fix merge conflict 4 years ago
kaetemi 91bceae902 Fix UTF-16 character input pair events 4 years ago
kaetemi be60cf8978 Localizable font families, start font name with ui to get a \n-separated font list from uxt, close ryzom/ryzomcore#623 4 years ago
kaetemi 5bb21d7aa0 Don't expose ucstring to Lua, unless compatibility flag is set 4 years ago
kaetemi 745db95184 Add compatibility switch 4 years ago
kaetemi 3dfc6d5807 Fix 4 years ago
kaetemi f8de4aff59 Fix 4 years ago
kaetemi 36c676e2b2 Use the simplified toUpper for identifiers and filenames 4 years ago
kaetemi 281630c280 Use the simplified toLower for identifiers and filenames 4 years ago
kaetemi ffa6179b82 Alternative 7-bit upper- and lowercase 4 years ago
kaetemi 73b8ba9e4e UTF-8 various, ryzom/ryzomcore#335 4 years ago
kaetemi 11b453baaa Safe 7-bit upper- and lowercase 4 years ago
kaetemi 0dfff69c6f UTF-8 various, ryzom/ryzomcore#335 4 years ago
kaetemi c27547c3a3 UTF-8 various, ryzom/ryzomcore#335 4 years ago
kaetemi 52e3ca024f UTF-8 various, ryzom/ryzomcore#335 4 years ago
kaetemi 298e912949 UTF-8 login patcher, ryzom/ryzomcore#335 4 years ago
kaetemi c069b70ce8 UTF-8 various, ryzom/ryzomcore#335 4 years ago
Jan Boon f859a39da4
Update action_handler_item.cpp 4 years ago
Jan Boon 9d3891f1aa
Update action_handler_item.cpp 4 years ago
Jan Boon 2bb13937e8
Update string_manager_client.cpp 4 years ago
Jan Boon afa22ee22b
Update string_manager_client.cpp 4 years ago
Jan Boon 6c247256d2
Update string_manager_client.cpp 4 years ago
Jan Boon da9254e748
Update release.cpp 4 years ago
Jan Boon a1337dbda9
Update string_manager_client.cpp 4 years ago
kaetemi 04805ec38c Fix build 4 years ago
Jan Boon cd8ed8ab57
Update entity_cl.cpp 4 years ago
kaetemi 1a6e5e6e2b Merge branch 'develop' into feature/develop-atys 4 years ago
kaetemi 7249546db6 Merge some things from atys branch 4 years ago
kaetemi 7adbb84514 Merge branch 'develop' into feature/develop-atys 4 years ago
kaetemi eac2aed175 Fix serial 4 years ago
Jan Boon 3a2922021e
Update cursor_functions.cpp 4 years ago
kaetemi 32ce3667a3 Fix FV 4 years ago
kaetemi e2afa4db5b Sanitize downloaded HTML encoding 4 years ago
kaetemi d201b8a392 UTF-8 various, ryzom/ryzomcore#335 4 years ago
kaetemi 72d9f8ea4f UTF-8 various, ryzom/ryzomcore#335 4 years ago
kaetemi ad0e970785 UTF-8 chat, ryzom/ryzomcore#335 4 years ago
kaetemi 5fe2fae8b0 UTF-8 string manager, ryzom/ryzomcore#335 4 years ago
kaetemi 2d9f10bee3 UTF-8 various, ryzom/ryzomcore#335 4 years ago
kaetemi ecabc00ec5 UTF-8 various, ryzom/ryzomcore#335 4 years ago
kaetemi 5a470a7b16 UTF-8 string manager, ryzom/ryzomcore#335 4 years ago
kaetemi 9d534882e8 UTF-8 string manager, ryzom/ryzomcore#335 4 years ago
kaetemi 246ea2f603 UTF-8 entity name, ryzom/ryzomcore#335 4 years ago
kaetemi 7e8f84462f Add manifest to enable segment heap 4 years ago
kaetemi 22fd1132ed Improve setCase behaviour 4 years ago
kaetemi 0629951ba6 Fix useless cursor reloads 4 years ago
kaetemi 1c09d2ea4b Avoid useless string operations 4 years ago
kaetemi 13f99b393f Reimplement setCase in purely UTF-8, kaetemi/ryzomclassic#172 4 years ago
kaetemi c061f3df3a Don't need this behaviour after all 4 years ago
kaetemi d238d2122b Cleanup localization behaviour 4 years ago
kaetemi 2a7bf997b9 Cleanup localization behaviour 4 years ago
kaetemi 39fc4895d2 Fix to work with saner new behaviour 4 years ago
kaetemi 7812ccafc1 Fix infinite loop 4 years ago
kaetemi ff49b89b73 Fix identity title, kaetemi/ryzomclassic#170 4 years ago
kaetemi 47c0c8cc07 Fix utf iterator ptr 4 years ago
kaetemi 0bd43913e1 Stricter UTF-8 4 years ago
kaetemi 182a917338 Make control characters printable 4 years ago
kaetemi 38e5dfe007 Stricter UTF-8 4 years ago
Ryzom Pipeline 19e00522d9 Update copyright attribution for GPL compliance 4 years ago
kaetemi 4fba8cc18d Improved vertical font centering 4 years ago
kaetemi 7ea4b2b989 Adjust font sizing 4 years ago
kaetemi 592ec2aaf1 Cleanup group container title localization behaviour, ryzom/ryzomcore#335 4 years ago
kaetemi 8dc777495a UTF-8 clipboard, ryzom/ryzomcore#335 4 years ago
Jan Boon 7c028d7a83
Update group_map.cpp 4 years ago
Jan Boon e5fce11618
Update group_map.cpp 4 years ago
Jan Boon ce9c7aae84
Update action_handler_item.cpp 4 years ago
Jan Boon 396f0d808e
Update unix_event_emitter.cpp 4 years ago
Jan Boon 850b8e0158
Update css_parser.cpp 4 years ago
Jan Boon bc66f3a464
Update css_parser.cpp 4 years ago
kaetemi 9ff5eee1e8 Fix 4 years ago
kaetemi 560a19e6f7 Fix build 4 years ago
kaetemi 2450f95c03 Fix XP build 4 years ago
Jan Boon 856f7e88f2
Update general_settings_widget.cpp 4 years ago
kaetemi 632f8133a2 Fix merge 4 years ago
kaetemi 376dd2aff1 More UTF-8, ryzom/ryzomcore#335 4 years ago
kaetemi ac799e444d More UTF-8, ryzom/ryzomcore#335 4 years ago
kaetemi 0b191bc6db More UTF-8, ryzom/ryzomcore#335 4 years ago
kaetemi 079f9dff25 Fix 4 years ago
kaetemi 051c46b95a UTF-8 CI18N, ryzom/ryzomcore#335 4 years ago
kaetemi 1963bdedcc UTF-8 context help, ryzom/ryzomcore#335 4 years ago
kaetemi 6cd52d7871 Note 4 years ago
kaetemi f8ef5743e3 Fix bad value in toUpper table 4 years ago
kaetemi 2eb088ef1c Cleanup, ryzom/ryzomcore#335 4 years ago
kaetemi 2de4907b83 Reimplement toLower and toUpper as UTF-8, ryzom/ryzomcore#335 4 years ago
kaetemi 54337b757b Fix merge 4 years ago
kaetemi e1195fe34e Change CDBGroupComboBox to UTF-8, ryzom/ryzomcore#335 4 years ago
kaetemi 506f9f26bd Change CViewText to UTF-8, ryzom/ryzomcore#335 4 years ago
kaetemi c3ef0fc91c Change CViewText to UTF-8, ryzom/ryzomcore#335 4 years ago
kaetemi c129ce87df Change CViewText to UTF-8, ryzom/ryzomcore#335 4 years ago
kaetemi 9021ce465f Change CViewText to UTF-8, ryzom/ryzomcore#335 4 years ago
kaetemi 698bfff501 Prefer UTF-8, cleanup, ryzom/ryzomcore#335 4 years ago
kaetemi 6ff5ddd790 Explicit function for obtaining 7-bit ascii, ryzom/ryzomcore#335 4 years ago
kaetemi 1ec9f16de4 Get rid of useless raw copy in ucstring, default to UTF-8, ryzom/ryzomcore#335 4 years ago
kaetemi 993c37f56d Prefer UTF-8, cleanup, ryzom/ryzomcore#335 4 years ago
kaetemi 55d83c9486 Fix comment 4 years ago
kaetemi 1d696b8921 Revert special handling for wchar 4 years ago
kaetemi 932a612f53 Support UTF-32 in edit box, ryzom/ryzomcore#335 4 years ago
kaetemi 1a045e437e Accept any UTF string in NL3D text rendering, support UTF-32 characters, ryzom/ryzomcore#335 4 years ago
kaetemi dca59073aa Use platform wide string interface for platform api, not ucstring 4 years ago
kaetemi 25049eaead Complete some missing implementation for wide strings 4 years ago
kaetemi 8fc6ec3b35 Show box character instead of dot 4 years ago
kaetemi 81143cdf43 Proper UTF encoding, ryzom/ryzomcore#335 4 years ago
kaetemi 973531f461 UTF string view base, ryzom/ryzomcore#335 4 years ago
kaetemi a3780e307e Fix missing ghost components in animation loading mode, kaetemi/ryzomclassic#155 4 years ago
kaetemi c252b56c93 Fix crash on save file corruption 4 years ago
kaetemi 2568b6f321 Don't probe if normal received in probe state, otherwise server will not enter probe state, ryzom/ryzomcore#622, ryzom/ryzomcore#133 4 years ago
kaetemi 06b430349c Disconnect if UDP Login fails, ryzom/ryzomcore#622 4 years ago
kaetemi 78917354d9 Disable tmp debug feature 4 years ago
kaetemi 8c6609943b Dump scenario, kaetemi/ryzomclassic#155 4 years ago
kaetemi 639b432817 Match GL behaviour in D3D for screensaver 4 years ago
kaetemi 8d94baaf14 More consistent unicode behaviour for text 4 years ago
kaetemi c068d757eb Build fix 4 years ago
kaetemi c68c3746dd Build fix 4 years ago
kaetemi 9896eae64d Fix build warnings 4 years ago
kaetemi 0367e4f7c3 Fix build warnings 4 years ago
kaetemi 8be138931d Fix pCB NULL 4 years ago
kaetemi 771248fcf4 Use platform implementation in ucstring for UTF-8 conversion on Windows to get valid UTF-16 4 years ago
kaetemi dd28130617 Format ucstring source 4 years ago
kaetemi 1300d5d4d4 Move ucstring utf8 implementation to header 4 years ago
kaetemi 3dddc5ab40 Move ucstring utf8 implementation to header 4 years ago
kaetemi bbf4a0ac8a Fix editor not returning to initial act, kaetemi/ryzomclassic#80 4 years ago
kaetemi 6531fb0a2e Lua debugger requires properly standardized paths 4 years ago
kaetemi c4b142f770 Load the Lua socket library dynamically if it's available, necessary for MobDebug 4 years ago
kaetemi 8bf18d2e1d Improve error message, kaetemi/ryzomclassic#120 4 years ago
kaetemi b1056ee5ca Merge a GL thing from Atys branch 4 years ago
kaetemi 2bd4c24a5e Merge branch 'develop' of github.com:ryzom/ryzomcore into develop 4 years ago
kaetemi e74e229ad9 Merge remote-tracking branch 'ryzomcore/atys' into feature/code-to-root-atys 4 years ago
Nimetu ae91cc4179 Fixed: Ingame map search and search result tooltips for UTF8 strings 4 years ago
Nimetu b4901bf267 Fixed: Ingame map search and search result tooltips for UTF8 strings 4 years ago
Nimetu 720f6da8b9 Fixed: Remove unused include (fixes #618) 4 years ago
Nimetu 6ccd8853db Fixed: setActive() did not invalidate table cell size. 4 years ago
Nuno cc7793202b Merge remote-tracking branch 'origin/feature/hires-textures' into atys 4 years ago
Nuno 0bb160545f Merge remote-tracking branch 'origin/ryzom/ui/improvements' into atys 4 years ago
Nuno 0e1b464e98 Merge remote-tracking branch 'origin/ryzom/patch-changes' into atys 4 years ago
Nuno dfe051a8df Merge remote-tracking branch 'origin/fixes' into atys 4 years ago
Nuno Gonçalves (Ulukyn) 2f6133c8ba Merge branch 'second-action-bar-editable' into 'atys'
Make the second action bar editable like main one

See merge request ryzom/ryzom-core!1
4 years ago
Nuno Gonçalves (Ulukyn) 95f8cefecc Merge branch 'translation-original-message-by-default-option' into 'atys'
Added option to show the translation as a tooltip

See merge request ryzom/ryzom-core!2
4 years ago
Nuno Gonçalves (Ulukyn) b98cd5e345 Merge branch 'move-group-with-zig' into 'atys'
Move item group from/to zig

See merge request ryzom/ryzom-core!3
4 years ago
Nuno Gonçalves (Ulukyn) bca2a28187 Merge branch 'friend_list_groups_and_notes' into 'atys'
Friend list groups

See merge request ryzom/ryzom-core!4
4 years ago
Sit Melai b7cbeeb2ae Fixed grayed icons on second bar not draggable 4 years ago
Ulukyn 5d4e81e24c Merge branch 'stline/s2e1' into yubo 4 years ago
Ulukyn c73fff2ca6 Merge branch 'master' into stline/s2e1 4 years ago
Nimetu 9532fc3a81 Fixed: mouse free look when using inverted mouse 4 years ago
Nimetu 6b59fc0081 Fixed: ctrl+3 detected as KeyESCAPE when using keychar event 4 years ago
Sit Melai 47bf9ecbc8 Always create General group, so at first launch groups show directly when changed 4 years ago
Sit Melai 02732c1241 Changes to fix compilation on some setups 4 years ago
Sit Melai f96f0b41b9 Removed an unused variable and don't show groups anymore when there is only one 4 years ago
Sit Melai 5dc85db8b1 Added action handlers to change contact group and read/write to file 4 years ago
Sit Melai 49fcec5759 First steps, still work in progress 4 years ago
Sit Melai b8b21914f6 Made item groups compatible with Zigs 4 years ago
Sit Melai bccc86bd99 Added option to show the translation as a tooltip and original by default 4 years ago
Sit Melai e5b3b752d5 Copyright somehow got lost 4 years ago
Sit Melai c06469b2a0 Fixed second action bar not updating after being changed 4 years ago
Ulukyn 6fa74cd5c2 Added: Option to use ryzom_client_patcher as bnp unpacker and xdelta patcher 4 years ago
Riasan 8cd685d1f4 Merge remote-tracking branch 'remotes/origin/ui-improvements' into yubo 4 years ago
Riasan f31eeff8fc Changed: add display current online guildmembers 4 years ago
Sit Melai 7e10c697eb Merge Atys 4 years ago
Nimetu f7be62eb3d Fixed: Player/guild room buy dialog price 4 years ago
Nimetu 2a4b16ab1b Changed: Allow to use 2x/4x hi-res texture atlas for GUI elements 4 years ago
Ulukyn f7e8e3f516 Merge branch 'fix_opengl_on_mac' into atys 4 years ago
Ulukyn 107dbc1987 Changed: Fixed non-Mac compilation 4 years ago
Ulukyn 97dc744759 Merge branch 'translations' into yubo 4 years ago
Ulukyn 012339dcf1 Merge branch 'translations' 4 years ago
Ulukyn 884c65fc26 Merge branch 'master' into translations 4 years ago
Ulukyn 07f9a55e48 Merge branch 'fixes' into atys 4 years ago
Ulukyn a87b0f4c97 Changed: When ryzom patch fails try to download lzma file (this last may never fail) 4 years ago
Nimetu d367e32a40 Fixed: set_desktop handler only worked with keypress event 4 years ago
Ulukyn 4138a99fb7 Merge remote-tracking branch 'origin/translation-german-fixes' into yubo 4 years ago
Nimetu 5e3cd0321a Fixed: Delay CDecal init as it depends on Scene object 4 years ago
Nimetu 4fd3f59b9a Fixed: Releasing curl handle when not connected. 4 years ago
Ulukyn 7be52a10fe Merge branch 'atys' into fixes 4 years ago
Ulukyn f4a104bf3f Merge branch 'ryzom/ui/improvements' into atys 4 years ago
Ulukyn 80a6bf72a9 Changed: renamed creatures are now name in ucfirst 4 years ago
Ulukyn 17e539132b Added: very basic anti-spam system (prevent duplication of same message) 4 years ago
Ulukyn 27bd2cec01 Merge branch 'atys' into ryzom/ui/improvements 4 years ago
Ulukyn 6597f32fc1 Merge branch 'ryzom/deepl' into atys 4 years ago
Ulukyn 9e2872d15e Added: Add a language icon when client receive a translated message 4 years ago
Ulukyn 901f33d9a7 Merge branch 'storyline/s2e0' into atys 4 years ago
Ulukyn 421de3fa91 Changed: fixed issue with rumors 4 years ago
Ulukyn 08fb509d99 Merge branch 'atys' into storyline/s2e0 4 years ago
Sit Melai 6c8aeb6ae3 Missed a whitespace 4 years ago
Sit Melai 59c794f716 Wrongly removed previous change 4 years ago
Heernis 3c052d5fcc Merge branch 'master' into translation-german-fixes 4 years ago
Sit Melai c2e7807f99 Adapt action handler for editing phrases to handle second action bar 4 years ago
Riasan d130a7f826 Changed: fix client crash from opengl changes + fix compiling error because of moved client_default.cfg 5 years ago
Ulukyn fd2cc53d68 Merge remote-tracking branch 'origin/translation-german-fixes' into translations 5 years ago
Ulukyn 6ae34e08d9 Merge branch 'translations' into yubo 5 years ago
Ulukyn 80568ade1c Merge branch 'translations' 5 years ago
Ulukyn a8016b6a59 Merge branch 'master' into translations 5 years ago
Ulukyn d0fdfe175d Merge branch 'fixes' into yubo 5 years ago
Ulukyn 4254b6788a Fixed: Bad dispaly of server custom names 5 years ago
Riasan ada46dfabc Changed: update releasenote url 5 years ago
Nimetu c09736a08a Fixed: Calling stop on music player should not affect background music. 5 years ago
Nimetu e9f63f2556 Merge "Fixed: Restore playlist after charselect" 5 years ago
Nimetu 334d1d2af1 Changed: SHow no-files text if there is no songs in playlist 5 years ago
Nimetu 3aa0493570 Fixed: Clear song info when all songs are done playing. 5 years ago
kaetemi fc197880a4 Merge remote-tracking branch 'ryzomcore/atys' into feature/code-to-root-atys 5 years ago
Ulukyn ada3c09a51 Merge branch 'master' into yubo 5 years ago
Ulukyn 83061f7f03 Merge remote-tracking branch 'origin/fix-media-player' into atys 5 years ago
Ulukyn 3c6bed32fd Merge remote-tracking branch 'origin/fix-media-player' into yubo 5 years ago
Nimetu 92b3a31f0b Fixed: Calling stop on music player should not affect background music. 5 years ago
Ulukyn f396858ea9 Merge branch 'ark' 5 years ago
Ulukyn eae8f9999d Merge branch 'stline/s2e1' 5 years ago
Ulukyn b8885cd661 Merge branch 'storyline/s2e1' into atys 5 years ago
Ulukyn f67a1cde32 Merge remote-tracking branch 'origin/ryzom/ui/improvements' into atys 5 years ago
Ulukyn feb1a5647d Merge remote-tracking branch 'origin/fix-media-player' into atys 5 years ago
Ulukyn f3009c4178 Merge branch 'master' into ark 5 years ago
Ulukyn 820bd23cf6 Merge branch 'ark' into origin/master 5 years ago
Ulukyn c883ea63e0 Merge branch 'ark' into yubo 5 years ago
Ulukyn 791a6641d9 Merge remote-tracking branch 'origin/master' into ark 5 years ago
Ulukyn 521a5c8fb7 Merge branch 'storyline/s2e1' into yubo 5 years ago
Ulukyn da876dcf7c Merge remote-tracking branch 'origin/ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 0069db15a6 Merge remote-tracking branch 'origin/fix-media-player' into yubo 5 years ago
Ulukyn 3da2f45363 Added: Remove ambiance ans shininess to SE shapes. Add seasons texture set 5 years ago
Ulukyn 1143ecaae0 Merge branch 'atys' into storyline/s2e1 5 years ago
Heernis bcc107e187 Merge remote-tracking branch 'origin/master' into translation-german-fixes 5 years ago
karu da890311bb Added: Show disabled until timer on icon 5 years ago
Nimetu 4ebca98559 Fixed: Audio decoder getMusicInfo/getSongTitle needs to be thread safe 5 years ago
Nimetu 98709e55db Fixed: Crash on switching chars, logout 5 years ago
Nimetu 36187626a9 Fixed: Restore playlist after charselect 5 years ago
Nimetu bde8d008d1 Fixed: Crash on switching chars, logout 5 years ago
Nimetu 6993a2731f Changed: SHow no-files text if there is no songs in playlist 5 years ago
kaetemi 3cbfa82a6e Fix georges editor 5 years ago
kaetemi ec61fa02b6 Fix hand slots for fauna, ref kaetemi/ryzomclassic#125 5 years ago
Nimetu 52d6f89e1e Fixed: Clear song info when all songs are done playing. 5 years ago
Nimetu 5bddfcfb22 Fixed: Audio decoder getMusicInfo/getSongTitle needs to be thread safe 5 years ago
kaetemi d0068265fb Compare tag for creating bnp, since bnp get older timestamp reset if they match 5 years ago
kaetemi 8b8308c354 Allow setting patch version 5 years ago
kaetemi c00701eee1 More useful warnings 5 years ago
kaetemi db92cbc6bb Disable warning 5 years ago
kaetemi 1ab8fe06de Just copy actors without MRM setup 5 years ago
Ulukyn aa15fd4e98 Merge branch 'stline/s2e1' into yubo 5 years ago
Ulukyn 0f8673beac Merge branch 'master' into stline/s2e1 5 years ago
Ulukyn 219914b4bf Merge branch 'master' into yubo 5 years ago
Ulukyn fb4aebf506 Merge branch 'rewards' 5 years ago
Ulukyn 81832ae0af Merge branch 'master' into rewards 5 years ago
kaetemi 5c0c6d2417 Generate 7z server patch, ref ryzom/ryzomcore#586 5 years ago
kaetemi 9b0852a91d Protect from duplicate UP and DOWN callbacks, fix ryzom/ryzomcore#601 5 years ago
kaetemi 05d6b16b9c Fix loading music fadeout on far TP between ring and mainland 5 years ago
kaetemi 39d6ca285a Merge remote-tracking branch 'origin/develop' into feature/code-to-root-atys 5 years ago
kaetemi c8fc110a9e Merge moving code directory to root for atys branch, ref #593 5 years ago
kaetemi a9fc9c2015 Merge branch 'feature/pre-code-move' into feature/code-to-root-atys 5 years ago
Ulukyn e32c852d96 Merge branch 'ui-improvements' into yubo 5 years ago
Ulukyn f3a02d4f2a Merge branch 'master' into yubo 5 years ago
Ulukyn bd99cd8aed Merge branch 'ryzom/ui/improvements' into atys 5 years ago
Ulukyn 77d8cce15a Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn aa0d9d0be9 Changed: add border to pvp tags and display only if pvp 5 years ago
Ulukyn 0845e19408 Merge branch 'atys' into ryzom/ui/improvements 5 years ago
Ulukyn ece240448d Merge remote-tracking branch 'origin/merge-into-atys' into atys 5 years ago
Ulukyn 07ff703de2 Merge branch 'master' into ui-improvements 5 years ago
Ulukyn f6116a813b Merge branch 'ui-improvements' 5 years ago
kaetemi d293b3ef02 Fix value 5 years ago
kaetemi a4aafa410a Fix initial value 5 years ago
kaetemi 56ee772548 Reset active builtin shader when using user shader in D3D driver, fix ryzom/ryzomcore#603 5 years ago
kaetemi 1a037ad3eb Finer control over menu music 5 years ago
kaetemi a82df91bba CPath::lookup is not thread-safe 5 years ago
kaetemi 900ec1a69a Play theme music during login. Fix music when returning to character selection. Fix teleport screen and music selection. 5 years ago
kaetemi 491d39ff08 Merge remote-tracking branch 'ryzomcore/develop' into develop 5 years ago
Ulukyn 422a8bb744 Merge remote-tracking branch 'origin/merge-into-atys' into yubo 5 years ago
Nimetu 0f5dbc318c Fixed: Clear scene background if sky filter is used 5 years ago
Nimetu 2a2431b1d3 Changed: Automatically build playlist on play if needed 5 years ago
Nimetu 505283a17c Changed: Use worker thread to gather song title/duration. 5 years ago
Nimetu 1ab44cf123 Fixed: mp3 player keeps playing after clearing files from playlist 5 years ago
Ulukyn 25d4cca3a9 Merge branch 'atys' into yubo 5 years ago
Ulukyn 6a40fcf12d Fixed: miss of return statement 5 years ago
Ulukyn bf0042173f Merge branch 'ui-improvements' into yubo 5 years ago
Ulukyn 681568ce08 Merge branch 'master' into ui-improvements 5 years ago
Ulukyn 47863be96e Merge branch 'marauder' into yubo 5 years ago
Ulukyn ade5b6e702 Merge branch 'master' into marauder 5 years ago
Ulukyn ecd8b952a2 Merge branch 'atys' into yubo 5 years ago
Ulukyn 272f91210b Fixed: remove stupid hack for textures (finally...) 5 years ago
Ulukyn 24d4fb8253 Fixed: Prevent crash if no StartupVerify config 5 years ago
Nimetu 24fd5a6230 Fixed: Clear scene background if sky filter is used 5 years ago
Riasan 9043e78794 Merge remote-tracking branch 'remotes/origin/merge-into-atys' into yubo 5 years ago
Nimetu 5250d22706 Changed: Filter craft plans according to tool type. 5 years ago
Nimetu 682985978d Changed: Automatically build playlist on play if needed 5 years ago
Nimetu b3f8f307b0 Changed: Use worker thread to gather song title/duration. 5 years ago
Ulukyn b5ffa8becd Merge remote-tracking branch 'origin/merge-into-atys' into atys 5 years ago
kaetemi 87cd9f19a4 Remove duplicate assert 5 years ago
kaetemi 83210ce17b Fix stuck loading screen when quitting scenario, fix kaetemi/ryzomclassic#83 5 years ago
kaetemi bcac1e7955 Fix silently lost nlassert, ryzom/ryzomcore#596 5 years ago
kaetemi 75777b3497 Fix R2 input handling. Probably broken by GUI refactoring. Fix kaetemi/ryzomclassic#81 5 years ago
kaetemi e020c9f0d0 Avoid bad memory access in LOD texture failure case, ref ryzom/ryzomcore_graphics#22 5 years ago
Ulukyn 92090056ea Merge remote-tracking branch 'origin/merge-into-atys' into yubo 5 years ago
Nimetu a6c7b3dd37 Fixed: mp3 player keeps playing after clearing files from playlist 5 years ago
Ulukyn 1e54da83ef Merge remote-tracking branch 'origin/merge-into-atys' into yubo 5 years ago
Ulukyn 6ec06b29ab Merge branch 'atys' into yubo 5 years ago
Ulukyn 7b15da1018 Removed: client_default.cfg (moved to ryzom-data) 5 years ago
Nimetu 67b74ad2b7 Added: Ingame config options for window snap. 5 years ago
Nimetu ddd16d4851 Fixed: Animal marker invalidates map on each frame 5 years ago
Nimetu 110f1715ea Fixed: Hide 'sound disabled' warning on startup 5 years ago
Nimetu 598be95efd Added: Ingame config options for window snap. 5 years ago
kaetemi 4f0bbbad69 String fixes 5 years ago
kaetemi 50be041116 Fix plugin build for 3ds Max 9 5 years ago
Nimetu 7f373a904e Fixed: Animal marker invalidates map on each frame 5 years ago
Nimetu 983475ff7c Fixed: Hide 'sound disabled' warning on startup 5 years ago
kaetemi b713dccdc9 Retarget to R:\leveldesign and R:\graphics 5 years ago
Jan Boon c9163412ad Simplified default folder structure 5 years ago
Jan Boon d2d89ac44f Simplified default folder structure 5 years ago
Jan Boon d036b616b5
Update azure-pipelines.yml 5 years ago
Jan Boon 7b8f1b9a61
Update azure-pipelines.yml 5 years ago
Ulukyn 44824414b1 Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 95b0f63622 Fixed: hide RP-PVP tags if player are not tagged 5 years ago
Ulukyn 264b50a5ec Merge branch 'atys' into ryzom/ui/improvements 5 years ago
Ulukyn 143b96c214 Merge branch 'atys' into yubo 5 years ago
Ulukyn d4e5af7df2 Added: libicu in Makefile 5 years ago
Ulukyn 8dc9b89f94 Merge remote-tracking branch 'origin/merge-into-atys' into yubo 5 years ago
Nimetu 2d86c5377d Merge branch 'develop' into merge-into-atys 5 years ago
Ulukyn 04f9d593e0 Merge remote-tracking branch 'origin/merge-into-atys' into yubo 5 years ago
Nimetu 3be969a73d Merge branch 'develop' into merge-into-atys 5 years ago
Ulukyn ce8b05b284 Merge branch 'master' into stline/s2e1 5 years ago
Ulukyn 42b291c73e Merge remote-tracking branch 'origin/merge-into-atys' into yubo 5 years ago
Nimetu 4aa94b3ae9 Changed: Set WITH_RYZOM_LIVE=ON as default 5 years ago
Nimetu c0110133d7 Changed: Restore ryzom.com urls in client cfg 5 years ago
Nimetu c36faf2d61 Merge branch 'develop' into merge-into-atys 5 years ago
Ulukyn fef0cad61a Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn debb6b7d0c Changed: exposed the toggle_fly to final clients 5 years ago
Heernis f11ed5ea49 Merge remote-tracking branch 'origin/master' into translation-german-fixes 5 years ago
Ulukyn 050d9fea2f Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 9a8f29bb67 Merge branch 'ryzom/ui/improvements' into atys 5 years ago
Ulukyn c2e879ebcc Changed: removed pvp check for rp logos 5 years ago
Ulukyn 11086f9b44 Merge branch 'translations' into yubo 5 years ago
Ulukyn 311e739d98 Merge branch 'translations' 5 years ago
Ulukyn f6f7e553fc Merge branch 'master' into translations 5 years ago
Ulukyn 255271cde5 Merge branch 'translation-german-fixes' 5 years ago
Ulukyn 6d233cdc2c Merge branch 'translation-german-fixes' into yubo 5 years ago
Ulukyn f337a28ae2 Merge branch 'translations' into translation-german-fixes 5 years ago
Ulukyn a36694614f Merge branch 'master' into translation-german-fixes 5 years ago
Ulukyn bcb8080d42 Merge branch 'master' into translations 5 years ago
Ulukyn 2c9193fa74 Merge branch 'ryzom/ui/improvements' into atys 5 years ago
Ulukyn 7e84ee9ec9 Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn ff5d4e941c Merge branch 'atys' into ryzom/ui/improvements 5 years ago
Nimetu f853adfcba Changed: show/hide rp_logo_x icons depending if texture is set or not 5 years ago
Nimetu 1f736fc347 Fixed: Scroll bar losing position when group window is minimized 5 years ago
Ulukyn 8f3aaee987 Changed: new name of Enclyclopedia window 5 years ago
Ulukyn 8d0172e1fb Merge branch 'new_interface_features' into yubo 5 years ago
Ulukyn f06eebf26c Merge branch 'new_interface_features' 5 years ago
Ulukyn 31ecfdf181 Merge branch 'pact_interface' 5 years ago
Ulukyn 4997576923 Merge branch 'storyline/s2e1' into atys 5 years ago
Ulukyn 9b6693763f Merge branch 'ryzom/ark/features' into atys 5 years ago
Ulukyn b9d1cf26b7 Merge branch 'atys' into ryzom/ark/features 5 years ago
Ulukyn ae25e054d4 Merge branch 'ryzom/ui/improvements' into atys 5 years ago
Ulukyn 269f8c4b2d Merge branch 'fix-menu-scroll' into atys 5 years ago
Ulukyn a3db3c6ba6 Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Nimetu 4d9aa3e684 Changed: refactor 5 years ago
Nimetu e99b7e257d Fixed: Icon text must be in lowercase for bitmap icons 5 years ago
Nimetu 94873c3d3f Changed: Preserve icon text case as is 5 years ago
Nimetu 586e49282f Changed: Translate icon text if starts with uiit 5 years ago
Nimetu ca20d582b3 Changed: Remove char limit from displaying icon label 5 years ago
Nimetu 7cb5c817a6 Fixed: Switching continents ignored user landmark show/hide state 5 years ago
Nimetu ec1dfca0c5 Added: setUserLandMark command to show/hide user map markers 5 years ago
Ulukyn df6c0969c2 Merge branch 'master' into pact_interface 5 years ago
Ulukyn 590abe8bfd Merge branch 'master' into new_interface_features 5 years ago
Ulukyn b31fa09af7 Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 3220a2aa47 Changed: new name of Enclyclopedia window 5 years ago
Ulukyn c639bb3c07 Merge remote-tracking branch 'origin/ryzom/ui/improvements' into yubo 5 years ago
Nimetu 2f635117f7 Changed: Require confirmation when removing landmark 5 years ago
Ulukyn 0cf26cbdf8 Merge branch 'fix-menu-scroll' into yubo 5 years ago
Nimetu 34083dee80 Changed: Adding icon to menu elements 5 years ago
Nimetu edb0c1fe73 Revert "Added: New way to add icons in Contextual Menus"
This reverts commit 188c3494fa.
5 years ago
Nimetu 9aabe0bf35 Revert "Fixed: Remove blank space when an item menu are inactive"
This reverts commit 10f864b234.
5 years ago
Nimetu 3b08d50b83 Fixed: Scroll bar losing position when group window is minimized 5 years ago
Ulukyn 523c07d9d9 Merge branch 'ryzom/ark/features' into atys 5 years ago
Ulukyn e89d3233dc Merge branch 'ryzom/ark/features' into yubo 5 years ago
Ulukyn 96e95c19ee Changed: Fix issue with webig dynChat 5 years ago
Ulukyn e10f79dbf2 Merge branch 'ryzom/ark/features' into yubo 5 years ago
Ulukyn 0aff3b4365 Revert "Changed: Fix issue with webig dynChat "
This reverts commit 14a375eea9f97cabb23199719cfa8022d9e907d1.
5 years ago
Ulukyn b0fa434c05 Merge branch 'ryzom/ark/features' into yubo 5 years ago
Ulukyn e349cb4399 Fixed: issue with webig dyn chat 5 years ago
Ulukyn f9cf9db049 Merge branch 'ryzom/ark/features' into yubo 5 years ago
Ulukyn 92f3c01a74 Merge branch 'atys' into ryzom/ark/features 5 years ago
Ulukyn 3ffab7c1a1 Merge branch 'storyline/s2e1' into yubo 5 years ago
Ulukyn 4df2489f59 Changed: updated way to moveToTarget 5 years ago
Ulukyn de6418bb9a Merge branch 'storyline/s2e1' into yubo 5 years ago
Ulukyn 1db0300515 Added: moveToTarget lua command and OpenArkUrl move action 5 years ago
Ulukyn 435b4362d3 Merge branch 'atys' into yubo 5 years ago
Ulukyn f9d37a390a Fixed: Only get news from npcs 5 years ago
Ulukyn 99413cff48 Merge branch 'storyline/s2e0' into atys 5 years ago
Ulukyn d45f6efcef Merge branch 'storyline/s2e0' into yubo 5 years ago
Ulukyn 01cb2cfdd8 Fixed: check if crystallized spell have a root icon for background or add it 5 years ago
Ulukyn 5f762edac4 Merge branch 'storyline/s2e0' into atys 5 years ago
Ulukyn bfadcfaff5 Merge branch 'storyline/s2e0' into yubo 5 years ago
Ulukyn 55172c93b5 Merge branch 'atys' into storyline/s2e0 5 years ago
Ulukyn c950373782 Merge branch 'storyline/s2e0' into yubo 5 years ago
Ulukyn b1d18ddb53 Added: New familly brick BSGMC 5 years ago
Ulukyn b869cd07d6 Merge branch 'storyline/s2e0' into yubo 5 years ago
Ulukyn aaa24fd0f4 Merge branch 'storyline/s2e0' into atys 5 years ago
Ulukyn 6747613b03 Added: New familly brick BSGMC 5 years ago
Ulukyn ac6afb7b2f Merge branch 'stline/s2e0' 5 years ago
Ulukyn 4048ef29db Merge remote-tracking branch 'origin/webig-fixes' into atys 5 years ago
Ulukyn b5b395c127 Merge branch 'ryzom/ui/improvements' into atys 5 years ago
Ulukyn a7d2175f93 Merge remote-tracking branch 'origin/webig-fixes' into yubo 5 years ago
Ulukyn b16d132e1d Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn e3cef8803e Changed: Disable help phrase in a special case 5 years ago
Ulukyn cb2201a69a Merge branch 'master' into stline/s2e0 5 years ago
Nimetu dfeba1426a Fixed: Invalid table cell id 5 years ago
Ulukyn c9bec465bc Merge remote-tracking branch 'origin/webig-fixes' into yubo 5 years ago
Nimetu 7856e93723 Fixed: ah:html_submit_form without caller object 5 years ago
Nimetu 8f59a71e3c Fixed: html button with empty formid attribute 5 years ago
Nimetu 15433b263b Changed: Add proper ids to groups in webig 5 years ago
Ulukyn 58a731628b Merge remote-tracking branch 'origin/ryzom/sheets' into atys 5 years ago
Ulukyn eb8daeb652 Merge remote-tracking branch 'origin/ryzom/sheets' into yubo 5 years ago
Ulukyn c6d5163c1d Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 2c63a3aa96 Merge branch 'ryzom/ui/improvements' into atys 5 years ago
Ulukyn 4709e766b9 Fixed: bad commit part 5 years ago
Ulukyn b2207337fa Merge branch 'ryzom/ui/improvements' into atys 5 years ago
Ulukyn 47dc707c91 Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 232af164ed Changed: remove sound of animals if sound context == 999 (for zig f 5 years ago
Ulukyn f18101d97e Added: Increase global density of vegetable 5 years ago
Ulukyn 0df2bdec2b Merge branch 'ryzom/ui/improvements' into atys 5 years ago
Ulukyn ed17e66d97 Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 7f149563f6 Changed: fixed issue with bad continent names 5 years ago
Nimetu e22d271408 Added: require-all-skills property to sbrick sheet 5 years ago
Ulukyn d77d3b7102 Merge branch 'master' into new_interface_features 5 years ago
Ulukyn e049c34c8d Merge branch 'ryzom/ark/features' into atys 5 years ago
Ulukyn 6114cb1044 Merge branch 'ryzom/ui/improvements' into atys 5 years ago
Ulukyn 609d6b470f Merge branch 'feature-new-forage-sbrick' 5 years ago
Ulukyn 414011ee37 Merge branch 'master' into feature-new-forage-sbrick 5 years ago
Ulukyn b558a1a18b Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn b033942d36 Merge remote-tracking branch 'origin/ryzom/ui/improvements' into ryzom/ui/improvements 5 years ago
Ulukyn de8c9dddcb Added: new option to chat with npc when fame are < -30. Finish fast and temporary hack for who_am_i hide 5 years ago
Ulukyn 6e00000b9b Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 15ce2cd39c Added: new option to chat with npc when fame are < -30. Finish fast and temporary hack for who_am_i hide 5 years ago
Ulukyn f9738713a7 Changed: replace PrintfCommands by loadingTexts in cff to prevent overwrite of default values in user client.cfg 5 years ago
Ulukyn 20b1f3a4c5 Merge branch 'ryzom/ark/features' into yubo 5 years ago
Ulukyn 586d84bc20 Added: getContinentSheet lua function 5 years ago
Ulukyn b88341792a Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 1c562ddbe6 Merge remote-tracking branch 'origin/ryzom/ui/improvements' into ryzom/ui/improvements 5 years ago
Ulukyn 4675b8b8b9 Added: new way to manage news at loading screen 5 years ago
Ulukyn d2edcbf4ee Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 954151ca73 Added: new way to manage news at loading screen 5 years ago
Ulukyn 45b1bab23f Changed: Updated PrintfCommands for next Season 5 years ago
Ulukyn 123197b90b Merge branch 'atys' into yubo 5 years ago
Ulukyn 4b847a086a Changed: made setMap command available in FINAL_VERSION 5 years ago
Ulukyn 9f61f08e74 Merge branch 'new_interface_features' into yubo 5 years ago
Ulukyn aacbcf1e65 Merge branch 'master' into yubo 5 years ago
Ulukyn c838136d1a Merge branch 'master' into origin/new_interface_features 5 years ago
Ulukyn 0455d07125 Merge branch 'new_interface_features' 5 years ago
Ulukyn 6785217b3a Merge branch 'ryzom/ark/features' into atys 5 years ago
Ulukyn cc5423fdd5 Merge branch 'ryzom/ark/features' into yubo 5 years ago
Ulukyn c22f8776f4 Added: encodeToHexa and decodeFromHexa 5 years ago
Nimetu f5c0cbcdf3 Changed: Also show item parts quantity on craft sbrick info window 5 years ago
Nimetu 8b2108af2f Merge commit 'fec9975f5' into atys 5 years ago
Ulukyn a7ca6f4499 Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 9e5f20a679 Fixed: missing check 5 years ago
Ulukyn 11573ee85a Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 48a9a84d0e Merge branch 'ryzom/ark/features' into yubo 5 years ago
Ulukyn 2f27af125e Added: encodeURLParam 5 years ago
Ulukyn 10f864b234 Fixed: Remove blank space when an item menu are inactive 5 years ago
Ulukyn 0ac92bc08b Merge branch 'ryzom/ark/features' into yubo 5 years ago
Ulukyn 34c1265bce Revert "Merge remote-tracking branch 'origin/ryzom/ark/features' into ryzom/ark/features"
This reverts commit a6ee9fec63.
5 years ago
Ulukyn a6ee9fec63 Merge remote-tracking branch 'origin/ryzom/ark/features' into ryzom/ark/features 5 years ago
Ulukyn fe008c0e52 Added: moveCam and setCamMode lua functions 5 years ago
Ulukyn 935c5df73a Merge branch 'ryzom/ark/features' into yubo 5 years ago
Ulukyn 7a0737e759 Added: moveCam and setCamMode lua functions 5 years ago
Ulukyn 09d8346558 Merge branch 'atys' into ryzom/ark/features 5 years ago
Ulukyn 7f53767d85 Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
karu 6a7fc98a52 Added: Show disabled until timer on icon 5 years ago
Ulukyn 3d919974cf Merge branch 'atys' into yubo 5 years ago
Ulukyn 691bf67c4d Changed: Updated version to 3.6.0 5 years ago
Ulukyn f053eaa157 Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 30fabcbd0a Changed: Improvements in game context menu 5 years ago
Ulukyn 3966020294 Merge branch 'new_interface_features' into yubo 5 years ago
Ulukyn eeac201cf3 Merge branch 'master' into new_interface_features 5 years ago
Ulukyn 357e3f07e4 Merge branch 'ryzom/ui/improvements' into yubo 5 years ago
Ulukyn 188c3494fa Added: New way to add icons in Contextual Menus 5 years ago
Ulukyn 51776f9203 Merge branch 'storyline' into yubo 5 years ago
Ulukyn 7b8a4e2210 Merge branch 'new_interface_features' into yubo 5 years ago
Ulukyn 762dcd15e2 Merge branch 'new_interface_features' 5 years ago
Ulukyn ac43b90ba0 Merge branch 'master' into new_interface_features 5 years ago
Ulukyn df3c7c2f2e Merge remote-tracking branch 'origin/event_atysmas' 5 years ago
Ulukyn 780b9c7e63 Merge branch 'new_interface_features' 5 years ago
Ulukyn f4ee795fde Merge branch 'new_interface_features' into yubo 5 years ago
Ulukyn c521de1d48 Merge branch 'master' into new_interface_features 5 years ago
Riasan d5ceb97fa0 Merge branch 'master' into event_atysmas 5 years ago
Ulukyn cdc33730ad Merge branch 'rewards' 5 years ago
Ulukyn 305a27f0db Merge branch 'master' into rewards 5 years ago
Nimetu 4c1daee42c Merge with develop
--HG--
branch : yubo
5 years ago
Ulu Kyn b5b8de283b Merge with ark
--HG--
branch : atys
5 years ago
Ulu Kyn 7b3c09f873 Merge with ark
--HG--
branch : yubo
5 years ago
Ulu Kyn 3f7fc2e870 Fusion
--HG--
branch : yubo
5 years ago
Ulu Kyn 4c0438d702 Added: setChar3dDBfromVPX and getRefHeightScale lua commands
Added: getPlayerVpaHex, getPlayerVpbHex, getPlayerVpcHex lua commands
Added: getTargetVpaHex, getTargetVpbHex, getTargetVpcHex lua commands

--HG--
branch : ark
5 years ago
Ulu Kyn 139b03f0f1 Added: Add OBSERVER privs to teleport from map option
--HG--
branch : atys
5 years ago
Ulu Kyn 99caf036ff Fixed: Revert Bad commit
--HG--
branch : yubo
5 years ago
Ulu Kyn 6c35550c83 Merge with WinVS2017_debug
--HG--
branch : yubo
5 years ago
Ulu Kyn 8221ee2eb9 Merge with ark
--HG--
branch : yubo
5 years ago
Ulu Kyn fd1f151504 Fusion
--HG--
branch : yubo
5 years ago
Ulu Kyn c43b4b8bc0 Fusion
--HG--
branch : ark
5 years ago
Ulu Kyn a806758fad Added: brodcast messages can now trigger lua code
--HG--
branch : ark
5 years ago
Ulu Kyn 58e24f9c58 Added: run_action and stop_action lua to simulate key_press actions
--HG--
branch : ark
5 years ago
Herrah 99ededcfcb fix for error "cannot convert argument 1 from 'std::wstring' to 'LPCWSTR'"
--HG--
branch : fix-WinVS2017_debug
5 years ago
Ulu Kyn e32e4492ce Merge with ark
--HG--
branch : atys
5 years ago
Ulu Kyn e3dc99e078 Fixed: Change way to load lua zone files when are in a bnp
--HG--
branch : ark
5 years ago
Nuno Gonçalves 9e406019d8 Merge with develop
--HG--
branch : atys
5 years ago
Nuno Gonçalves 19789a2544 Merge with develop
--HG--
branch : atys
5 years ago
Nimetu e4cce24f80 Merge with html-improvements
--HG--
branch : yubo
5 years ago
Nimetu 2e3fa918d4 Merge with html-improvements
--HG--
branch : yubo
5 years ago
Nuno Gonçalves 89973681a2 Fusion
--HG--
branch : yubo
5 years ago
Nuno Gonçalves 683af88cb9 Merge ark into yubo
--HG--
branch : yubo
5 years ago
Nimetu da5b7212f8 Merge with html-improvements
--HG--
branch : yubo
5 years ago
Nimetu 14b1c1232a Merge with html-improvements
--HG--
branch : yubo
5 years ago
Nuno Gonçalves de69dfc285 Merge from new_interface_features 5 years ago
Nuno Gonçalves f5776610f1 Merge from new_interface_features 5 years ago
Inky 11f2044c7d Fusion 5 years ago
Nimetu b53d797745 Merge with feature-closest-landmarks-menu
--HG--
branch : yubo
5 years ago
Nimetu 8b4c179a15 Merge with develop
--HG--
branch : yubo
5 years ago
ulukyn 959d52fd80 Fusion avec fix-bitmap-crash
--HG--
branch : yubo
5 years ago
Nimetu b423c0f057 Merge with feature-item-icon-buffs
--HG--
branch : yubo
5 years ago
Nimetu 7148d476ad Merge with develop
--HG--
branch : yubo
5 years ago
Nimetu c9a5fbacd9 Changed: Disable r2_islands_textures, ai_build_wmap, build_world_packed_col because no server code in yubo/atys branch.
--HG--
branch : yubo
5 years ago
Inky bfbb8e1292 Merge with menu_navi
--HG--
branch : yubo
5 years ago
Inky 045a80b59e Changed: removed tabulation event since not used
--HG--
branch : menu_navi
5 years ago
Inky 1ad5cf7a8e Merge with menu_navi
--HG--
branch : yubo
5 years ago
Inky c752619f13 Fixed: missing stream.h and import select var
--HG--
branch : menu_navi
5 years ago
Inky 26aef169b1 Merge with menu_navi
--HG--
branch : yubo
5 years ago
Inky 8006dbeabe Changed: export reflect texture(pushed, over) on CCtrlTextButton element
--HG--
branch : menu_navi
5 years ago
Inky 6fdbdc9ed1 Fixed: record only key next/prior event on CCtrlScroll element
--HG--
branch : menu_navi
5 years ago
Inky f75e413994 Changed: new key pushed event: left-right-tabulation
--HG--
branch : menu_navi
5 years ago
Inky 3acbf83058 Merge with menu_navi
--HG--
branch : yubo
5 years ago
Inky 77496daef4 Changed: new key pushed event to export
--HG--
branch : menu_navi
5 years ago
Inky c545629a10 Changed: import modal auto select first occurence
--HG--
branch : menu_navi
5 years ago
Inky 1910f7bc86 Merge with menu_navi
--HG--
branch : yubo
5 years ago
Inky c1e76fcbb2 Changed: add character exportation handler
--HG--
branch : menu_navi
5 years ago
Inky 20fe11c53f Changed: add character importation handler
--HG--
branch : menu_navi
5 years ago
Inky 6fcb6f0669 Merge with menu_navi
--HG--
branch : yubo
5 years ago
Inky a7cdf29463 Merge with lua
--HG--
branch : yubo
5 years ago
Inky b2b16e3cce Changed: fusion selection and creation handler
--HG--
branch : menu_navi
5 years ago
Inky 0f3f64cdc2 Changed: character creation handler
Todo: fusion both handler

--HG--
branch : menu_navi
5 years ago
Inky c8927c9c4b Changed: update button selection handler keyset_select
--HG--
branch : menu_navi
5 years ago
Inky 5d1233e805 Changed: update button selection handler mainland_select
--HG--
branch : menu_navi
5 years ago
Inky f5e9b7703c Changed: added keyboard events to CCtrlScroll elements
--HG--
branch : menu_navi
5 years ago
Inky 098df688b9 Merge with menu_navi
--HG--
branch : yubo
5 years ago
Inky 6d16b46890 Merge with lua
--HG--
branch : yubo
5 years ago
Inky 331b0d8718 Fixed: bad condition to verify parent id
--HG--
branch : menu_navi
5 years ago
Inky d9cb317667 Merge with menu_navi
--HG--
branch : yubo
5 years ago
Inky 90e508032c Changed: character selection handler
--HG--
branch : menu_navi
5 years ago
Inky 4a5de4cb13 An attempt to support keyboard interaction out game
Create, select and delete character

--HG--
branch : menu_navi
5 years ago
Inky 9d294ef242 Merge with develop
--HG--
branch : yubo
5 years ago
Inky 860d6e2abb Merge with compatibility-develop
--HG--
branch : yubo
6 years ago
Inky bfab92082b Changed: char selection keyboard navigation handler
--HG--
branch : compatibility-develop
6 years ago
Inky 64e26124f8 Fusion 6 years ago
Inky 21dfa80b73 Changed: display version at login
--HG--
branch : compatibility-develop
6 years ago
Inky ac4d9efd8b Merge with lua
--HG--
branch : yubo
6 years ago
Inky 00f850f143 Merge with lua
--HG--
branch : compatibility-develop
6 years ago
Nimetu a4b3e57fd0 Merge with develop
--HG--
branch : yubo
6 years ago
Nimetu 8b2aef9317 Merge with develop
--HG--
branch : yubo
6 years ago
Nimetu c123f63afd Merge with feature-item-icon-buffs
--HG--
branch : yubo
6 years ago
Nimetu a22767af76 Merge with feature-item-icon-buffs
--HG--
branch : yubo
6 years ago
ulukyn f8af0da354 Étiquette Live-746 ajoutée à la révision 2102fb276eb6
--HG--
branch : yubo
6 years ago
Riasan 4f08aa3082 Merge: update with default 6 years ago
ulukyn 72d636ded1 Fusion 6 years ago
Riasan cba4d7948d Merge: update with chan_motd 6 years ago
ulukyn 739d000055 Merge from interface_textures 6 years ago
ulukyn 963162855c Merge from interface_textures 6 years ago
ulukyn 89ef083460 Fusion 6 years ago
Inky 795606628f Merge with chan_motd 6 years ago
Inky e572cc3e83 Fusion 6 years ago
ulukyn bf34575037 Merge from pact_interface 6 years ago
ulukyn 57a32f10ee Merge from interface_textures 6 years ago
ulukyn 6c9a8da387 Merge from new_interface_features 6 years ago
Riasan 2aa065d109 Merge: test fixes 6 years ago
ulukyn 41b0fac726 Merge from new_interface_features 6 years ago
ulukyn b7ec1c68ac Added: Commands in Animal menu to enter/leave a pet (zig) into the bag
Fixed: Pets inventory weight are correclty displayed now
6 years ago
ulukyn cc6159a9d5 Merge from pact_interface 6 years ago
Inky 438b521ece Changed: update msg.xml egs command for autopact 6 years ago
Ulukyn f5f4411a00 Fusion 6 years ago
Riasan 29cb0c579f Merge: update with default 6 years ago
ulukyn 8434cb1a34 Merge from haircuts 6 years ago
ulukyn 39004eb54b Merge from haircuts 6 years ago
Riasan d2df2043c5 Merge: test translations 6 years ago
Riasan d8cfde63f8 Merge: update with default 6 years ago
Nuno Gonçalves 617682afe6 Fusion 6 years ago
Nuno Gonçalves c9d19b4879 Adding: leveldesign bnp folder 6 years ago
ulukyn 0b507cba7b Merge from rewards 6 years ago
ulukyn db5a7b141a Merge with default 6 years ago
ulukyn 478e2a646f Merge from rewards 6 years ago
ulukyn 020c59153d Merge from rewards 6 years ago
ulukyn 4f1008a413 Merge with default 6 years ago
Riasan f14c4d7746 Merge: update with default 6 years ago
ulukyn 23fe859e19 Merge from translations 6 years ago
Riasan c6978f769f Merge:add deco_objects changes to yubo 6 years ago
Riasan 319ae23064 Merge:add translations changes to yubo 6 years ago
Riasan 3e2e6cb696 Merge: update with default 6 years ago
Riasan 3c66bf2ba2 Merge: update with default 6 years ago
Riasan 1390a45f71 Merge: update with default 6 years ago
ulukyn d599fa4c14 Auto-Merge from default 6 years ago
ulukyn b4d09e0774 Auto-Merge from default 6 years ago
ulukyn 6f65197479 Auto-Merge from default 6 years ago
ulukyn 569599281b Auto-Merge from default 6 years ago
ulukyn 10562b720b Auto-Merge from default 6 years ago
ulukyn 1fc73a8079 Auto-Merge from default 6 years ago
ulukyn f821ff6973 Auto-Merge from default 6 years ago
Riasan d51b3b2eae Merge: update with default 6 years ago
Riasan 90c99b0b0e Merge: fixes on default 6 years ago
Riasan 48b2e9799e Merge: update with default 6 years ago
Riasan 9c680f43ce Merge: from events_to_primitives 6 years ago
Riasan 537865cdb9 Merge: from marauder 6 years ago
ulukyn 60feb8bc57 Merge from purple_gubani 6 years ago
ulukyn dd6057ad71 Merge from rewards 6 years ago
Riasan 882e067fc0 Merge: update with default 6 years ago
Riasan a82a018f40 Merge: test matis_rite on Yubo 6 years ago
Riasan eb1c367464 Merge: test rewards on Yubo 6 years ago
teanwen 4ca7ea8957 Merge with purple_gubani 6 years ago
ulukyn 6c731f049e Merge from default 6 years ago
ulukyn 363a59d238 Merge from rewards 6 years ago
Riasan b59b8a51a9 Merge: test marauder on yubo 6 years ago
ulukyn 5648981968 Merge from rewards 6 years ago
Riasan c1510a8fb8 Merge: update with Default 6 years ago
Riasan beb3dca614 Merge: update with Default 6 years ago
Riasan 80204090d4 Merge: update with default 6 years ago
Riasan 57e55ed250 Merge: update with default 6 years ago
Riasan 5601d84d60 Merge: update with default 6 years ago
Riasan 2b24a51439 Merge: update with default 6 years ago
Riasan 3343f46e11 Merge: update with default 6 years ago
Riasan 82e5e1a4fc Merge: update with default 6 years ago
Riasan 19285bc8e9 Merge: update with default 6 years ago
Riasan cdbd2e1f47 Merge: update with default 6 years ago
Riasan f8a252abcf Merge: update with default 6 years ago
Ul U'Kyn 453c81bc7c Updated: Lot of fixes in PatchSystem 6 years ago
Riasan 56f450782f Merge: test fix_city_guards on Yubo 6 years ago
Riasan dda9dff6ba Merge: update with ark 6 years ago
Riasan e0266dedcb Merge: update with marauder 6 years ago
Riasan 28fd5a7265 Merge: update with purple_gubani 6 years ago
ulukyn 085770a098 Merge from purple_gubani 6 years ago
ulukyn a5f98add80 Merge from ark 6 years ago
ulukyn bb667c736c Changed: Increse MAX_INVENTORY_ANIMAL to 7, add AnimalTicket sitem type 6 years ago
ulukyn d824ff5baf Merge from deco_objects 7 years ago
ulukyn 6cc550732b Merge from marauder 7 years ago
ulukyn fcfb17c784 Changed: Increase FACTION_POINTS_, FAME:PLAYER and GUILD:FAME to 7 7 years ago
Riasan 22b06fdb3e Merge: test marauder on Yubo 7 years ago
Riasan 05baa720e9 Changed: static fame to display marauder fame (black_kami) into fame window 7 years ago
Riasan 8be4abf0fe default in matis_rite gemergt 7 years ago
Riasan f47f2b4801 default in purple_gubani gemergt 7 years ago
Riasan 7c8eb4b3c6 default in event_atysmas gemergt 7 years ago
Riasan 146ccbbe4c default in deco_objects gemergt 7 years ago
Ul U'Kyn eaf08e863e Update files after Patch 7 years ago
Riasan 5afbc26916 Merge: test translation on Yubo 7 years ago
Ul U'Kyn b5234633b4 Changed: sheet_id.bin and some patch system scripts 7 years ago
Riasan c60705a297 Merge: test deco_objects on Yubo 7 years ago
Ul U'Kyn 9d4829ec54 Changed: fixed patch system, update sheet_id.bin 7 years ago
Ul U'Kyn c37ef9592e Changed: Update sheet_id.bin, new nevrax@devl1:~/ryzom-data-dev$ 7 years ago
Ul U'Kyn af3fe227c8 Merge from default 8 years ago
Ul U'Kyn 0e122c76ba Changed: Added CREATE_TIME and SERIAL properties to items in database.xml 8 years ago
Nuno Gonçalves 14c7013348 Merge from default 8 years ago
Nuno Gonçalves fbf0d664fc Changed: commiting changes for new creatures of Xmas2016 8 years ago
Nuno Gonçalves 0fd0934111 Changed: Updated visual_slot.tab 8 years ago
Nuno Gonçalves aadf864e4e Changed: Updated sheets 8 years ago
vl f86da6ec78 Moving folders, cleaning repo. That's much better now ! :D 9 years ago

9
.gitignore vendored

@ -90,6 +90,7 @@ ylwrap
*.mk *.mk
# Visual Studio garbage # Visual Studio garbage
.vscode/
*.opensdf *.opensdf
UpgradeLog*.XML UpgradeLog*.XML
_UpgradeReport_Files _UpgradeReport_Files
@ -127,6 +128,9 @@ aes_state.txt
# intellij project folder # intellij project folder
.idea/ .idea/
# VSCode project folder
.vscode/
# Python cache # Python cache
*.pyd *.pyd
*.pyc *.pyc
@ -159,7 +163,9 @@ build/*
build-2010/* build-2010/*
build/* build/*
install/* install/*
win-build/
build_* build_*
install_*
nel/tools/build_gamedata/configuration/buildsite.py nel/tools/build_gamedata/configuration/buildsite.py
# Linux nel compile # Linux nel compile
@ -242,6 +248,9 @@ external_stlport
nel_tools* nel_tools*
ryzom_tools* ryzom_tools*
#personal projects
personal/
# Dumps # Dumps
*.dmp *.dmp

@ -1,27 +1,28 @@
4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 v0.8.0 4eddbaff0c5e5d685db96ee3e8427aa0fd96ac83 ryzomcore/v0.8.0
00d9b6e29e95f56785fbf85abe60afd34674f402 v0.9.0 00d9b6e29e95f56785fbf85abe60afd34674f402 ryzomcore/v0.9.0
79776c337176dd5b02e1a74fe5dfb703b91747aa v0.9.1 79776c337176dd5b02e1a74fe5dfb703b91747aa ryzomcore/v0.9.1
fedf2aa443d09707beed814b0f499c6a5519cc84 v0.10.0 fedf2aa443d09707beed814b0f499c6a5519cc84 ryzomcore/v0.10.0
edaa3624a56420b02ccc64c26059801a389927ee v0.11.0 edaa3624a56420b02ccc64c26059801a389927ee ryzomcore/v0.11.0
e3fe4855f22c3e75722e015dc33c091c340b3ad7 v0.11.1 e3fe4855f22c3e75722e015dc33c091c340b3ad7 ryzomcore/v0.11.1
9e583b717fd63be0be9fd60b99087abf1691ea49 v0.11.2 9e583b717fd63be0be9fd60b99087abf1691ea49 ryzomcore/v0.11.2
bfe5628e14a024ba7ea32e4b326ae433a07856b9 v0.11.3 bfe5628e14a024ba7ea32e4b326ae433a07856b9 ryzomcore/v0.11.3
9a6120735daa97c96ac5d85ca35c7f21f607bd87 v0.12.0 9a6120735daa97c96ac5d85ca35c7f21f607bd87 ryzomcore/v0.12.0
3e92c7104c20d6bc6c2147b4b5fc289e8621d322 v1.0.0 3e17907af67e8d66d80e6b714707bbf912607f2a ryzom-patch-3.0.0
8eb94c3549be898fdc4a7c6d791d2477bdc11a18 v1.0.1 153e0b605c9e0c83ba05b6428c62838b49cc84b2 ryzom-patch-3.0.1
3e17907af67e8d66d80e6b714707bbf912607f2a ryzom/3.0.0 9d41f2994d44b9aad92b83f945f114e4b6bed44a ryzom-patch-3.0.2
153e0b605c9e0c83ba05b6428c62838b49cc84b2 ryzom/3.0.1 4300cc14aad098b1f86ea4c55577b7fa4a4cb5d2 ryzom-patch-3.1.0
9d41f2994d44b9aad92b83f945f114e4b6bed44a ryzom/3.0.2 d4060f217f4f834cc62a33f2f1ccdf3c28298066 ryzom-patch-3.1.0-hotfix
4300cc14aad098b1f86ea4c55577b7fa4a4cb5d2 ryzom/3.1.0 043aaeb3d8a2a54177581b57bda87a9deaad510e ryzom-patch-3.1.0-april_patch
d4060f217f4f834cc62a33f2f1ccdf3c28298066 ryzom/3.1.0-hotfix 4036ecf59e83960f03acebc2089eb2ff5eeaed0a ryzom-patch-3.2.0
043aaeb3d8a2a54177581b57bda87a9deaad510e ryzom/3.1.0-april_patch 18403bb9485da3d9742c6f007a16d5619ebfb196 ryzom-patch-3.2.1
4036ecf59e83960f03acebc2089eb2ff5eeaed0a ryzom/3.2.0 822ff8f8917ad66e09e2c21c983282f6f693b9f6 ryzom-patch-3.3.0
18403bb9485da3d9742c6f007a16d5619ebfb196 ryzom/3.2.1 00dde390a394fce9da06c2f3264140282158d39f ryzom-patch-3.3.0
822ff8f8917ad66e09e2c21c983282f6f693b9f6 ryzom/3.3.0 dcd4c4d161ef775136e18c7e8f5072b75dede27e ryzom-patch-3.3.1
00dde390a394fce9da06c2f3264140282158d39f ryzom/3.3.0 fc4be8ebec5ca754ef4453bc6a9faef90837c674 ryzom-patch-3.4.0
dcd4c4d161ef775136e18c7e8f5072b75dede27e ryzom/3.3.1 70eba02e8eab6920586dbabf74e9e8180c729980 ryzom-patch-3.4.0 Steam Fix
fc4be8ebec5ca754ef4453bc6a9faef90837c674 ryzom/3.4.0 3941482843f9cd130cfc16634efc08d34a98ed35 ryzom-patch-3.4.0 Atysmas
70eba02e8eab6920586dbabf74e9e8180c729980 ryzom/3.4.0-steam_fix ecae9feb4cceb78103e5d7236caccaf450796cdb ryzom-patch-3.5.0
3941482843f9cd130cfc16634efc08d34a98ed35 ryzom/3.4.0-atysmas 95783afa226f241062134eb62f4323295d29ac84 ryzom-patch-3.5.0.9637
ecae9feb4cceb78103e5d7236caccaf450796cdb ryzom/3.5.0 2102fb276eb69d49ed4923042215312a63c47c08 Live-746
95783afa226f241062134eb62f4323295d29ac84 ryzom/3.5.0.9637 8eb94c3549be898fdc4a7c6d791d2477bdc11a18 ryzomcore/v1.0.1
3e92c7104c20d6bc6c2147b4b5fc289e8621d322 ryzomcore/v1.0.0

@ -34,11 +34,37 @@ IF(COMMAND cmake_policy)
ENDIF() ENDIF()
ENDIF() ENDIF()
#-----------------------------------------------------------------------------
# Downloads and install Hunger into HUNTER_ROOT directory.
OPTION(HUNTER_ENABLED "Enable Hunter package manager" OFF)
IF(HUNTER_ENABLED)
INCLUDE("CMakeModules/HunterGate.cmake")
HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.23.321.tar.gz"
SHA1 "5e53cbb0429037ea8e2592bfd92704b8ff3ab492"
FILEPATH "${CMAKE_CURRENT_LIST_DIR}/CMakeModules/HunterConfig.cmake"
)
# default options for hunterized build
SET(WITH_STATIC ON CACHE BOOL "static" FORCE)
SET(WITH_STATIC_DRIVERS ON CACHE BOOL "static drivers" FORCE)
SET(WITH_STATIC_CURL ON CACHE BOOL "static curl" FORCE)
SET(WITH_STATIC_LIBXML2 ON CACHE BOOL "static libxml2" FORCE)
SET(WITH_STATIC_EXTERNAL ON CACHE BOOL "static external" FORCE)
SET(WITH_EXTERNAL OFF CACHE BOOL "external libs" FORCE)
ENDIF()
#-----------------------------------------------------------------------------
INCLUDE(nel) INCLUDE(nel)
INCLUDE(ConfigureChecks) INCLUDE(ConfigureChecks)
INCLUDE(CheckDepends) INCLUDE(CheckDepends)
INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL) INCLUDE(${CMAKE_ROOT}/Modules/Documentation.cmake OPTIONAL)
MESSAGE("EXTERNAL ${WITH_EXTERNAL}")
# Force out of source builds. # Force out of source builds.
CHECK_OUT_OF_SOURCE() CHECK_OUT_OF_SOURCE()
@ -54,13 +80,13 @@ ENDIF()
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(RyzomCore CXX C) PROJECT(RyzomCore CXX C)
SET(NL_VERSION_MAJOR 1) SET(NL_VERSION_MAJOR 1)
SET(NL_VERSION_MINOR 0) SET(NL_VERSION_MINOR 1)
SET(NL_VERSION_PATCH 2) SET(NL_VERSION_PATCH 0 CACHE STRING "Patch version")
SET(YEAR "2001-${CURRENT_YEAR}") SET(YEAR "2001-${CURRENT_YEAR}")
SET(AUTHOR "Winch Gate and The Ryzom Core Community") SET(AUTHOR "Winch Gate and The Ryzom Core Community")
SET(RYZOM_VERSION_MAJOR 3) SET(RYZOM_VERSION_MAJOR 3)
SET(RYZOM_VERSION_MINOR 5) SET(RYZOM_VERSION_MINOR 6)
SET(RYZOM_VERSION_PATCH 0) SET(RYZOM_VERSION_PATCH 0)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ -102,6 +128,7 @@ SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING
SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Edit Account URL") SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Edit Account URL")
SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Forget Password URL") SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://open.ryzom.dev/ams/" CACHE STRING "Ryzom Client Forget Password URL")
SET(RYZOM_CLIENT_PATCH_URL "https://cdn.ryzom.dev/open/patch/" CACHE STRING "Ryzom Client Patch URL") SET(RYZOM_CLIENT_PATCH_URL "https://cdn.ryzom.dev/open/patch/" CACHE STRING "Ryzom Client Patch URL")
SET(RYZOM_CLIENT_APP_NAME "default")
SET(RYZOM_WEBIG_MAIN_URL "https://open.ryzom.dev/" CACHE STRING "Ryzom Client WebIG Main URL") SET(RYZOM_WEBIG_MAIN_URL "https://open.ryzom.dev/" CACHE STRING "Ryzom Client WebIG Main URL")
SET(RYZOM_WEBIG_TRUSTED_DOMAIN "open.ryzom.dev" CACHE STRING "Ryzom Client WebIG Trusted Domain") SET(RYZOM_WEBIG_TRUSTED_DOMAIN "open.ryzom.dev" CACHE STRING "Ryzom Client WebIG Trusted Domain")
@ -110,10 +137,11 @@ SET(RYZOM_WEBIG_TRUSTED_DOMAIN "open.ryzom.dev" CACHE STRING "Ryzom Client
# urls when compiling ryzom live client # urls when compiling ryzom live client
IF(WITH_RYZOM_LIVE) IF(WITH_RYZOM_LIVE)
MESSAGE("Using RYZOM_LIVE urls") MESSAGE("Using RYZOM_LIVE urls")
SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://account.ryzom.com/signup/from_client.php") SET(RYZOM_CLIENT_CREATE_ACCOUNT_URL "https://me.ryzom.com")
SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://account.ryzom.com/payment_profile/index.php") SET(RYZOM_CLIENT_EDIT_ACCOUNT_URL "https://me.ryzom.com")
SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://account.ryzom.com/payment_profile/lost_secure_password.php") SET(RYZOM_CLIENT_FORGET_PASSWORD_URL "https://me.ryzom.com/?forget_password=1")
SET(RYZOM_CLIENT_PATCH_URL "http://dl.ryzom.com/patch_live") SET(RYZOM_CLIENT_PATCH_URL "http://dl.ryzom.com/patch_live")
SET(RYZOM_CLIENT_APP_NAME "ryzom_live")
SET(RYZOM_WEBIG_MAIN_URL "https://app.ryzom.com/") SET(RYZOM_WEBIG_MAIN_URL "https://app.ryzom.com/")
SET(RYZOM_WEBIG_TRUSTED_DOMAIN "app.ryzom.com") SET(RYZOM_WEBIG_TRUSTED_DOMAIN "app.ryzom.com")
@ -132,6 +160,28 @@ IF(WIN32)
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(HUNTER_ENABLED)
## TODO: hack for freetype hunter package
SET(ON 1)
##
HUNTER_ADD_PACKAGE(ZLIB)
FIND_PACKAGE(ZLIB CONFIG REQUIRED)
SET(ZLIB_LIBRARY ZLIB::zlib)
HUNTER_ADD_PACKAGE(libxml2)
FIND_PACKAGE(libxml2 CONFIG REQUIRED)
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} libxml2::libxml2)
HUNTER_ADD_PACKAGE(OpenSSL)
FIND_PACKAGE(OpenSSL REQUIRED)
# TODO: is OpenSSL::Crypto only needed for WIN32?
SET(OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
# for precompiled headers, not needed if using TARGET_PRECOMPILE_HEADERS() from cmake 3.16+
SET(ZLIB_INCLUDE_DIR ZLIB_ROOT/include)
SET(LIBXML2_INCLUDE_DIR ${LIBXML2_ROOT}/include/libxml2)
ELSE()
FIND_PACKAGE(ZLIB REQUIRED) FIND_PACKAGE(ZLIB REQUIRED)
FIND_PACKAGE(LibXml2 REQUIRED) FIND_PACKAGE(LibXml2 REQUIRED)
FIND_PACKAGE(PNG REQUIRED) FIND_PACKAGE(PNG REQUIRED)
@ -142,6 +192,7 @@ FIND_PACKAGE(Jpeg)
IF(WIN32) IF(WIN32)
SET(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} Crypt32.lib) SET(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} Crypt32.lib)
ENDIF() ENDIF()
ENDIF() #hunter
IF(WITH_LIBOVR) IF(WITH_LIBOVR)
FIND_PACKAGE(LibOVR) FIND_PACKAGE(LibOVR)
@ -175,6 +226,20 @@ IF(WITH_STATIC)
IF(LIBLZMA_LIBRARIES) IF(LIBLZMA_LIBRARIES)
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES}) SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
ENDIF() ENDIF()
# under Linux and OS X, recent libxml2 versions are linked against libicu
# FIND_PACKAGE(Icu)
FIND_LIBRARY(ICU_LIBRARY icuuc)
IF(ICU_LIBRARY)
FIND_LIBRARY(ICU_DATA_LIBRARY icudata)
IF(ICU_LIBRARY)
MESSAGE(STATUS "ICU UC was found: ${ICU_LIBRARY}")
ELSE()
MESSAGE(STATUS "ICU UC was NOT found")
ENDIF()
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${ICU_DATA_LIBRARY} ${ICU_LIBRARY})
ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
@ -221,6 +286,7 @@ ENDIF()
INCLUDE(FindHelpers) INCLUDE(FindHelpers)
#TODO: hunter qt package
IF(WITH_QT5) IF(WITH_QT5)
FIND_QT5() FIND_QT5()
ENDIF() ENDIF()
@ -232,6 +298,7 @@ IF(WITH_QT)
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED) FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtXml QtOpenGL REQUIRED)
ENDIF() ENDIF()
#TODO: hunter assimp package
IF(WITH_ASSIMP) IF(WITH_ASSIMP)
FIND_PACKAGE(assimp REQUIRED) FIND_PACKAGE(assimp REQUIRED)
ENDIF() ENDIF()
@ -241,6 +308,17 @@ IF(WITH_NEL)
FIND_PACKAGE(CppTest) FIND_PACKAGE(CppTest)
ENDIF() ENDIF()
IF(HUNTER_ENABLED)
IF(WITH_GUI)
HUNTER_ADD_PACKAGE(luabind)
FIND_PACKAGE(Luabind REQUIRED)
ENDIF()
HUNTER_ADD_PACKAGE(CURL)
FIND_PACKAGE(CURL CONFIG REQUIRED)
# TODO: for nelgui
SET(CURL_LIBRARIES CURL::libcurl libxml2::libxml2)
ELSE()
IF(WITH_GUI) IF(WITH_GUI)
FIND_PACKAGE(Luabind REQUIRED) FIND_PACKAGE(Luabind REQUIRED)
ENDIF() ENDIF()
@ -294,6 +372,7 @@ IF(WITH_NEL)
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() #hunter
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/nel/include)
ADD_SUBDIRECTORY(nel) ADD_SUBDIRECTORY(nel)

@ -69,7 +69,13 @@ MACRO(FIND_CORRECT_LUA_VERSION)
ENDIF() ENDIF()
ELSE() ELSE()
# TODO: find a way to detect Lua version # TODO: find a way to detect Lua version
IF(WITH_LUA53) IF(HUNTER_ENABLED)
HUNTER_ADD_PACKAGE(Lua)
FIND_PACKAGE(Lua CONFIG REQUIRED)
SET(LUA_LIBRARIES Lua::lua_lib)
ELSEIF(WITH_LUA54)
FIND_PACKAGE(Lua54 REQUIRED)
ELSEIF(WITH_LUA53)
FIND_PACKAGE(Lua53 REQUIRED) FIND_PACKAGE(Lua53 REQUIRED)
ELSEIF(WITH_LUA52) ELSEIF(WITH_LUA52)
FIND_PACKAGE(Lua52 REQUIRED) FIND_PACKAGE(Lua52 REQUIRED)
@ -89,6 +95,21 @@ ENDIF()
SET(LIBRARY_NAME_RELEASE) SET(LIBRARY_NAME_RELEASE)
SET(LIBRARY_NAME_DEBUG) SET(LIBRARY_NAME_DEBUG)
IF(WITH_LUA54)
IF(WITH_STLPORT)
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua54)
LIST(APPEND LIBRARY_NAME_DEBUG luabind_stlport_lua54d)
ENDIF()
LIST(APPEND LIBRARY_NAME_RELEASE luabind_lua54)
LIST(APPEND LIBRARY_NAME_DEBUG luabind_lua54d)
ENDIF()
IF(HUNTER_ENABLED)
LIST(APPEND LIBRARY_NAME_RELEASE luabind luabind09)
LIST(APPEND LIBRARY_NAME_DEBUG luabindd luabind09-d)
ENDIF()
IF(WITH_LUA53) IF(WITH_LUA53)
IF(WITH_STLPORT) IF(WITH_STLPORT)
LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua53) LIST(APPEND LIBRARY_NAME_RELEASE luabind_stlport_lua53)

@ -501,6 +501,17 @@ IF(WINSDK_INCLUDE_DIR)
IF(WINSDK_VERSION STREQUAL "7.1" AND (MSVC11 OR MSVC12 OR MSVC14)) IF(WINSDK_VERSION STREQUAL "7.1" AND (MSVC11 OR MSVC12 OR MSVC14))
ADD_DEFINITIONS(-D_USING_V110_SDK71_) ADD_DEFINITIONS(-D_USING_V110_SDK71_)
ENDIF() ENDIF()
IF(NOT DXSDK_DIR)
MESSAGE("Using DirectX from Windows SDK (${WINSDK_LIBRARY_DIRS})")
SET(DXSDK_DIR ${WINSDK_DIR})
FIND_LIBRARY(DXSDK_GUID_LIBRARY dxguid ${WINSDK_LIBRARY_DIRS})
FIND_LIBRARY(DXSDK_DINPUT_LIBRARY dinput8 ${WINSDK_LIBRARY_DIRS})
FIND_LIBRARY(DXSDK_DSOUND_LIBRARY dsound ${WINSDK_LIBRARY_DIRS})
FIND_LIBRARY(DXSDK_XAUDIO_LIBRARY xaudio2 ${WINSDK_LIBRARY_DIRS})
# TODO: FIND_LIBRARY(DXSDK_D3DX9_LIBRARY d3dx9)
FIND_LIBRARY(DXSDK_D3D9_LIBRARY d3d9 ${WINSDK_LIBRARY_DIRS})
ENDIF()
ELSE() ELSE()
IF(NOT WindowsSDK_FIND_QUIETLY) IF(NOT WindowsSDK_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Windows SDK!") MESSAGE(STATUS "Warning: Unable to find Windows SDK!")

@ -0,0 +1,8 @@
# This file is parsed by HunterGate command
hunter_config(luabind
VERSION 0.9.1
URL "https://github.com/nimetu/luabind/tarball/2fa4606"
SHA1 "3b4646bab9f0b2362d7b8d71d78e40deaf3cc747"
)

@ -0,0 +1,537 @@
# Copyright (c) 2013-2019, Ruslan Baratov
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# This is a gate file to Hunter package manager.
# Include this file using `include` command and add package you need, example:
#
# cmake_minimum_required(VERSION 3.2)
#
# include("cmake/HunterGate.cmake")
# HunterGate(
# URL "https://github.com/path/to/hunter/archive.tar.gz"
# SHA1 "798501e983f14b28b10cda16afa4de69eee1da1d"
# )
#
# project(MyProject)
#
# hunter_add_package(Foo)
# hunter_add_package(Boo COMPONENTS Bar Baz)
#
# Projects:
# * https://github.com/hunter-packages/gate/
# * https://github.com/ruslo/hunter
option(HUNTER_ENABLED "Enable Hunter package manager support" ON)
if(HUNTER_ENABLED)
if(CMAKE_VERSION VERSION_LESS "3.2")
message(
FATAL_ERROR
"At least CMake version 3.2 required for Hunter dependency management."
" Update CMake or set HUNTER_ENABLED to OFF."
)
endif()
endif()
include(CMakeParseArguments) # cmake_parse_arguments
option(HUNTER_STATUS_PRINT "Print working status" ON)
option(HUNTER_STATUS_DEBUG "Print a lot info" OFF)
option(HUNTER_TLS_VERIFY "Enable/disable TLS certificate checking on downloads" ON)
set(HUNTER_ROOT "" CACHE FILEPATH "Override the HUNTER_ROOT.")
set(HUNTER_ERROR_PAGE "https://hunter.readthedocs.io/en/latest/reference/errors")
function(hunter_gate_status_print)
if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG)
foreach(print_message ${ARGV})
message(STATUS "[hunter] ${print_message}")
endforeach()
endif()
endfunction()
function(hunter_gate_status_debug)
if(HUNTER_STATUS_DEBUG)
foreach(print_message ${ARGV})
string(TIMESTAMP timestamp)
message(STATUS "[hunter *** DEBUG *** ${timestamp}] ${print_message}")
endforeach()
endif()
endfunction()
function(hunter_gate_error_page error_page)
message("------------------------------ ERROR ------------------------------")
message(" ${HUNTER_ERROR_PAGE}/${error_page}.html")
message("-------------------------------------------------------------------")
message("")
message(FATAL_ERROR "")
endfunction()
function(hunter_gate_internal_error)
message("")
foreach(print_message ${ARGV})
message("[hunter ** INTERNAL **] ${print_message}")
endforeach()
message("[hunter ** INTERNAL **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
message("")
hunter_gate_error_page("error.internal")
endfunction()
function(hunter_gate_fatal_error)
cmake_parse_arguments(hunter "" "ERROR_PAGE" "" "${ARGV}")
if("${hunter_ERROR_PAGE}" STREQUAL "")
hunter_gate_internal_error("Expected ERROR_PAGE")
endif()
message("")
foreach(x ${hunter_UNPARSED_ARGUMENTS})
message("[hunter ** FATAL ERROR **] ${x}")
endforeach()
message("[hunter ** FATAL ERROR **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
message("")
hunter_gate_error_page("${hunter_ERROR_PAGE}")
endfunction()
function(hunter_gate_user_error)
hunter_gate_fatal_error(${ARGV} ERROR_PAGE "error.incorrect.input.data")
endfunction()
function(hunter_gate_self root version sha1 result)
string(COMPARE EQUAL "${root}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("root is empty")
endif()
string(COMPARE EQUAL "${version}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("version is empty")
endif()
string(COMPARE EQUAL "${sha1}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("sha1 is empty")
endif()
string(SUBSTRING "${sha1}" 0 7 archive_id)
if(EXISTS "${root}/cmake/Hunter")
set(hunter_self "${root}")
else()
set(
hunter_self
"${root}/_Base/Download/Hunter/${version}/${archive_id}/Unpacked"
)
endif()
set("${result}" "${hunter_self}" PARENT_SCOPE)
endfunction()
# Set HUNTER_GATE_ROOT cmake variable to suitable value.
function(hunter_gate_detect_root)
# Check CMake variable
if(HUNTER_ROOT)
set(HUNTER_GATE_ROOT "${HUNTER_ROOT}" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT detected by cmake variable")
return()
endif()
# Check environment variable
if(DEFINED ENV{HUNTER_ROOT})
set(HUNTER_GATE_ROOT "$ENV{HUNTER_ROOT}" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT detected by environment variable")
return()
endif()
# Check HOME environment variable
if(DEFINED ENV{HOME})
set(HUNTER_GATE_ROOT "$ENV{HOME}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT set using HOME environment variable")
return()
endif()
# Check SYSTEMDRIVE and USERPROFILE environment variable (windows only)
if(WIN32)
if(DEFINED ENV{SYSTEMDRIVE})
set(HUNTER_GATE_ROOT "$ENV{SYSTEMDRIVE}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug(
"HUNTER_ROOT set using SYSTEMDRIVE environment variable"
)
return()
endif()
if(DEFINED ENV{USERPROFILE})
set(HUNTER_GATE_ROOT "$ENV{USERPROFILE}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug(
"HUNTER_ROOT set using USERPROFILE environment variable"
)
return()
endif()
endif()
hunter_gate_fatal_error(
"Can't detect HUNTER_ROOT"
ERROR_PAGE "error.detect.hunter.root"
)
endfunction()
function(hunter_gate_download dir)
string(
COMPARE
NOTEQUAL
"$ENV{HUNTER_DISABLE_AUTOINSTALL}"
""
disable_autoinstall
)
if(disable_autoinstall AND NOT HUNTER_RUN_INSTALL)
hunter_gate_fatal_error(
"Hunter not found in '${dir}'"
"Set HUNTER_RUN_INSTALL=ON to auto-install it from '${HUNTER_GATE_URL}'"
"Settings:"
" HUNTER_ROOT: ${HUNTER_GATE_ROOT}"
" HUNTER_SHA1: ${HUNTER_GATE_SHA1}"
ERROR_PAGE "error.run.install"
)
endif()
string(COMPARE EQUAL "${dir}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("Empty 'dir' argument")
endif()
string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("HUNTER_GATE_SHA1 empty")
endif()
string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" is_bad)
if(is_bad)
hunter_gate_internal_error("HUNTER_GATE_URL empty")
endif()
set(done_location "${dir}/DONE")
set(sha1_location "${dir}/SHA1")
set(build_dir "${dir}/Build")
set(cmakelists "${dir}/CMakeLists.txt")
hunter_gate_status_debug("Locking directory: ${dir}")
file(LOCK "${dir}" DIRECTORY GUARD FUNCTION)
hunter_gate_status_debug("Lock done")
if(EXISTS "${done_location}")
# while waiting for lock other instance can do all the job
hunter_gate_status_debug("File '${done_location}' found, skip install")
return()
endif()
file(REMOVE_RECURSE "${build_dir}")
file(REMOVE_RECURSE "${cmakelists}")
file(MAKE_DIRECTORY "${build_dir}") # check directory permissions
# Disabling languages speeds up a little bit, reduces noise in the output
# and avoids path too long windows error
file(
WRITE
"${cmakelists}"
"cmake_minimum_required(VERSION 3.2)\n"
"project(HunterDownload LANGUAGES NONE)\n"
"include(ExternalProject)\n"
"ExternalProject_Add(\n"
" Hunter\n"
" URL\n"
" \"${HUNTER_GATE_URL}\"\n"
" URL_HASH\n"
" SHA1=${HUNTER_GATE_SHA1}\n"
" DOWNLOAD_DIR\n"
" \"${dir}\"\n"
" TLS_VERIFY\n"
" ${HUNTER_TLS_VERIFY}\n"
" SOURCE_DIR\n"
" \"${dir}/Unpacked\"\n"
" CONFIGURE_COMMAND\n"
" \"\"\n"
" BUILD_COMMAND\n"
" \"\"\n"
" INSTALL_COMMAND\n"
" \"\"\n"
")\n"
)
if(HUNTER_STATUS_DEBUG)
set(logging_params "")
else()
set(logging_params OUTPUT_QUIET)
endif()
hunter_gate_status_debug("Run generate")
# Need to add toolchain file too.
# Otherwise on Visual Studio + MDD this will fail with error:
# "Could not find an appropriate version of the Windows 10 SDK installed on this machine"
if(EXISTS "${CMAKE_TOOLCHAIN_FILE}")
get_filename_component(absolute_CMAKE_TOOLCHAIN_FILE "${CMAKE_TOOLCHAIN_FILE}" ABSOLUTE)
set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=${absolute_CMAKE_TOOLCHAIN_FILE}")
else()
# 'toolchain_arg' can't be empty
set(toolchain_arg "-DCMAKE_TOOLCHAIN_FILE=")
endif()
string(COMPARE EQUAL "${CMAKE_MAKE_PROGRAM}" "" no_make)
if(no_make)
set(make_arg "")
else()
# Test case: remove Ninja from PATH but set it via CMAKE_MAKE_PROGRAM
set(make_arg "-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}")
endif()
execute_process(
COMMAND
"${CMAKE_COMMAND}"
"-H${dir}"
"-B${build_dir}"
"-G${CMAKE_GENERATOR}"
"${toolchain_arg}"
${make_arg}
WORKING_DIRECTORY "${dir}"
RESULT_VARIABLE download_result
${logging_params}
)
if(NOT download_result EQUAL 0)
hunter_gate_internal_error(
"Configure project failed."
"To reproduce the error run: ${CMAKE_COMMAND} -H${dir} -B${build_dir} -G${CMAKE_GENERATOR} ${toolchain_arg} ${make_arg}"
"In directory ${dir}"
)
endif()
hunter_gate_status_print(
"Initializing Hunter workspace (${HUNTER_GATE_SHA1})"
" ${HUNTER_GATE_URL}"
" -> ${dir}"
)
execute_process(
COMMAND "${CMAKE_COMMAND}" --build "${build_dir}"
WORKING_DIRECTORY "${dir}"
RESULT_VARIABLE download_result
${logging_params}
)
if(NOT download_result EQUAL 0)
hunter_gate_internal_error("Build project failed")
endif()
file(REMOVE_RECURSE "${build_dir}")
file(REMOVE_RECURSE "${cmakelists}")
file(WRITE "${sha1_location}" "${HUNTER_GATE_SHA1}")
file(WRITE "${done_location}" "DONE")
hunter_gate_status_debug("Finished")
endfunction()
# Must be a macro so master file 'cmake/Hunter' can
# apply all variables easily just by 'include' command
# (otherwise PARENT_SCOPE magic needed)
macro(HunterGate)
if(HUNTER_GATE_DONE)
# variable HUNTER_GATE_DONE set explicitly for external project
# (see `hunter_download`)
set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
endif()
# First HunterGate command will init Hunter, others will be ignored
get_property(_hunter_gate_done GLOBAL PROPERTY HUNTER_GATE_DONE SET)
if(NOT HUNTER_ENABLED)
# Empty function to avoid error "unknown function"
function(hunter_add_package)
endfunction()
set(
_hunter_gate_disabled_mode_dir
"${CMAKE_CURRENT_LIST_DIR}/cmake/Hunter/disabled-mode"
)
if(EXISTS "${_hunter_gate_disabled_mode_dir}")
hunter_gate_status_debug(
"Adding \"disabled-mode\" modules: ${_hunter_gate_disabled_mode_dir}"
)
list(APPEND CMAKE_PREFIX_PATH "${_hunter_gate_disabled_mode_dir}")
endif()
elseif(_hunter_gate_done)
hunter_gate_status_debug("Secondary HunterGate (use old settings)")
hunter_gate_self(
"${HUNTER_CACHED_ROOT}"
"${HUNTER_VERSION}"
"${HUNTER_SHA1}"
_hunter_self
)
include("${_hunter_self}/cmake/Hunter")
else()
set(HUNTER_GATE_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}")
string(COMPARE NOTEQUAL "${PROJECT_NAME}" "" _have_project_name)
if(_have_project_name)
hunter_gate_fatal_error(
"Please set HunterGate *before* 'project' command. "
"Detected project: ${PROJECT_NAME}"
ERROR_PAGE "error.huntergate.before.project"
)
endif()
cmake_parse_arguments(
HUNTER_GATE "LOCAL" "URL;SHA1;GLOBAL;FILEPATH" "" ${ARGV}
)
string(COMPARE EQUAL "${HUNTER_GATE_SHA1}" "" _empty_sha1)
string(COMPARE EQUAL "${HUNTER_GATE_URL}" "" _empty_url)
string(
COMPARE
NOTEQUAL
"${HUNTER_GATE_UNPARSED_ARGUMENTS}"
""
_have_unparsed
)
string(COMPARE NOTEQUAL "${HUNTER_GATE_GLOBAL}" "" _have_global)
string(COMPARE NOTEQUAL "${HUNTER_GATE_FILEPATH}" "" _have_filepath)
if(_have_unparsed)
hunter_gate_user_error(
"HunterGate unparsed arguments: ${HUNTER_GATE_UNPARSED_ARGUMENTS}"
)
endif()
if(_empty_sha1)
hunter_gate_user_error("SHA1 suboption of HunterGate is mandatory")
endif()
if(_empty_url)
hunter_gate_user_error("URL suboption of HunterGate is mandatory")
endif()
if(_have_global)
if(HUNTER_GATE_LOCAL)
hunter_gate_user_error("Unexpected LOCAL (already has GLOBAL)")
endif()
if(_have_filepath)
hunter_gate_user_error("Unexpected FILEPATH (already has GLOBAL)")
endif()
endif()
if(HUNTER_GATE_LOCAL)
if(_have_global)
hunter_gate_user_error("Unexpected GLOBAL (already has LOCAL)")
endif()
if(_have_filepath)
hunter_gate_user_error("Unexpected FILEPATH (already has LOCAL)")
endif()
endif()
if(_have_filepath)
if(_have_global)
hunter_gate_user_error("Unexpected GLOBAL (already has FILEPATH)")
endif()
if(HUNTER_GATE_LOCAL)
hunter_gate_user_error("Unexpected LOCAL (already has FILEPATH)")
endif()
endif()
hunter_gate_detect_root() # set HUNTER_GATE_ROOT
# Beautify path, fix probable problems with windows path slashes
get_filename_component(
HUNTER_GATE_ROOT "${HUNTER_GATE_ROOT}" ABSOLUTE
)
hunter_gate_status_debug("HUNTER_ROOT: ${HUNTER_GATE_ROOT}")
if(NOT HUNTER_ALLOW_SPACES_IN_PATH)
string(FIND "${HUNTER_GATE_ROOT}" " " _contain_spaces)
if(NOT _contain_spaces EQUAL -1)
hunter_gate_fatal_error(
"HUNTER_ROOT (${HUNTER_GATE_ROOT}) contains spaces."
"Set HUNTER_ALLOW_SPACES_IN_PATH=ON to skip this error"
"(Use at your own risk!)"
ERROR_PAGE "error.spaces.in.hunter.root"
)
endif()
endif()
string(
REGEX
MATCH
"[0-9]+\\.[0-9]+\\.[0-9]+[-_a-z0-9]*"
HUNTER_GATE_VERSION
"${HUNTER_GATE_URL}"
)
string(COMPARE EQUAL "${HUNTER_GATE_VERSION}" "" _is_empty)
if(_is_empty)
set(HUNTER_GATE_VERSION "unknown")
endif()
hunter_gate_self(
"${HUNTER_GATE_ROOT}"
"${HUNTER_GATE_VERSION}"
"${HUNTER_GATE_SHA1}"
_hunter_self
)
set(_master_location "${_hunter_self}/cmake/Hunter")
if(EXISTS "${HUNTER_GATE_ROOT}/cmake/Hunter")
# Hunter downloaded manually (e.g. by 'git clone')
set(_unused "xxxxxxxxxx")
set(HUNTER_GATE_SHA1 "${_unused}")
set(HUNTER_GATE_VERSION "${_unused}")
else()
get_filename_component(_archive_id_location "${_hunter_self}/.." ABSOLUTE)
set(_done_location "${_archive_id_location}/DONE")
set(_sha1_location "${_archive_id_location}/SHA1")
# Check Hunter already downloaded by HunterGate
if(NOT EXISTS "${_done_location}")
hunter_gate_download("${_archive_id_location}")
endif()
if(NOT EXISTS "${_done_location}")
hunter_gate_internal_error("hunter_gate_download failed")
endif()
if(NOT EXISTS "${_sha1_location}")
hunter_gate_internal_error("${_sha1_location} not found")
endif()
file(READ "${_sha1_location}" _sha1_value)
string(TOLOWER "${_sha1_value}" _sha1_value_lower)
string(TOLOWER "${HUNTER_GATE_SHA1}" _HUNTER_GATE_SHA1_lower)
string(COMPARE EQUAL "${_sha1_value_lower}" "${_HUNTER_GATE_SHA1_lower}" _is_equal)
if(NOT _is_equal)
hunter_gate_internal_error(
"Short SHA1 collision:"
" ${_sha1_value} (from ${_sha1_location})"
" ${HUNTER_GATE_SHA1} (HunterGate)"
)
endif()
if(NOT EXISTS "${_master_location}")
hunter_gate_user_error(
"Master file not found:"
" ${_master_location}"
"try to update Hunter/HunterGate"
)
endif()
endif()
include("${_master_location}")
set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
endif()
endmacro()

@ -121,6 +121,22 @@ MACRO(NL_ADD_RUNTIME_FLAGS name)
ENDMACRO(NL_ADD_RUNTIME_FLAGS) ENDMACRO(NL_ADD_RUNTIME_FLAGS)
MACRO(NL_ADD_STATIC_VID_DRIVERS name) MACRO(NL_ADD_STATIC_VID_DRIVERS name)
IF(HUNTER_ENABLED)
IF(WIN32)
SET(drv_suffix "_win")
ELSE()
SET(drv_suffix "")
ENDIF()
IF(WIN32 AND WITH_DRIVER_DIRECT3D)
TARGET_LINK_LIBRARIES(${name} nel_drv_direct3d${drv_suffix})
ENDIF()
IF(WITH_DRIVER_OPENGL)
TARGET_LINK_LIBRARIES(${name} nel_drv_opengl${drv_suffix})
ENDIF()
IF(WITH_DRIVER_OPENGLES)
TARGET_LINK_LIBRARIES(${name} nel_drv_opengles${drv_suffix})
ENDIF()
ELSE()
IF(WITH_STATIC_DRIVERS) IF(WITH_STATIC_DRIVERS)
IF(WIN32) IF(WIN32)
IF(WITH_DRIVER_DIRECT3D) IF(WITH_DRIVER_DIRECT3D)
@ -144,9 +160,29 @@ MACRO(NL_ADD_STATIC_VID_DRIVERS name)
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF()#hunter
ENDMACRO(NL_ADD_STATIC_VID_DRIVERS) ENDMACRO(NL_ADD_STATIC_VID_DRIVERS)
MACRO(NL_ADD_STATIC_SND_DRIVERS name) MACRO(NL_ADD_STATIC_SND_DRIVERS name)
IF(HUNTER_ENABLED)
IF(WIN32)
SET(drv_suffix "_win")
ELSE()
SET(drv_suffix "")
ENDIF()
IF(WIN32 AND WITH_DRIVER_DSOUND)
TARGET_LINK_LIBRARIES(${name} nel_drv_dsound${drv_suffix})
ENDIF()
IF(WIN32 AND WITH_DRIVER_XAUDIO2)
TARGET_LINK_LIBRARIES(${name} nel_drv_xaudio2${drv_suffix})
ENDIF()
IF(WITH_DRIVER_FMOD)
TARGET_LINK_LIBRARIES(${name} nel_drv_fmod${drv_suffix})
ENDIF()
IF(WITH_DRIVER_OPENAL)
TARGET_LINK_LIBRARIES(${name} nel_drv_openal${drv_suffix})
ENDIF()
ELSE()
IF(WITH_STATIC_DRIVERS) IF(WITH_STATIC_DRIVERS)
IF(WIN32) IF(WIN32)
IF(WITH_DRIVER_DSOUND) IF(WITH_DRIVER_DSOUND)
@ -175,6 +211,7 @@ MACRO(NL_ADD_STATIC_SND_DRIVERS name)
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() #hunter
ENDMACRO(NL_ADD_STATIC_SND_DRIVERS) ENDMACRO(NL_ADD_STATIC_SND_DRIVERS)
### ###
@ -249,6 +286,8 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
OPTION(WITH_ASSIMP "Use assimp exporter" OFF) OPTION(WITH_ASSIMP "Use assimp exporter" OFF)
OPTION(WITH_LIBGSF "Use libgsf for max file library" OFF) OPTION(WITH_LIBGSF "Use libgsf for max file library" OFF)
OPTION(WITH_FFMPEG "Use ffmpeg for audio decoder" OFF)
### ###
# GUI toolkits # GUI toolkits
### ###
@ -282,7 +321,7 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
OPTION(WITH_SNOWBALLS "Build Snowballs." OFF) OPTION(WITH_SNOWBALLS "Build Snowballs." OFF)
OPTION(WITH_TOOLS "Build Tools" OFF) OPTION(WITH_TOOLS "Build Tools" OFF)
OPTION(WITH_RYZOM_LIVE "Use ryzom.com urls" OFF) OPTION(WITH_RYZOM_LIVE "Use ryzom.com urls" ON)
ENDMACRO(NL_SETUP_DEFAULT_OPTIONS) ENDMACRO(NL_SETUP_DEFAULT_OPTIONS)
MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS)
@ -1193,7 +1232,11 @@ MACRO(SETUP_EXTERNAL)
ENDIF() ENDIF()
IF(WIN32) IF(WIN32)
IF (HUNTER_ENABLED)
FIND_PACKAGE(External QUIET)
ELSE()
FIND_PACKAGE(External REQUIRED) FIND_PACKAGE(External REQUIRED)
ENDIF()
# If using custom boost, we need to define the right variables used by official boost CMake module # If using custom boost, we need to define the right variables used by official boost CMake module
IF(DEFINED BOOST_DIR) IF(DEFINED BOOST_DIR)
@ -1236,7 +1279,7 @@ MACRO(SETUP_EXTERNAL)
IF(WIN32) IF(WIN32)
# Must include DXSDK before WINSDK # Must include DXSDK before WINSDK
FIND_PACKAGE(DirectXSDK REQUIRED) FIND_PACKAGE(DirectXSDK)
# IF(DXSDK_INCLUDE_DIR) # IF(DXSDK_INCLUDE_DIR)
# INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) # INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
# ENDIF() # ENDIF()
@ -1245,5 +1288,8 @@ MACRO(SETUP_EXTERNAL)
IF(MSVC) IF(MSVC)
FIND_PACKAGE(MSVC REQUIRED) FIND_PACKAGE(MSVC REQUIRED)
FIND_PACKAGE(WindowsSDK REQUIRED) FIND_PACKAGE(WindowsSDK REQUIRED)
IF(NOT DXSDK_DIR)
MESSAGE(FATAL_ERROR "DirectX SDK or DirectX files from Windows SDK not found.")
ENDIF()
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()

@ -1,42 +1,164 @@
jobs: jobs:
- job: ubuntu16 - job: ubuntu18
timeoutInMinutes: 120 timeoutInMinutes: 120
pool: pool:
vmImage: 'Ubuntu-16.04' vmImage: 'ubuntu-18.04'
steps: steps:
- script: | - script: |
sudo apt-get update sudo apt update
sudo apt-get install -y software-properties-common sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test # sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update sudo apt update
sudo apt-get install cmake build-essential -y sudo apt install cmake build-essential -y
sudo apt-get install gcc-8 g++-8 -y sudo apt install gcc-8 g++-8 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60
sudo apt-get install bison autoconf automake -y sudo apt install bison autoconf automake -y
sudo apt-get install libpng12-dev -y sudo apt install libpng-dev -y
sudo apt-get install libjpeg-dev -y sudo apt install libjpeg-dev -y
sudo apt-get install libgif-dev libfreetype6-dev -y sudo apt install libgif-dev libfreetype6-dev -y
sudo apt-get install freeglut3-dev -y sudo apt install freeglut3-dev -y
sudo apt-get install liblua5.1-dev libluabind-dev libcpptest-dev -y sudo apt install liblua5.2-dev libluabind-dev libcpptest-dev -y
sudo apt-get install libogg-dev libvorbis-dev libopenal-dev -y sudo apt install libogg-dev libvorbis-dev libopenal-dev -y
sudo apt-get install libavcodec-dev libavformat-dev libavdevice-dev libswscale-dev libpostproc-dev -y sudo apt install libavcodec-dev libavformat-dev libavdevice-dev libswscale-dev libpostproc-dev -y
sudo apt-get install libmysqlclient-dev -y sudo apt install libmysqlclient-dev -y
sudo apt-get install libxml2-dev -y sudo apt install libxml2-dev -y
sudo apt-get install libcurl4-openssl-dev libssl-dev -y sudo apt install libcurl4-openssl-dev libssl-dev -y
sudo apt-get install libsquish-dev -y sudo apt install libsquish-dev -y
sudo apt-get install liblzma-dev -y sudo apt install liblzma-dev -y
sudo apt-get install libgsf-1-dev -y sudo apt install libgsf-1-dev -y
sudo apt-get install qtbase5-dev qttools5-dev qttools5-dev-tools sudo apt install qtbase5-dev qttools5-dev qttools5-dev-tools
displayName: 'Dependencies'
- script: |
mkdir build
cmake --version
cd build
cmake -DWITH_STATIC=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=OFF -DWITH_LUA52=ON -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=ON -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_TOOLS=ON -DWITH_NEL_TOOLS=ON -DWITH_NELNS=ON -DWITH_NELNS_LOGIN_SYSTEM=ON -DWITH_NELNS_SERVER=ON -DWITH_QT5=ON -DWITH_LIBGSF=ON ..
cat CMakeCache.txt
displayName: 'CMake'
- script: |
cd build
make -j`nproc`
displayName: 'Make'
- job: ubuntu20
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-20.04'
steps:
- script: |
sudo apt update
sudo apt install -y software-properties-common
sudo apt update
sudo apt install cmake build-essential -y
sudo apt install bison autoconf automake -y
sudo apt install libpng-dev -y
sudo apt install libjpeg-dev -y
sudo apt install libgif-dev libfreetype6-dev -y
sudo apt install freeglut3-dev -y
sudo apt install liblua5.2-dev libluabind-dev libcpptest-dev -y
sudo apt install libogg-dev libvorbis-dev libopenal-dev -y
sudo apt install libavcodec-dev libavformat-dev libavdevice-dev libswscale-dev libpostproc-dev -y
sudo apt install libmysqlclient-dev -y
sudo apt install libxml2-dev -y
sudo apt install libcurl4-openssl-dev libssl-dev -y
sudo apt install libsquish-dev -y
sudo apt install liblzma-dev -y
sudo apt install libgsf-1-dev -y
sudo apt install qtbase5-dev qttools5-dev qttools5-dev-tools
displayName: 'Dependencies' displayName: 'Dependencies'
- script: | - script: |
mkdir build mkdir build
cmake --version cmake --version
cd build cd build
cmake -DWITH_STATIC=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=ON -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=ON -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_TOOLS=ON -DWITH_NEL_TOOLS=ON -DWITH_NELNS=ON -DWITH_NELNS_LOGIN_SYSTEM=ON -DWITH_NELNS_SERVER=ON -DWITH_QT5=ON -DWITH_LIBGSF=ON ../code cmake -DWITH_STATIC=ON -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=ON -DWITH_LUA51=OFF -DWITH_LUA52=ON -DWITH_RYZOM=ON -DWITH_RYZOM_SERVER=ON -DWITH_RYZOM_CLIENT=ON -DWITH_RYZOM_TOOLS=ON -DWITH_NEL_TOOLS=ON -DWITH_NELNS=ON -DWITH_NELNS_LOGIN_SYSTEM=ON -DWITH_NELNS_SERVER=ON -DWITH_QT5=ON -DWITH_LIBGSF=ON ..
cat CMakeCache.txt cat CMakeCache.txt
displayName: 'CMake' displayName: 'CMake'
- script: | - script: |
cd build cd build
make -j`nproc` make -j`nproc`
displayName: 'Make' displayName: 'Make'
- job: windows2019
timeoutInMinutes: 120
pool:
vmImage: 'windows-2019'
steps:
- checkout: self
fetchDepth: 1
- task: Cache@2
inputs:
key: 'hunter-win2019-x64-rel'
path: "c:/.hunter/_Base/Cache"
- task: CmdLine@2
inputs:
script: |
aria2c https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe
7z x DXSDK_Jun10.exe -oC:\ -r -y
del DXSDK_Jun10.exe
- task: CMake@1
inputs:
workingDirectory: build.release
cmakeArgs: '-DCMAKE_CONFIGURATION_TYPES=Release -DHUNTER_ENABLED=ON -DHUNTER_CONFIGURATION_TYPES=Release -DFINAL_VERSION=OFF -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON -DWITH_DRIVER_DIRECT3D=ON -DWITH_DRIVER_XAUDIO2=ON -DDXSDK_DIR=C:/DXSDK ..'
- task: MSBuild@1
inputs:
solution: build.release/ALL_BUILD.vcxproj
maximumCpuCount: true
configuration: release
platform: 'x64'
- job: ubuntu18hunter
timeoutInMinutes: 120
pool:
vmImage: ubuntu-18.04
steps:
- checkout: self
fetchDepth: 0
- script: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libasound2-dev libgl1-mesa-dev libjack-dev libpulse-dev libxrandr-dev libxrender-dev libxxf86vm-dev
displayName: 'Dependencies'
- task: Cache@2
inputs:
key: 'hunter317-ubuntu18-rel"'
path: "$(Pipeline.Workspace)/.hunter/_Base/Cache"
- script: |
mkdir build.release
cmake --version
cd build.release
unset SYSTEM
export MAKEFLAGS=-j`nproc`
cmake -DCMAKE_BUILD_TYPE=Release -DHUNTER_ENABLED=ON -DHUNTER_CONFIGURATION_TYPES=Release -DHUNTER_ROOT="$(Pipeline.Workspace)/.hunter" -DFINAL_VERSION=OFF -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON ..
displayName: 'CMake, release'
- script: |
cd build.release
make -j`nproc`
displayName: 'Make, release'
#- task: PublishPipelineArtifact@1
# inputs:
# targetPath: build.release/bin
# artifactName: RyzomUbuntu18Release
- job: macOS11
timeoutInMinutes: 120
pool:
vmImage: 'macOS-11'
steps:
- checkout: self
fetchDepth: 0
- task: Cache@2
inputs:
key: 'hunter317-macOS11-rel"'
path: "$(Pipeline.Workspace)/.hunter/_Base/Cache"
- task: CMake@1
inputs:
workingDirectory: build.release
cmakeArgs: '-GXcode -DCMAKE_CONFIGURATION_TYPES=Release -DHUNTER_ENABLED=ON -DHUNTER_STATUS_DEBUG=ON -DHUNTER_CONFIGURATION_TYPES=Release -DHUNTER_ROOT="$(Pipeline.Workspace)/.hunter" -DWITH_LIBXML2_ICONV=OFF -DFINAL_VERSION=OFF -DWITH_NEL_TESTS=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_NEL_TOOLS=OFF -DWITH_RYZOM_TOOLS=OFF -DWITH_RYZOM_SERVER=OFF -DWITH_RYZOM_CLIENT=ON -DWITH_DRIVER_OPENGL=ON -DWITH_DRIVER_OPENAL=ON -DWITH_DRIVER_DIRECT3D=OFF -DWITH_DRIVER_XAUDIO2=OFF ..'
- task: Xcode@5
inputs:
actions: 'build'
configuration: Release
sdk: macosx12.0
xcWorkspacePath: 'build.release/RyzomCore.xcodeproj'
scheme: 'ALL_BUILD'
packageApp: false
#- task: PublishPipelineArtifact@1
# inputs:
# targetPath: build.release/bin/
# artifactName: RyzomClientMacOS11Release

@ -37,6 +37,7 @@
#cmakedefine RYZOM_CLIENT_EDIT_ACCOUNT_URL "${RYZOM_CLIENT_EDIT_ACCOUNT_URL}" #cmakedefine RYZOM_CLIENT_EDIT_ACCOUNT_URL "${RYZOM_CLIENT_EDIT_ACCOUNT_URL}"
#cmakedefine RYZOM_CLIENT_FORGET_PASSWORD_URL "${RYZOM_CLIENT_FORGET_PASSWORD_URL}" #cmakedefine RYZOM_CLIENT_FORGET_PASSWORD_URL "${RYZOM_CLIENT_FORGET_PASSWORD_URL}"
#cmakedefine RYZOM_CLIENT_PATCH_URL "${RYZOM_CLIENT_PATCH_URL}" #cmakedefine RYZOM_CLIENT_PATCH_URL "${RYZOM_CLIENT_PATCH_URL}"
#cmakedefine RYZOM_CLIENT_APP_NAME "${RYZOM_CLIENT_APP_NAME}"
#cmakedefine RYZOM_WEBIG_MAIN_URL "${RYZOM_WEBIG_MAIN_URL}" #cmakedefine RYZOM_WEBIG_MAIN_URL "${RYZOM_WEBIG_MAIN_URL}"
#cmakedefine RYZOM_WEBIG_TRUSTED_DOMAIN "${RYZOM_WEBIG_TRUSTED_DOMAIN}" #cmakedefine RYZOM_WEBIG_TRUSTED_DOMAIN "${RYZOM_WEBIG_TRUSTED_DOMAIN}"

@ -10,17 +10,25 @@ IF(WIN32)
ENDIF() ENDIF()
IF(WITH_3D) IF(WITH_3D)
IF(HUNTER_ENABLED)
HUNTER_ADD_PACKAGE(freetype)
FIND_PACKAGE(freetype CONFIG REQUIRED)
SET(FREETYPE_LIBRARIES freetype::freetype)
ELSE()
FIND_PACKAGE(FreeType) FIND_PACKAGE(FreeType)
ENDIF() #hunter
IF(WITH_NEL_CEGUI) IF(WITH_NEL_CEGUI)
FIND_PACKAGE(CEGUI) FIND_PACKAGE(CEGUI)
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(WITH_SOUND) IF(WITH_SOUND AND NOT HUNTER_ENABLED)
FIND_PACKAGE(Ogg) FIND_PACKAGE(Ogg)
FIND_PACKAGE(Vorbis) FIND_PACKAGE(Vorbis)
FIND_PACKAGE(FFmpeg COMPONENTS AVCODEC AVFORMAT AVUTIL SWRESAMPLE) IF(WITH_FFMPEG)
FIND_PACKAGE(FFmpeg REQUIRED COMPONENTS AVCODEC AVFORMAT AVUTIL SWRESAMPLE)
ENDIF()
IF(WITH_DRIVER_OPENAL) IF(WITH_DRIVER_OPENAL)
FIND_PACKAGE(OpenAL) FIND_PACKAGE(OpenAL)

@ -1,6 +1,9 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the
@ -40,7 +43,7 @@ class CTextureFile;
class CAsyncFileManager3D class CAsyncFileManager3D
{ {
NLMISC_SAFE_SINGLETON_DECL(CAsyncFileManager3D); NLMISC_SAFE_RELEASABLE_SINGLETON_DECL(CAsyncFileManager3D);
CAsyncFileManager3D(); CAsyncFileManager3D();
public: public:

@ -1,8 +1,8 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2018 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2014-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -181,7 +181,8 @@ public:
CVertexBuffer Vertices; CVertexBuffer Vertices;
CMaterial *Material; CMaterial *Material;
CRGBA Color; CRGBA Color;
ucstring Text; std::string Text;
size_t Length;
uint32 CacheVersion; uint32 CacheVersion;

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013-2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2013-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -262,10 +262,10 @@ public:
virtual NLMISC::IEventEmitter *getEventEmitter() = 0; virtual NLMISC::IEventEmitter *getEventEmitter() = 0;
/// Copy a string to system clipboard. /// Copy a string to system clipboard.
virtual bool copyTextToClipboard(const ucstring &text) = 0; virtual bool copyTextToClipboard(const std::string &text) = 0;
/// Paste a string from system clipboard. /// Paste a string from system clipboard.
virtual bool pasteTextFromClipboard(ucstring &text) = 0;/// Return the depth of the driver after init(). virtual bool pasteTextFromClipboard(std::string &text) = 0;/// Return the depth of the driver after init().
virtual uint8 getBitPerPixel() = 0; virtual uint8 getBitPerPixel() = 0;

@ -4,7 +4,7 @@
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2010 Matt RAYKOWSKI (sfb) <matt.raykowski@gmail.com> // Copyright (C) 2010 Matt RAYKOWSKI (sfb) <matt.raykowski@gmail.com>
// Copyright (C) 2010 Robert TIMM (rti) <mail@rtti.de> // Copyright (C) 2010 Robert TIMM (rti) <mail@rtti.de>
// Copyright (C) 2013-2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2013-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -558,10 +558,10 @@ public:
// @} // @}
// Copy a string to system clipboard. // Copy a string to system clipboard.
virtual bool copyTextToClipboard(const ucstring &text); virtual bool copyTextToClipboard(const std::string &text);
// Paste a string from system clipboard. // Paste a string from system clipboard.
virtual bool pasteTextFromClipboard(ucstring &text); virtual bool pasteTextFromClipboard(std::string &text);
virtual uint64 getSwapBufferCounter(); virtual uint64 getSwapBufferCounter();

@ -1,5 +1,8 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2018 Winch Gate Property Limited
//
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -33,7 +36,7 @@ typedef struct FT_FaceRec_* FT_Face;
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include <string> #include <string>
#include <vector>
namespace NL3D { namespace NL3D {
@ -64,17 +67,17 @@ public:
* \param height height of the generated bitmap, this value is set by this function * \param height height of the generated bitmap, this value is set by this function
* \param pitch pitch of the generated bitmap (+ or - the number of bytes per row), this value is set by this function * \param pitch pitch of the generated bitmap (+ or - the number of bytes per row), this value is set by this function
*/ */
uint8 *getBitmap (ucchar c, uint32 size, bool embolden, bool oblique, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex); uint8 *getBitmap (u32char c, uint32 size, bool embolden, bool oblique, uint32 &width, uint32 &height, uint32 &pitch, sint32 &left, sint32 &top, sint32 &advx, uint32 &glyphIndex);
/** returns the width and height of a character using a specific size and /** returns the width and height of a character using a specific size and
* *
* \warning this function is not very fast (but faster than getBitmap()) because it has to load the char before. * \warning this function is not very fast (but faster than getBitmap()) because it has to load the char before.
*/ */
void getSizes (ucchar c, uint32 size, uint32 &width, uint32 &height); void getSizes (u32char c, uint32 size, uint32 &width, uint32 &height);
void getKerning (ucchar left, ucchar right, sint32 &kernx); void getKerning (u32char left, u32char right, sint32 &kernx);
uint32 getCharIndex (ucchar c); uint32 getCharIndex (u32char c);
uint32 getUID() { return _UID; } uint32 getUID() { return _UID; }
@ -85,6 +88,7 @@ private:
static uint32 _FontGeneratorCounterUID; static uint32 _FontGeneratorCounterUID;
uint32 _UID; uint32 _UID;
std::string _FontFileName; std::string _FontFileName;
std::vector<std::string> _FontFileNames;
#ifndef NL_DONT_USE_EXTERNAL_CODE #ifndef NL_DONT_USE_EXTERNAL_CODE
const char *getFT2Error(FT_Error fte); const char *getFT2Error(FT_Error fte);
@ -92,7 +96,7 @@ private:
static FT_Library _Library; static FT_Library _Library;
static uint _LibraryInit; static uint _LibraryInit;
FT_Face _Face; std::vector<FT_Face> _Faces;
#else // NL_DONT_USE_EXTERNAL_CODE #else // NL_DONT_USE_EXTERNAL_CODE
#endif // NL_DONT_USE_EXTERNAL_CODE #endif // NL_DONT_USE_EXTERNAL_CODE

@ -1,5 +1,8 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2018 Winch Gate Property Limited
//
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -19,6 +22,7 @@
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include "nel/misc/smart_ptr.h" #include "nel/misc/smart_ptr.h"
#include "nel/misc/utf_string_view.h"
#include "nel/3d/texture.h" #include "nel/3d/texture.h"
#include "nel/3d/material.h" #include "nel/3d/material.h"
#include "nel/3d/texture_font.h" #include "nel/3d/texture_font.h"
@ -111,6 +115,7 @@ public:
* \param output computed string * \param output computed string
* \param keep800x600Ratio true if you want that CFontManager look at Driver window size, and resize fontSize so it keeps same size... * \param keep800x600Ratio true if you want that CFontManager look at Driver window size, and resize fontSize so it keeps same size...
*/ */
/*
void computeString (const std::string& s, void computeString (const std::string& s,
CFontGenerator *fontGen, CFontGenerator *fontGen,
const NLMISC::CRGBA &color, const NLMISC::CRGBA &color,
@ -120,11 +125,26 @@ public:
IDriver *driver, IDriver *driver,
CComputedString& output, CComputedString& output,
bool keep800x600Ratio= true); bool keep800x600Ratio= true);
*/
/** /**
* Same as computeString but works with a unicode string (ucstring) * Same as computeString but works with a unicode string (ucstring)
*/ */
void computeString (const ucstring &s, void computeString (NLMISC::CUtfStringView sv,
CFontGenerator *fontGen,
const NLMISC::CRGBA &color,
uint32 fontSize,
bool embolden,
bool oblique,
IDriver *driver,
CComputedString &output,
bool keep800x600Ratio= true);
/**
* Same as computeString but do not make vertex buffers and primitives
*/
void computeStringInfo (NLMISC::CUtfStringView sv,
size_t len,
CFontGenerator *fontGen, CFontGenerator *fontGen,
const NLMISC::CRGBA &color, const NLMISC::CRGBA &color,
uint32 fontSize, uint32 fontSize,
@ -137,7 +157,7 @@ public:
/** /**
* Same as computeString but do not make vertex buffers and primitives * Same as computeString but do not make vertex buffers and primitives
*/ */
void computeStringInfo (const ucstring &s, void computeStringInfo (NLMISC::CUtfStringView sv,
CFontGenerator *fontGen, CFontGenerator *fontGen,
const NLMISC::CRGBA &color, const NLMISC::CRGBA &color,
uint32 fontSize, uint32 fontSize,

@ -1,6 +1,9 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the

@ -837,7 +837,7 @@ private:
void restoreOriginalSkinVertices(); void restoreOriginalSkinVertices();
// apply Skin to all vertices from _OriginalSkin* to _VBuffer. // apply Skin to all vertices from _OriginalSkin* to _VBuffer.
void applySkin(CSkeletonModel *skeleton); void applySkin(void *dstVb, CSkeletonModel *skeleton);
void flagSkinVerticesForMatrixBlock(uint8 *skinFlags, CMatrixBlock &mb); void flagSkinVerticesForMatrixBlock(uint8 *skinFlags, CMatrixBlock &mb);

@ -1,8 +1,8 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2018 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2014-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -134,7 +134,7 @@ public:
uint32 textPush (const char *format, ...); uint32 textPush (const char *format, ...);
/// computes an ucstring and adds the result to the cache (return the index) /// computes an ucstring and adds the result to the cache (return the index)
uint32 textPush (const ucstring &str); uint32 textPush (NLMISC::CUtfStringView sv);
/// remove a string from the cache /// remove a string from the cache
void erase (uint32 index); void erase (uint32 index);
@ -262,12 +262,12 @@ public:
} }
/// Directly print a string /// Directly print a string
void printAt (float x, float z, const ucstring &ucstr) void printAt (float x, float z, NLMISC::CUtfStringView sv)
{ {
nlassert(_FontGen); nlassert(_FontGen);
// compute the string just one time // compute the string just one time
_FontManager->computeString (ucstr, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, _TempString, _Keep800x600Ratio); _FontManager->computeString (sv, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, _TempString, _Keep800x600Ratio);
// draw shaded // draw shaded
if (_Shaded) if (_Shaded)
@ -372,14 +372,19 @@ public:
* \param an ucstring * \param an ucstring
* \param the computed string * \param the computed string
*/ */
void computeString (const ucstring& s, CComputedString& output) void computeString (NLMISC::CUtfStringView sv, CComputedString& output)
{ {
_FontManager->computeString (s, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio); _FontManager->computeString (sv, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio);
}
void computeStringInfo (NLMISC::CUtfStringView sv, CComputedString& output)
{
_FontManager->computeStringInfo (sv, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio);
} }
void computeStringInfo (const ucstring& s, CComputedString& output) void computeStringInfo (NLMISC::CUtfStringView sv, CComputedString& output, size_t len)
{ {
_FontManager->computeStringInfo (s, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio); _FontManager->computeStringInfo (sv, len, _FontGen, _Color, _FontSize, _Embolden, _Oblique, _Driver, output, _Keep800x600Ratio);
} }
/// Debug : write to the disk the texture cache /// Debug : write to the disk the texture cache

@ -1,8 +1,8 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2018 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2014-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -97,13 +97,14 @@ public:
*/ */
// @{ // @{
uint32 textPush(const char *format, ...) ; uint32 textPush(const char *format, ...) ;
uint32 textPush(const ucstring &str) ; uint32 textPush(NLMISC::CUtfStringView sv) ;
void setStringColor(uint32 i, CRGBA newCol); void setStringColor(uint32 i, CRGBA newCol);
void setStringSelection(uint32 i, uint32 selectStart, uint32 selectSize); void setStringSelection(uint32 i, uint32 selectStart, uint32 selectSize);
void resetStringSelection(uint32 i); void resetStringSelection(uint32 i);
void erase(uint32 i) ; void erase(uint32 i) ;
virtual CStringInfo getStringInfo (uint32 i); virtual CStringInfo getStringInfo (uint32 i);
virtual CStringInfo getStringInfo (const ucstring &ucstr); virtual CStringInfo getStringInfo (NLMISC::CUtfStringView sv);
virtual CStringInfo getStringInfo (NLMISC::CUtfStringView sv, size_t len);
void clear() ; void clear() ;
void printAt(float x, float y, uint32 i) ; void printAt(float x, float y, uint32 i) ;
@ -111,10 +112,10 @@ public:
void printClipAtUnProjected(URenderStringBuffer &renderBuffer, class NL3D::CFrustum &frustum, const NLMISC::CMatrix &scaleMatrix, float x, float y, float depth, uint32 i, float xmin, float ymin, float xmax, float ymax); void printClipAtUnProjected(URenderStringBuffer &renderBuffer, class NL3D::CFrustum &frustum, const NLMISC::CMatrix &scaleMatrix, float x, float y, float depth, uint32 i, float xmin, float ymin, float xmax, float ymax);
void printClipAtOld (float x, float y, uint32 i, float xmin, float ymin, float xmax, float ymax); void printClipAtOld (float x, float y, uint32 i, float xmin, float ymin, float xmax, float ymax);
void printAt(float x, float y, const ucstring &ucstr) ; void printAt(float x, float y, NLMISC::CUtfStringView sv) ;
void printfAt(float x, float y, const char * format, ...) ; void printfAt(float x, float y, const char * format, ...) ;
void render3D(const CMatrix &mat, const ucstring &ucstr) ; void render3D(const CMatrix &mat, NLMISC::CUtfStringView sv) ;
void render3D(const CMatrix &mat, const char *format, ...) ; void render3D(const CMatrix &mat, const char *format, ...) ;
float getLastXBound() const ; float getLastXBound() const ;

@ -1,6 +1,9 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the

@ -1,5 +1,8 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2021 Winch Gate Property Limited
//
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -35,12 +38,43 @@ class CTextureFont : public ITexture
public: public:
struct SLetterKey
{
u32char Char;
sint Size;
bool Embolden;
bool Oblique;
CFontGenerator *FontGenerator;
SLetterKey() : Char(0), Size(0), Embolden(false), Oblique(false), FontGenerator(NULL)
{
}
// Does not use FontGenerator in return value
inline uint64 getVal() const
{
return Char // 32 bits
| (uint64(Size & 0xFFFF) << 32) // 16 bits
| (uint64(Embolden) << (32+16)) // 1 bit
| (uint64(Oblique) << (32+16+1)); // 1 bit
}
bool operator<(const SLetterKey &rhs) const
{
uint64 a = getVal();
uint64 b = rhs.getVal();
return (a < b) || ((a == b) && (FontGenerator < rhs.FontGenerator));
}
};
// Holds info for glyphs rendered on atlas // Holds info for glyphs rendered on atlas
struct SGlyphInfo struct SGlyphInfo : SLetterKey
{ {
// font atlas info // font atlas info
uint32 CacheVersion; uint32 CacheVersion;
uint32 GlyphIndex;
// atlas region with padding // atlas region with padding
uint32 X, Y, W, H; uint32 X, Y, W, H;
@ -51,30 +85,17 @@ public:
// UV coords for rendered glyph without padding // UV coords for rendered glyph without padding
float U0, V0, U1, V1; float U0, V0, U1, V1;
uint32 GlyphIndex;
sint Size;
bool Embolden;
bool Oblique;
CFontGenerator *FontGenerator;
SGlyphInfo() SGlyphInfo()
: CacheVersion(0), : CacheVersion(0), GlyphIndex(0),
U0(0.f), V0(0.f), U1(0.f), V1(0.f), U0(0.f), V0(0.f), U1(0.f), V1(0.f),
X(0), Y(0), W(0), H(0), CharWidth(0), CharHeight(0), X(0), Y(0), W(0), H(0), CharWidth(0), CharHeight(0)
GlyphIndex(0), Size(0), Embolden(false), Oblique(false), FontGenerator(NULL)
{ {
} }
}; };
// Holds info for glyphs displayed on screen // Holds info for glyphs displayed on screen
struct SLetterInfo struct SLetterInfo : SLetterKey
{ {
ucchar Char;
sint Size;
bool Embolden;
bool Oblique;
CFontGenerator *FontGenerator;
uint32 GlyphIndex; uint32 GlyphIndex;
uint32 CharWidth; // Displayed glyph height uint32 CharWidth; // Displayed glyph height
uint32 CharHeight; // Displayed glyph height uint32 CharHeight; // Displayed glyph height
@ -85,29 +106,12 @@ public:
SGlyphInfo* glyph; SGlyphInfo* glyph;
SLetterInfo() SLetterInfo()
: Char(0), Size(0), Embolden(false), Oblique(false), FontGenerator(NULL), : GlyphIndex(0), CharWidth(0), CharHeight(0), Top(0), Left(0), AdvX(0),
GlyphIndex(0), CharWidth(0), CharHeight(0), Top(0), Left(0), AdvX(0),
glyph(NULL) glyph(NULL)
{ {
} }
}; };
struct SLetterKey
{
ucchar Char;
sint Size;
bool Embolden;
bool Oblique;
CFontGenerator *FontGenerator;
// Does not use FontGenerator in return value
uint32 getVal();
SLetterKey():Char(0), FontGenerator(NULL), Size(0), Embolden(false), Oblique(false)
{
}
};
public: public:
/** /**
@ -148,7 +152,7 @@ private:
// Keep track of available space in main texture // Keep track of available space in main texture
std::vector<NLMISC::CRect> _AtlasNodes; std::vector<NLMISC::CRect> _AtlasNodes;
std::vector <SLetterInfo> _Letters; std::map<SLetterKey, SLetterInfo> _Letters;
// lookup letter from letter cache or create new // lookup letter from letter cache or create new
SLetterInfo* findLetter(SLetterKey& k, bool insert); SLetterInfo* findLetter(SLetterKey& k, bool insert);
@ -162,7 +166,7 @@ private:
uint _GlyphSizeStep; uint _GlyphSizeStep;
// rendered glyph cache // rendered glyph cache
std::list<SGlyphInfo> _GlyphCache; std::map<SLetterKey, SGlyphInfo> _GlyphCache;
SGlyphInfo* findLetterGlyph(SLetterInfo *letter, bool insert); SGlyphInfo* findLetterGlyph(SLetterInfo *letter, bool insert);
// render letter glyph into glyph cache // render letter glyph into glyph cache

@ -4,7 +4,7 @@
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2010 Matt RAYKOWSKI (sfb) <matt.raykowski@gmail.com> // Copyright (C) 2010 Matt RAYKOWSKI (sfb) <matt.raykowski@gmail.com>
// Copyright (C) 2010 Robert TIMM (rti) <mail@rtti.de> // Copyright (C) 2010 Robert TIMM (rti) <mail@rtti.de>
// Copyright (C) 2013-2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2013-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -835,10 +835,10 @@ public:
/// \name Clipboard management /// \name Clipboard management
// @{ // @{
// Copy a string to system clipboard. // Copy a string to system clipboard.
virtual bool copyTextToClipboard(const ucstring &text) =0; virtual bool copyTextToClipboard(const std::string &text) =0;
// Paste a string from system clipboard. // Paste a string from system clipboard.
virtual bool pasteTextFromClipboard(ucstring &text) =0; virtual bool pasteTextFromClipboard(std::string &text) =0;
// @} // @}
public: public:

@ -1,8 +1,8 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2018 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2014-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -24,7 +24,7 @@
#include "nel/misc/rgba.h" #include "nel/misc/rgba.h"
#include "nel/misc/ucstring.h" #include "nel/misc/ucstring.h"
#include "nel/misc/matrix.h" #include "nel/misc/matrix.h"
#include "nel/misc/utf_string_view.h"
namespace NL3D { namespace NL3D {
@ -104,8 +104,11 @@ public:
*/ */
float StringLine; float StringLine;
CStringInfo() {StringWidth= StringHeight= StringLine= 0;} /// The length in characters
CStringInfo(float w, float h, float l) {StringWidth= w; StringHeight= h; StringLine = l;} size_t StringLength;
CStringInfo() { StringWidth = StringHeight = StringLine = 0; StringLength = 0; }
CStringInfo(float w, float h, float l, size_t len) { StringWidth = w; StringHeight = h; StringLine = l; StringLength = len; }
/** /**
* Get the string's origin * Get the string's origin
@ -248,7 +251,7 @@ public:
* \param an ucstring * \param an ucstring
* \return the index where computed string has been inserted * \return the index where computed string has been inserted
*/ */
virtual uint32 textPush (const ucstring &str) = 0; virtual uint32 textPush (NLMISC::CUtfStringView sv) = 0;
/** /**
* set the color of a string. * set the color of a string.
*/ */
@ -274,7 +277,12 @@ public:
* Get a string information from the ucstring * Get a string information from the ucstring
* The returned string info is in pixel size per default. * The returned string info is in pixel size per default.
*/ */
virtual CStringInfo getStringInfo (const ucstring &ucstr) = 0; virtual CStringInfo getStringInfo (NLMISC::CUtfStringView sv) = 0;
/**
* Get a string information from the ucstring
* The returned string info is in pixel size per default.
*/
virtual CStringInfo getStringInfo (NLMISC::CUtfStringView sv, size_t len) = 0;
/** /**
* empty the map * empty the map
*/ */
@ -299,7 +307,7 @@ public:
/** /**
* compute and print a ucstring at the location (2D method) x/y E [0,1] * compute and print a ucstring at the location (2D method) x/y E [0,1]
*/ */
virtual void printAt (float x, float y, const ucstring &ucstr) = 0; virtual void printAt (float x, float y, NLMISC::CUtfStringView sv) = 0;
/** /**
* compute and print a string at the location (2D method) x/y E [0,1] * compute and print a string at the location (2D method) x/y E [0,1]
*/ */
@ -309,7 +317,7 @@ public:
* compute and render a ucstring at the location (3D method) * compute and render a ucstring at the location (3D method)
* render3D() use UDriver Matrix context for Frustum/ViewMatrix, but use its own modelmatrix (mat). * render3D() use UDriver Matrix context for Frustum/ViewMatrix, but use its own modelmatrix (mat).
*/ */
virtual void render3D (const NLMISC::CMatrix &mat, const ucstring &ucstr) = 0; virtual void render3D (const NLMISC::CMatrix &mat, NLMISC::CUtfStringView sv) = 0;
/** /**
* compute and render a string at the location (3D method) * compute and render a string at the location (3D method)
* render3D() use UDriver Matrix context for Frustum/ViewMatrix, but use its own modelmatrix (mat). * render3D() use UDriver Matrix context for Frustum/ViewMatrix, but use its own modelmatrix (mat).

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2014-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -22,6 +22,7 @@
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include "nel/georges/u_form.h" #include "nel/georges/u_form.h"
#include "form_dfn.h"
#include "form_elm.h" #include "form_elm.h"
#include "header.h" #include "header.h"
@ -124,6 +125,10 @@ private:
// The form filename // The form filename
std::string _Filename; std::string _Filename;
// The dfn
NLMISC::CSmartPtr<CFormDfn> _Dfn;
}; };
} // NLGEORGES } // NLGEORGES

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2014-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -282,6 +282,10 @@ public:
{ {
Element = NULL; Element = NULL;
} }
~CFormElmStructElm()
{
nlassert(!Element);
}
std::string Name; std::string Name;
CFormElm* Element; CFormElm* Element;
@ -400,6 +404,10 @@ public:
{ {
Element = NULL; Element = NULL;
} }
~CElement ()
{
nlassert(!Element);
}
std::string Name; std::string Name;
CFormElm* Element; CFormElm* Element;
@ -631,7 +639,7 @@ inline bool CFormElm::convertValue (bool &result, const std::string &value) cons
} }
else else
{ {
std::string temp = NLMISC::toLower(value); std::string temp = NLMISC::toLowerAscii(value);
if (strcmp (temp.c_str (), "true") == 0) if (strcmp (temp.c_str (), "true") == 0)
{ {
result = true; result = true;

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -69,7 +70,7 @@ namespace NLGUI
static CAHManager* getInstance() static CAHManager* getInstance()
{ {
if (_GlobalInstance == NULL) if (_GlobalInstance == NULL && !s_Deleted)
_GlobalInstance = new CAHManager; _GlobalInstance = new CAHManager;
return _GlobalInstance; return _GlobalInstance;
} }
@ -134,6 +135,19 @@ namespace NLGUI
static CAHManager *_GlobalInstance; static CAHManager *_GlobalInstance;
static bool editorMode; static bool editorMode;
class CDeleter
{
public:
~CDeleter()
{
delete _GlobalInstance;
_GlobalInstance = NULL;
s_Deleted = true;
}
};
static CDeleter s_Deleter;
static bool s_Deleted;
}; };
/// Ah name must all be lower case /// Ah name must all be lower case

@ -0,0 +1,83 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010-2019 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CL_CSS_BACKGROUND_H
#define CL_CSS_BACKGROUND_H
#include "nel/misc/types_nl.h"
#include "nel/misc/rgba.h"
#include "nel/gui/css_types.h"
#include "nel/gui/css_length.h"
namespace NLGUI
{
/**
* \brief CSS background info
* \date 2021-07-02 11:36 GMT
* \author Meelis Mägi (Nimetu)
*/
class CSSBackground
{
public:
CSSBackground()
:color(NLMISC::CRGBA::Transparent),
repeatX(CSS_VALUE_REPEAT), repeatY(CSS_VALUE_REPEAT), attachment(CSS_VALUE_SCROLL),
xAnchor(CSS_VALUE_LEFT), yAnchor(CSS_VALUE_TOP),
clip(CSS_VALUE_BORDER_BOX), origin(CSS_VALUE_PADDING_BOX), size(CSS_VALUE_AUTO)
{}
void setImage(const std::string &value);
void setPosition(const std::string &value);
void setSize(const std::string &value);
void setRepeat(const std::string &value);
void setOrigin(const std::string &value);
void setClip(const std::string &value);
void setAttachment(const std::string &value);
void setColor(const std::string &value);
public:
// TODO: only final layer has color
NLMISC::CRGBA color;
std::string image;
CSSValueType repeatX;
CSSValueType repeatY;
CSSValueType attachment;
CSSValueType xAnchor;
CSSValueType yAnchor;
CSSLength xPosition;
CSSLength yPosition;
CSSValueType clip;
CSSValueType origin;
CSSValueType size;
CSSLength width;
CSSLength height;
private:
void positionFromOne(const std::vector<std::string> &parts);
void positionFromTwo(const std::vector<std::string> &parts);
void positionFromThree(const std::vector<std::string> &parts);
void positionFromFour(const std::vector<std::string> &parts);
};
}//namespace
#endif // CL_CSS_BACKGROUND_H

@ -0,0 +1,193 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010-2019 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef NL_CSS_BACKGROUND_RENDERER_H
#define NL_CSS_BACKGROUND_RENDERER_H
#include "nel/misc/types_nl.h"
#include "nel/misc/rgba.h"
#include "nel/misc/geom_ext.h"
#include "nel/gui/css_types.h"
#include "nel/gui/css_background.h"
namespace NLGUI
{
class CInterfaceElement;
/**
* \brief Border renderer for GUI classes
* \date 2021-06-29 15:17 GMT
* \author Meelis Mägi (Nimetu)
*/
class CSSBackgroundRenderer
{
public:
// alpha value from parent
uint8 CurrentAlpha;
// TODO: should be moved to CSSBackground
sint32 TextureId;
public:
CSSBackgroundRenderer();
~CSSBackgroundRenderer();
// return true if no background is set
bool isEmpty() const
{
return m_Background.image.empty() && m_Background.color.A == 0;
}
void setModulateGlobalColor(bool m) { m_ModulateGlobalColor = m; }
void updateCoords();
void invalidateCoords() { m_Dirty = true; }
void invalidateContent() { m_Dirty = true; };
void clear();
void setBackground(const CSSBackground &bg);
// helper function to change background image
void setImage(const std::string &bgtex);
void setImageRepeat(bool b);
void setImageCover(bool b);
// helper function to change background color
void setColor(const NLMISC::CRGBA &color)
{
m_Dirty = true;
m_Background.color = color;
}
NLMISC::CRGBA getColor() const
{
return m_Background.color;
}
// override painting area to be at least the size of viewport (ie, <html> background)
void setFillViewport(bool b) {
m_Dirty = true;
m_FillViewport = b;
}
void setViewport(CInterfaceElement *root)
{
m_Dirty = true;
m_Viewport = root;
}
void setBorderArea(sint32 x, sint32 y, sint32 w, sint32 h)
{
m_Dirty = true;
m_BorderX = x;
m_BorderY = y;
m_BorderW = w;
m_BorderH = h;
}
void setPaddingArea(sint32 x, sint32 y, sint32 w, sint32 h)
{
m_Dirty = true;
m_PaddingX = x;
m_PaddingY = y;
m_PaddingW = w;
m_PaddingH = h;
}
void setContentArea(sint32 x, sint32 y, sint32 w, sint32 h)
{
m_Dirty = true;
m_ContentX = x;
m_ContentY = y;
m_ContentW = w;
m_ContentH = h;
}
// sizes for em, rem units
void setFontSize(float rootFontSize, float fontSize)
{
m_Dirty = true;
m_RootFontSize = rootFontSize;
m_FontSize = fontSize;
}
void draw();
private:
sint32 m_BorderX, m_BorderY, m_BorderW, m_BorderH;
sint32 m_PaddingX, m_PaddingY, m_PaddingW, m_PaddingH;
sint32 m_ContentX, m_ContentY, m_ContentW, m_ContentH;
// font size for 'rem'
float m_RootFontSize;
// font size for 'em'
float m_FontSize;
// viewport element for vw,wh,vmin,vmax
CInterfaceElement* m_Viewport;
struct SDrawQueue
{
sint32 TextureId;
NLMISC::CQuadUV Quad;
NLMISC::CRGBA Color;
};
std::vector<SDrawQueue> m_DrawQueue;
const sint8 m_RenderLayer;
bool m_ModulateGlobalColor;
// if true, painting area returns area at least the size of viewport (ie, <html> background)
bool m_FillViewport;
// if true, then updateCoords() is called from draw()
bool m_Dirty;
CSSBackground m_Background;
// get clip area based on background-clip
void getPaintingArea(const CSSBackground &bg, sint32 &areaX, sint32 &areaY, sint32 &areaW, sint32 &areaH) const;
// get positioning area based on background-origin
void getPositioningArea(const CSSBackground &bg, sint32 &areaX, sint32 &areaY, sint32 &areaW, sint32 &areaH) const;
// calculate image size based on background-size
void calculateSize(const CSSBackground &bg, sint32 &texW, sint32 &texH) const;
// calculate image position based on background-position
void calculatePosition(const CSSBackground &bg, sint32 &texX, sint32 &texY, sint32 &texW, sint32 &texH) const;
// calculate image tile position, size, count, and spacing based on background-repeat
void calculateTiles(const CSSBackground &bg, sint32 &texX, sint32 &texY, sint32 &texW, sint32 &texH, sint32 &tilesX, sint32 &tilesY, sint32 &spacingX, sint32 &spacingY) const;
// position, size, and count for first tile to cover an area
void getImageTile(sint32 &tilePos, sint32 &tileSize, sint32 &spacing, sint32 &tiles, sint32 areaPos, sint32 areaSize, CSSValueType repeat) const;
// push background color to draw queue
void buildColorQuads(const CSSBackground &bg);
// push background image to draw quque
void buildImageQuads(const CSSBackground &bg, sint32 textureId);
}; // CSSBackgroundRenderer
}//namespace
#endif // NL_CSS_BACKGROUND_RENDERER_H

@ -0,0 +1,72 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010-2019 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CL_CSS_BORDER_H
#define CL_CSS_BORDER_H
#include "nel/misc/types_nl.h"
#include "nel/misc/rgba.h"
#include "nel/gui/css_types.h"
#include "nel/gui/css_length.h"
namespace NLGUI
{
/**
* \brief CSS border info
* \date 2021-07-23 09:51 GMT
* \author Meelis Mägi (Nimetu)
*/
class CSSBorder
{
public:
CSSBorder()
{
reset();
}
CSSBorder(uint width, CSSLineStyle style, NLMISC::CRGBA color)
{
set(width, style, color);
}
void reset()
{
set(CSS_LINE_WIDTH_MEDIUM, CSS_LINE_STYLE_NONE, NLMISC::CRGBA::Transparent);
}
void set(uint width, CSSLineStyle style, NLMISC::CRGBA color)
{
Width.setFloatValue(width, "px");
Style = style;
Color = color;
}
bool empty() const
{
return Style == CSS_LINE_STYLE_NONE || Style == CSS_LINE_STYLE_HIDDEN
|| Width.getFloat() == 0;
}
CSSLength Width;
CSSLineStyle Style;
NLMISC::CRGBA Color;
};
}//namespace
#endif // CL_CSS_BORDER_H

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -23,9 +23,12 @@
#include "nel/misc/rgba.h" #include "nel/misc/rgba.h"
#include "nel/misc/geom_ext.h" #include "nel/misc/geom_ext.h"
#include "nel/gui/css_types.h" #include "nel/gui/css_types.h"
#include "nel/gui/css_border.h"
namespace NLGUI namespace NLGUI
{ {
class CInterfaceElement;
/** /**
* \brief Border renderer for GUI classes * \brief Border renderer for GUI classes
* \date 2019-09-03 10:50 GMT * \date 2019-09-03 10:50 GMT
@ -34,29 +37,76 @@ namespace NLGUI
class CSSBorderRenderer class CSSBorderRenderer
{ {
private: private:
enum EBorderSide
{
BORDER_TOP_LEFT = 0,
BORDER_TOP_RIGHT,
BORDER_BOTTOM_LEFT,
BORDER_BOTTOM_RIGHT,
BORDER_LEFT_TOP,
BORDER_RIGHT_TOP,
BORDER_LEFT_BOTTOM,
BORDER_RIGHT_BOTTOM,
BORDER_TOP,
BORDER_RIGHT,
BORDER_BOTTOM,
BORDER_LEFT,
BORDER_INVALID
};
// parent element screen coordinates // parent element screen coordinates
sint32 _XReal, _YReal; sint32 m_XReal, m_YReal;
sint32 _WReal, _HReal; sint32 m_WReal, m_HReal;
NLMISC::CQuadUV _QuadT; struct SDrawBorder
NLMISC::CQuadUV _QuadR; {
NLMISC::CQuadUV _QuadB; NLMISC::CQuadUV Quad;
NLMISC::CQuadUV _QuadL; NLMISC::CRGBA Color;
};
std::vector<SDrawBorder> m_DrawBorders;
uint8 _RenderLayer; sint8 m_RenderLayer;
bool _ModulateGlobalColor; bool m_ModulateGlobalColor;
// if true, then updateCoords() is called from draw() // if true, then updateCoords() is called from draw()
bool _Dirty; bool m_Dirty;
// if true, then at least one border is set // UI scale, used to calculate number of segments to draw for circle
bool _Border; float m_Scale;
bool _BorderTop, _BorderRight, _BorderBottom, _BorderLeft;
public: CSSRect<CSSBorder> m_Border;
uint32 TopWidth, RightWidth, BottomWidth, LeftWidth; CSSRect<sint32> m_Computed;
NLMISC::CRGBA TopColor, RightColor, BottomColor, LeftColor;
CSSLineStyle TopStyle, RightStyle, BottomStyle, LeftStyle; // font size for 'rem'
float m_RootFontSize;
// font size for 'em'
float m_FontSize;
// if true, then CSSLength values are recomputed
bool m_MustComputeValues;
// viewport element for vw,wh,vmin,vmax
CInterfaceElement* m_Viewport;
// update CSSLength values
void computeValues();
void getAdjacentBorders(EBorderSide side, EBorderSide &adjBorderL, EBorderSide &adjBorderR) const;
void getAdjacentBorderWidth(EBorderSide side, sint32 &adjWidthL, sint32 &adjWidthR) const;
// dot
void buildDotCornerStart(EBorderSide side, SDrawBorder shape, float x1, float y1, float radius);
void buildDotCornerEnd(EBorderSide side, SDrawBorder shape, float x1, float y1, float radius);
void buildDotCorner(SDrawBorder shape, float x, float y, float r, const NLMISC::CLine &line);
// draw circle, angle is CCW between 0..1 (3'o'clock being 0deg).
void buildDotSegments(SDrawBorder shape, float x, float y, float radius, float fromAngle=0.f, float toAngle=1.f);
// dash
void makeBorderQuad(EBorderSide side, SDrawBorder &shape, float x, float y, float width, float thickness) const;
void makeCornerQuad(EBorderSide side, SDrawBorder &shape) const;
void buildDashedBorder(EBorderSide side);
void buildSolidBorder(EBorderSide side);
bool hasInnerShape(CSSLineStyle style) const;
public:
// alpha value from parent // alpha value from parent
uint8 CurrentAlpha; uint8 CurrentAlpha;
@ -68,21 +118,67 @@ namespace NLGUI
void setRect(sint32 x, sint32 y, sint32 w, sint32 h); void setRect(sint32 x, sint32 y, sint32 w, sint32 h);
void setWidth(uint32 top, uint32 right, uint32 bottom, uint32 left); void setBorder(const CSSRect<CSSBorder> &b) { m_Dirty = true; m_Border = b; }
void setStyle(CSSLineStyle top, CSSLineStyle right, CSSLineStyle bottom, CSSLineStyle left);
void setColor(const NLMISC::CRGBA &top, const NLMISC::CRGBA &right, const NLMISC::CRGBA &bottom, const NLMISC::CRGBA &left);
void updateCoords(); void updateCoords();
void invalidateCoords() { _Dirty = _Border = true; } void invalidateCoords() { m_Dirty = true; }
void invalidateContent() { _Dirty = _Border = true; }; void invalidateContent() { m_Dirty = true; }
bool isEmpty() const {
return (m_Border.Top.Width.getFloat() +
m_Border.Right.Width.getFloat() +
m_Border.Bottom.Width.getFloat() +
m_Border.Left.Width.getFloat()) == 0;
}
uint32 getTopWidth() { if (m_MustComputeValues) computeValues(); return m_Computed.Top; }
uint32 getRightWidth() { if (m_MustComputeValues) computeValues(); return m_Computed.Right; }
uint32 getBottomWidth() { if (m_MustComputeValues) computeValues(); return m_Computed.Bottom; }
uint32 getLeftWidth() { if (m_MustComputeValues) computeValues(); return m_Computed.Left; }
uint32 getLeftRightWidth() { if (m_MustComputeValues) computeValues(); return m_Computed.Left + m_Computed.Right; }
uint32 getTopBottomWidth() { if (m_MustComputeValues) computeValues(); return m_Computed.Top + m_Computed.Bottom; }
NLMISC::CRGBA getTopColor() const { return m_Border.Top.Color; }
NLMISC::CRGBA getRightColor() const { return m_Border.Right.Color; }
NLMISC::CRGBA getBottomColor() const { return m_Border.Bottom.Color; }
NLMISC::CRGBA getLeftColor() const { return m_Border.Left.Color; }
uint32 getTopWidth() const;
uint32 getRightWidth() const;
uint32 getBottomWidth() const;
uint32 getLeftWidth() const;
uint32 getLeftRightWidth() const; void setWidth(uint width)
uint32 getTopBottomWidth() const; {
m_Dirty = true;
m_MustComputeValues = true;
m_Border.Top.Width.setFloatValue(width, "px");
m_Border.Right.Width.setFloatValue(width, "px");
m_Border.Bottom.Width.setFloatValue(width, "px");
m_Border.Left.Width.setFloatValue(width, "px");
}
void setColor(const NLMISC::CRGBA &color)
{
m_Dirty = true;
m_Border.Top.Color = color;
m_Border.Right.Color = color;
m_Border.Bottom.Color = color;
m_Border.Left.Color = color;
}
// sizes for em, rem units
void setFontSize(float rootFontSize, float fontSize)
{
m_Dirty = true;
m_MustComputeValues = true;
m_RootFontSize = rootFontSize;
m_FontSize = fontSize;
}
void setViewport(CInterfaceElement *root)
{
m_Dirty = true;
m_MustComputeValues = true;
m_Viewport = root;
}
void draw(); void draw();
}; // CSSBorderRenderer }; // CSSBorderRenderer

@ -0,0 +1,76 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010-2021 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CL_CSS_LENGTH_H
#define CL_CSS_LENGTH_H
#include "nel/misc/types_nl.h"
#include "nel/gui/css_types.h"
namespace NLGUI
{
/**
* \brief CSS types used in GUI classes
* \date 2021-07-02 11:36 GMT
* \author Meelis Mägi (Nimetu)
*/
class CSSLength
{
public:
enum Kind {
Auto, Relative, Fixed
};
CSSLength(float value = 0, CSSUnitType unit = CSS_UNIT_NONE, Kind kind = Auto)
: m_Value(value), m_Unit(unit), m_Kind(Auto)
{}
void setAuto() { m_Kind = Auto; }
bool parseValue(const std::string &value, bool allowPercent = true, bool allowNegative = false);
void setFloatValue(float f, const std::string &unit);
float getValue() const;
float getFloat() const { return m_Value; }
bool isPercent() const { return m_Unit == CSS_UNIT_PERCENT; }
bool isAuto() const { return m_Kind == Auto; }
bool isRelative() const { return m_Kind == Relative; }
// % uses relValue
// em uses emSize
// rem uses remSize
// vw,vh,vi,vb,vmin,vmax uses vwSize/vhSize
float calculate(uint32 relValue, uint32 emSize, uint32 remSize, uint32 vwSize, uint32 whSize) const;
CSSUnitType getUnit() const { return m_Unit; }
std::string toString() const;
private:
void setUnit(const std::string &unit);
float m_Value;
CSSUnitType m_Unit;
Kind m_Kind;
};
}//namespace
#endif // CL_CSS_LENGTH_H

@ -1,5 +1,8 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2021 Winch Gate Property Limited
//
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -38,7 +41,7 @@ namespace NLGUI
private: private:
// stylesheet currently parsed // stylesheet currently parsed
ucstring _Style; std::string _Style;
// keep track of current position in _Style // keep track of current position in _Style
size_t _Position; size_t _Position;
@ -70,49 +73,49 @@ namespace NLGUI
void preprocess(); void preprocess();
// parse selectors + combinators // parse selectors + combinators
std::vector<CCssSelector> parse_selector(const ucstring &sel, std::string &pseudoElement) const; std::vector<CCssSelector> parse_selector(const std::string &sel, std::string &pseudoElement, std::string::size_type &pos) const;
// parse selector and style // parse selector and style
void parseRule(const ucstring &selectorString, const ucstring &styleString); void parseRule(const std::string &selectorString, const std::string &styleString);
inline bool is_eof() const inline bool is_eof() const
{ {
return _Position >= _Style.size(); return _Position >= _Style.size();
} }
inline bool is_whitespace(ucchar ch) const inline bool is_whitespace(char ch) const
{ {
return (ch == (ucchar)' ' || ch == (ucchar)'\t' || ch == (ucchar)'\n'); return (ch == ' ' || ch == '\t' || ch == '\n');
} }
inline bool is_hex(ucchar ch) const inline bool is_hex(char ch) const
{ {
return ((ch >= (ucchar)'0' && ch <= (ucchar)'9') || return ((ch >= '0' && ch <= '9') ||
(ch >= (ucchar)'a' && ch <= (ucchar)'f') || (ch >= 'a' && ch <= 'f') ||
(ch >= (ucchar)'A' && ch <= (ucchar)'F')); (ch >= 'A' && ch <= 'F'));
} }
inline bool maybe_escape() const inline bool maybe_escape() const
{ {
// escaping newline (\n) only allowed inside strings // escaping newline (\n) only allowed inside strings
return (_Style.size() - _Position) >= 1 && _Style[_Position] == (ucchar)'\\' && _Style[_Position+1] != '\n'; return (_Style.size() - _Position) >= 1 && _Style[_Position] == '\\' && _Style[_Position+1] != '\n';
} }
inline bool is_quote(ucchar ch) const inline bool is_quote(char ch) const
{ {
return ch== (ucchar)'"' || ch == (ucchar)'\''; return ch== '"' || ch == '\'';
} }
inline bool is_block_open(ucchar ch) const inline bool is_block_open(char ch) const
{ {
return ch == (ucchar)'{' || ch == (ucchar)'[' || ch == (ucchar)'('; return ch == (char)'{' || ch == (char)'[' || ch == (char)'(';
} }
inline bool is_block_close(ucchar ch, ucchar open) const inline bool is_block_close(char ch, char open) const
{ {
return ((open == '{' && ch == (ucchar)'}') || return ((open == '{' && ch == (char)'}') ||
(open == '[' && ch == (ucchar)']') || (open == '[' && ch == (char)']') ||
(open == '(' && ch == (ucchar)')')); (open == '(' && ch == (char)')'));
} }
inline bool is_comment_open() const inline bool is_comment_open() const
@ -120,25 +123,25 @@ namespace NLGUI
if (_Position+1 > _Style.size()) if (_Position+1 > _Style.size())
return false; return false;
return _Style[_Position] == (ucchar)'/' && _Style[_Position+1] == (ucchar)'*'; return _Style[_Position] == (char)'/' && _Style[_Position+1] == (char)'*';
} }
inline bool is_nonascii(ucchar ch) const inline bool is_nonascii(char ch) const
{ {
return ch >= 0x80 /*&& ch <= 255*/; return ch >= 0x80 /*&& ch <= 255*/;
} }
inline bool is_alpha(ucchar ch) const inline bool is_alpha(char ch) const
{ {
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');
} }
inline bool is_digit(ucchar ch) const inline bool is_digit(char ch) const
{ {
return ch >= '0' && ch <= '9'; return ch >= '0' && ch <= '9';
} }
inline bool is_nmchar(ucchar ch) const inline bool is_nmchar(char ch) const
{ {
// checking escape here does not check if next char is '\n' or not // checking escape here does not check if next char is '\n' or not
return ch == '_' || ch == '-' || is_alpha(ch) || is_digit(ch) || is_nonascii(ch) || ch == '\\'/*is_escape(ch)*/; return ch == '_' || ch == '-' || is_alpha(ch) || is_digit(ch) || is_nonascii(ch) || ch == '\\'/*is_escape(ch)*/;

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2021 Winch Gate Property Limited
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -96,6 +96,8 @@ namespace NLGUI
// match An+B rule to child index (1 based) // match An+B rule to child index (1 based)
bool matchNth(sint childNr, sint a, sint b) const; bool matchNth(sint childNr, sint a, sint b) const;
// match :lang(xx)
bool matchLang(const CHtmlElement &elm, const std::string &pseudo) const;
// parse nth-child string to 'a' and 'b' components // parse nth-child string to 'a' and 'b' components
// :nth-child(odd) // :nth-child(odd)

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2021 Winch Gate Property Limited
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -21,6 +21,9 @@
#include "nel/misc/rgba.h" #include "nel/misc/rgba.h"
#include "nel/gui/css_selector.h" #include "nel/gui/css_selector.h"
#include "nel/gui/css_types.h" #include "nel/gui/css_types.h"
#include "nel/gui/css_length.h"
#include "nel/gui/css_background.h"
#include "nel/gui/css_border.h"
namespace NLGUI namespace NLGUI
{ {
@ -60,18 +63,15 @@ namespace NLGUI
Underlined=false; Underlined=false;
StrikeThrough=false; StrikeThrough=false;
GlobalColor=false; GlobalColor=false;
GlobalColorText=false;
DisplayBlock=false; DisplayBlock=false;
Width=-1; Width=-1;
Height=-1; Height=-1;
MaxWidth=-1; MaxWidth=-1;
MaxHeight=-1; MaxHeight=-1;
// border style
BorderTopWidth = BorderRightWidth = BorderBottomWidth = BorderLeftWidth = CSS_LINE_WIDTH_MEDIUM;
BorderTopStyle = BorderRightStyle = BorderBottomStyle = BorderLeftStyle = CSS_LINE_STYLE_NONE;
BorderTopColor = BorderRightColor = BorderBottomColor = BorderLeftColor = NLMISC::CRGBA::Transparent;
// background // background
BackgroundColor=NLMISC::CRGBA::Black;
BackgroundColorOver=NLMISC::CRGBA::Black; BackgroundColorOver=NLMISC::CRGBA::Black;
MarginTop = MarginRight = MarginBottom = MarginLeft = 0;
PaddingTop = PaddingRight = PaddingBottom = PaddingLeft = 0; PaddingTop = PaddingRight = PaddingBottom = PaddingLeft = 0;
} }
@ -94,6 +94,7 @@ namespace NLGUI
NLMISC::CRGBA TextColor; NLMISC::CRGBA TextColor;
STextShadow TextShadow; STextShadow TextShadow;
bool GlobalColor; bool GlobalColor;
bool GlobalColorText;
bool Underlined; bool Underlined;
bool StrikeThrough; bool StrikeThrough;
bool DisplayBlock; bool DisplayBlock;
@ -101,11 +102,10 @@ namespace NLGUI
sint32 Height; sint32 Height;
sint32 MaxWidth; sint32 MaxWidth;
sint32 MaxHeight; sint32 MaxHeight;
uint32 BorderTopWidth, BorderRightWidth, BorderBottomWidth, BorderLeftWidth; CSSRect<CSSBorder> Border;
CSSLineStyle BorderTopStyle, BorderRightStyle, BorderBottomStyle, BorderLeftStyle; CSSBackground Background;
NLMISC::CRGBA BorderTopColor, BorderRightColor, BorderBottomColor, BorderLeftColor;
NLMISC::CRGBA BackgroundColor;
NLMISC::CRGBA BackgroundColorOver; NLMISC::CRGBA BackgroundColorOver;
uint32 MarginTop, MarginRight, MarginBottom, MarginLeft;
uint32 PaddingTop, PaddingRight, PaddingBottom, PaddingLeft; uint32 PaddingTop, PaddingRight, PaddingBottom, PaddingLeft;
std::string WhiteSpace; std::string WhiteSpace;
@ -177,16 +177,24 @@ namespace NLGUI
// parse 'padding' into 'padding-top', 'padding-left', etc // parse 'padding' into 'padding-top', 'padding-left', etc
void expandPaddingShorthand(const std::string &value, TStyle &style) const; void expandPaddingShorthand(const std::string &value, TStyle &style) const;
void expandMarginShorthand(const std::string &value, TStyle &style) const;
// expand shorthand rule, ie "border", into longhand names, ie "border-top-width" // expand shorthand rule, ie "border", into longhand names, ie "border-top-width"
// if shorthand is present in style, then its removed // if shorthand is present in style, then its removed
void expandShorthand(const std::string &prop, const std::string &value, TStyle &style) const; void expandShorthand(const std::string &prop, const std::string &value, TStyle &style) const;
// parse string value into corresponding value // parse string value into corresponding value
void applyBorderWidth(const std::string &value, uint32 *dest, const uint32 currentWidth, const uint32 fontSize) const; void applyBorderWidth(const std::string &value, CSSLength *dest, const CSSLength &currentWidth) const;
void applyBorderColor(const std::string &value, NLMISC::CRGBA *dest, const NLMISC::CRGBA &currentColor, const NLMISC::CRGBA &textColor) const; void applyBorderColor(const std::string &value, NLMISC::CRGBA *dest, const NLMISC::CRGBA &currentColor, const NLMISC::CRGBA &textColor) const;
void applyLineStyle(const std::string &value, CSSLineStyle *dest, const CSSLineStyle &currentStyle) const; void applyLineStyle(const std::string &value, CSSLineStyle *dest, const CSSLineStyle &currentStyle) const;
void applyPaddingWidth(const std::string &value, uint32 *dest, const uint32 currentPadding, uint32 fontSize) const; void applyPaddingWidth(const std::string &value, uint32 *dest, const uint32 currentPadding, uint32 fontSize) const;
void applyMarginWidth(const std::string &value, uint32 *dest, const uint32 current, uint32 fontSize) const;
// parse and replace var(--name, fallback) function
// return false if property should be ignored
bool cssFuncVar(std::string &func, const TStyle &styleRules, const std::set<std::string> &seenProperties) const;
// return false if property was not defined
bool lookupPropertyValue(const std::string &name, std::string &value, const TStyle &styleRules) const;
public: public:
void reset(); void reset();
@ -209,15 +217,22 @@ namespace NLGUI
_StyleStack.push_back(Current); _StyleStack.push_back(Current);
Current.GlobalColor = false; Current.GlobalColor = false;
// inherit GlobalColorText
Current.DisplayBlock = false; Current.DisplayBlock = false;
Current.Width=-1; Current.Width=-1;
Current.Height=-1; Current.Height=-1;
Current.MaxWidth=-1; Current.MaxWidth=-1;
Current.MaxHeight=-1; Current.MaxHeight=-1;
Current.BorderTopWidth = Current.BorderRightWidth = Current.BorderBottomWidth = Current.BorderLeftWidth = CSS_LINE_WIDTH_MEDIUM; Current.Border.Top.reset();
Current.BorderTopStyle = Current.BorderRightStyle = Current.BorderBottomStyle = Current.BorderLeftStyle = CSS_LINE_STYLE_NONE; Current.Border.Right.reset();
Current.BorderTopColor = Current.BorderRightColor = Current.BorderBottomColor = Current.BorderLeftColor = Current.TextColor; Current.Border.Bottom.reset();
Current.Border.Left.reset();
Current.Background = CSSBackground();
Current.BackgroundColorOver = NLMISC::CRGBA::Transparent;
Current.MarginTop = Current.MarginRight = Current.MarginBottom = Current.MarginLeft = 0;
Current.PaddingTop = Current.PaddingRight = Current.PaddingBottom = Current.PaddingLeft = 0; Current.PaddingTop = Current.PaddingRight = Current.PaddingBottom = Current.PaddingLeft = 0;
Current.StyleRules.clear(); Current.StyleRules.clear();

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -30,7 +30,12 @@ namespace NLGUI
enum CSSLineStyle { enum CSSLineStyle {
CSS_LINE_STYLE_NONE = 0, CSS_LINE_STYLE_NONE = 0,
CSS_LINE_STYLE_HIDDEN, CSS_LINE_STYLE_HIDDEN,
CSS_LINE_STYLE_DOTTED,
CSS_LINE_STYLE_DASHED,
CSS_LINE_STYLE_SOLID, CSS_LINE_STYLE_SOLID,
CSS_LINE_STYLE_DOUBLE,
CSS_LINE_STYLE_GROOVE,
CSS_LINE_STYLE_RIDGE,
CSS_LINE_STYLE_INSET, CSS_LINE_STYLE_INSET,
CSS_LINE_STYLE_OUTSET CSS_LINE_STYLE_OUTSET
}; };
@ -42,6 +47,53 @@ namespace NLGUI
CSS_LINE_WIDTH_THICK = 5 CSS_LINE_WIDTH_THICK = 5
}; };
enum CSSUnitType {
CSS_UNIT_NONE = 0,
CSS_UNIT_EM,
CSS_UNIT_REM,
CSS_UNIT_PERCENT,
CSS_UNIT_PX,
CSS_UNIT_PT,
CSS_UNIT_VW,
CSS_UNIT_VH,
CSS_UNIT_VI,
CSS_UNIT_VB,
CSS_UNIT_VMIN,
CSS_UNIT_VMAX
};
enum CSSValueType {
CSS_VALUE_NONE = 0,
CSS_VALUE_REPEAT,
CSS_VALUE_SPACE,
CSS_VALUE_ROUND,
CSS_VALUE_NOREPEAT,
CSS_VALUE_FIXED,
CSS_VALUE_LOCAL,
CSS_VALUE_SCROLL,
CSS_VALUE_LEFT,
CSS_VALUE_CENTER,
CSS_VALUE_RIGHT,
CSS_VALUE_TOP,
CSS_VALUE_BOTTOM,
CSS_VALUE_BORDER_BOX,
CSS_VALUE_PADDING_BOX,
CSS_VALUE_CONTENT_BOX,
CSS_VALUE_LENGTH,
CSS_VALUE_AUTO,
CSS_VALUE_COVER,
CSS_VALUE_CONTAIN
};
template<typename T>
struct CSSRect
{
T Top;
T Right;
T Bottom;
T Left;
};
}//namespace }//namespace
#endif // CL_CSS_TYPES_H #endif // CL_CSS_TYPES_H

@ -1,8 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2015 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -85,9 +86,12 @@ namespace NLGUI
/// Get the ContextHelp for this control. Default is to return _ContextHelp /// Get the ContextHelp for this control. Default is to return _ContextHelp
virtual void getContextHelp(ucstring &help) const {help= _ContextHelp;} virtual void getContextHelp(std::string &help) const {help= _ContextHelp;}
#ifdef RYZOM_LUA_UCSTRING
virtual void getContextHelpAsUtf16(ucstring &help) const {help.fromUtf8(_ContextHelp);} // Compatibility
#endif
/// Get the ContextHelp for this control, with tooltip specific code. Default behaviour is identical to getContextHelp. /// Get the ContextHelp for this control, with tooltip specific code. Default behaviour is identical to getContextHelp.
virtual void getContextHelpToolTip(ucstring &help) const { getContextHelp(help); } virtual void getContextHelpToolTip(std::string &help) const { getContextHelp(help); }
// Get the name of the context help window. Default to "context_help" // Get the name of the context help window. Default to "context_help"
virtual std::string getContextHelpWindowName() const; virtual std::string getContextHelpWindowName() const;
/// Get the ContextHelp ActionHandler. If "", noop /// Get the ContextHelp ActionHandler. If "", noop
@ -123,8 +127,12 @@ namespace NLGUI
void setToolTipPosRef(THotSpot pos) { _ToolTipPosRef = pos;} void setToolTipPosRef(THotSpot pos) { _ToolTipPosRef = pos;}
/// replace the default contextHelp /// replace the default contextHelp
ucstring getDefaultContextHelp() const {return _ContextHelp;} std::string getDefaultContextHelp() const {return _ContextHelp;}
void setDefaultContextHelp(const ucstring &help) {_ContextHelp= help;} void setDefaultContextHelp(const std::string &help) {_ContextHelp= help;}
#ifdef RYZOM_LUA_UCSTRING
ucstring getDefaultContextHelpAsUtf16() const {return ucstring::makeFromUtf8(_ContextHelp);} // Compatibility
void setDefaultContextHelpAsUtf16(const ucstring &help) {_ContextHelp= help.toUtf8();} // Compatibility
#endif
void setOnContextHelp(const std::string &help) {_OnContextHelp= help;} void setOnContextHelp(const std::string &help) {_OnContextHelp= help;}
void setOnContextHelpAHParams(const std::string &p) {_OnContextHelpParams= p;} void setOnContextHelpAHParams(const std::string &p) {_OnContextHelpParams= p;}
@ -154,12 +162,18 @@ namespace NLGUI
// called when keyboard capture has been lost // called when keyboard capture has been lost
virtual void onKeyboardCaptureLost() {} virtual void onKeyboardCaptureLost() {}
#ifdef RYZOM_LUA_UCSTRING
// 'tooltip' property expects string to be ucstring or latin1 which is not possible from html page // 'tooltip' property expects string to be ucstring or latin1 which is not possible from html page
int luaSetTooltipUtf8(CLuaState &ls); int luaSetTooltipUtf8(CLuaState &ls); // Compatibility
#endif
REFLECT_EXPORT_START(CCtrlBase, CViewBase) REFLECT_EXPORT_START(CCtrlBase, CViewBase)
REFLECT_UCSTRING("tooltip", getDefaultContextHelp, setDefaultContextHelp); #ifdef RYZOM_LUA_UCSTRING
REFLECT_LUA_METHOD("setTooltipUtf8", luaSetTooltipUtf8); REFLECT_UCSTRING("tooltip", getDefaultContextHelpAsUtf16, setDefaultContextHelpAsUtf16); // Compatibility
REFLECT_LUA_METHOD("setTooltipUtf8", luaSetTooltipUtf8); // Compatibility
#else
REFLECT_STRING("tooltip", getDefaultContextHelp, setDefaultContextHelp);
#endif
REFLECT_EXPORT_END REFLECT_EXPORT_END
// special for mouse over : return true and fill the name of the cursor to display // special for mouse over : return true and fill the name of the cursor to display
@ -171,7 +185,7 @@ namespace NLGUI
protected: protected:
// This is the ContextHelp filled by default in parse() // This is the ContextHelp filled by default in parse()
ucstring _ContextHelp; std::string _ContextHelp;
CStringShared _OnContextHelp; CStringShared _OnContextHelp;
CStringShared _OnContextHelpParams; CStringShared _OnContextHelpParams;
CStringShared _ToolTipSpecialParent; CStringShared _ToolTipSpecialParent;

@ -1,8 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -177,6 +178,7 @@ namespace NLGUI
bool _MouseDown : 1; bool _MouseDown : 1;
bool _CallingAH : 1; bool _CallingAH : 1;
bool _Cancelable : 1; // true if the slider may be cancelled when pressed on the mouse right button bool _Cancelable : 1; // true if the slider may be cancelled when pressed on the mouse right button
bool _Keyboard : 1;
bool _Frozen : 1; bool _Frozen : 1;
bool _Scale : 1; bool _Scale : 1;

@ -1,8 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -96,8 +97,14 @@ namespace NLGUI
bool getTextModulateGlobalColorOver() const {return _TextModulateGlobalColorOver;} bool getTextModulateGlobalColorOver() const {return _TextModulateGlobalColorOver;}
void setTextModulateGlobalColorOver(bool v) {_TextModulateGlobalColorOver= v;} void setTextModulateGlobalColorOver(bool v) {_TextModulateGlobalColorOver= v;}
// Set text (noop if text id) // Set text (noop if text id)
void setText (const ucstring &text); void setText (const std::string &text);
ucstring getText () const; std::string getText () const;
#ifdef RYZOM_LUA_UCSTRING
void setTextAsUtf16 (const ucstring &text); // Compatibility
ucstring getTextAsUtf16 () const; // Compatibility
#endif
void setLocalize (bool localize);
bool isLocalized () const;
void setHardText (const std::string &text); void setHardText (const std::string &text);
std::string getHardText () const; std::string getHardText () const;
@ -127,16 +134,33 @@ namespace NLGUI
void setTexturePushed(const std::string &l, const std::string &m, const std::string &r); void setTexturePushed(const std::string &l, const std::string &m, const std::string &r);
void setTextureOver(const std::string &l, const std::string &m, const std::string &r); void setTextureOver(const std::string &l, const std::string &m, const std::string &r);
// lua
void setTextureLua (const std::string &name);
void setTexturePushedLua (const std::string &name);
void setTextureOverLua (const std::string &name);
// return texture _l.tga
std::string getTexture () const;
std::string getTexturePushed () const;
std::string getTextureOver() const;
int luaGetViewText(CLuaState &ls); int luaGetViewText(CLuaState &ls);
REFLECT_EXPORT_START(CCtrlTextButton, CCtrlBaseButton) REFLECT_EXPORT_START(CCtrlTextButton, CCtrlBaseButton)
REFLECT_UCSTRING("uc_hardtext", getText, setText); #ifdef RYZOM_LUA_UCSTRING
REFLECT_UCSTRING("uc_hardtext", getTextAsUtf16, setTextAsUtf16); // Compatibility
#endif
REFLECT_BOOL("localize", isLocalized, setLocalize);
REFLECT_STRING("hardtext", getHardText, setHardText); REFLECT_STRING("hardtext", getHardText, setHardText);
REFLECT_STRING("text", getText, setText);
REFLECT_SINT32("text_x", getTextX, setTextX) REFLECT_SINT32("text_x", getTextX, setTextX)
REFLECT_SINT32("wmargin", getWMargin, setWMargin) REFLECT_SINT32("wmargin", getWMargin, setWMargin)
REFLECT_SINT32("wmin", getWMin, setWMin) REFLECT_SINT32("wmin", getWMin, setWMin)
REFLECT_SINT32("hmin", getHMin, setHMin) REFLECT_SINT32("hmin", getHMin, setHMin)
REFLECT_LUA_METHOD("getViewText", luaGetViewText) REFLECT_LUA_METHOD("getViewText", luaGetViewText)
REFLECT_STRING("texture", getTexture, setTextureLua);
REFLECT_STRING("texture_pushed", getTexturePushed, setTexturePushedLua);
REFLECT_STRING("texture_over", getTextureOver, setTextureOverLua);
REFLECT_EXPORT_END REFLECT_EXPORT_END
void onRemoved(); void onRemoved();

@ -1,9 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2015 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2015-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -60,13 +60,19 @@ namespace NLGUI
// Combo Texts // Combo Texts
void resetTexts(); void resetTexts();
void addText(const ucstring &text); void addText(const std::string &text);
void setText(uint i, const ucstring &text); void setText(uint i, const std::string &text);
void insertText(uint i, const ucstring &text); void insertText(uint i, const std::string &text);
const ucstring &getText(uint i) const; const std::string &getText(uint i) const;
#ifdef RYZOM_LUA_UCSTRING
ucstring getTextAsUtf16(uint i) const; // Compatibility
#endif
uint getTextId(uint i) const; uint getTextId(uint i) const;
uint getTextPos(uint nId) const; uint getTextPos(uint nId) const;
const ucstring &getTexture(uint i) const; const std::string &getTexture(uint i) const;
#ifdef RYZOM_LUA_UCSTRING
ucstring getTextureAsUtf16(uint i) const; // Compatibility
#endif
void setGrayed(uint i, bool g); void setGrayed(uint i, bool g);
bool getGrayed(uint i) const; bool getGrayed(uint i) const;
void removeText(uint nPos); void removeText(uint nPos);
@ -87,11 +93,15 @@ namespace NLGUI
std::string getSelectionText() const; std::string getSelectionText() const;
// view text // view text
void setViewText(const ucstring & text); void setViewText(const std::string & text);
ucstring getViewText() const; std::string getViewText() const;
#ifdef RYZOM_LUA_UCSTRING
void setViewTextAsUtf16(const ucstring &text) { setViewText(text.toUtf8()); } // Compatibility
ucstring getViewTextAsUtf16() const; // Compatibility
#endif
CViewText *getViewText(); CViewText *getViewText();
void setTexture(uint i, const ucstring &texture); void setTexture(uint i, const std::string &texture);
sint32 evalContentWidth() const; sint32 evalContentWidth() const;
@ -122,7 +132,11 @@ namespace NLGUI
REFLECT_LUA_METHOD("resetTexts", luaResetTexts) REFLECT_LUA_METHOD("resetTexts", luaResetTexts)
REFLECT_SINT32 ("selectionNb", getSelectionNb, setSelectionNb) REFLECT_SINT32 ("selectionNb", getSelectionNb, setSelectionNb)
REFLECT_STRING ("selection_text", getSelectionText, setSelectionText) REFLECT_STRING ("selection_text", getSelectionText, setSelectionText)
REFLECT_UCSTRING ("view_text", getViewText, setViewText) #ifdef RYZOM_LUA_UCSTRING
REFLECT_UCSTRING ("view_text", getViewTextAsUtf16, setViewTextAsUtf16) // Compatibility
#else
REFLECT_STRING ("view_text", getViewText, setViewText)
#endif
REFLECT_EXPORT_END REFLECT_EXPORT_END
@ -137,8 +151,8 @@ namespace NLGUI
// sint32 // sint32
CInterfaceProperty _Selection; CInterfaceProperty _Selection;
sint32 _NotLinkedToDBSelection; sint32 _NotLinkedToDBSelection;
std::vector<std::pair<uint, ucstring> > _Texts; std::vector<std::pair<uint, std::string> > _Texts;
std::vector<ucstring> _Textures; std::vector<std::string> _Textures;
std::vector<bool> _Grayed; std::vector<bool> _Grayed;
// Action Handler called on combo click // Action Handler called on combo click
@ -155,7 +169,7 @@ namespace NLGUI
CCtrlBaseButton *_SelectButton; CCtrlBaseButton *_SelectButton;
bool _IsExternViewText; bool _IsExternViewText;
ucstring _ExternViewText; std::string _ExternViewText;
private: private:

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -57,7 +58,7 @@ namespace NLGUI
CInterfaceProperty _NumberMax; CInterfaceProperty _NumberMax;
sint32 _Cache; sint32 _Cache;
sint32 _CacheMax; sint32 _CacheMax;
ucstring _EmptyText; std::string _EmptyText;
void buildTextFromCache(); void buildTextFromCache();
}; };

@ -1,8 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2020 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -60,7 +61,7 @@ public:
keydown = 0, // a key has been press down. The key value is stored as a TKey keydown = 0, // a key has been press down. The key value is stored as a TKey
keyup, // a key has been released. The key value is stored as a TKey keyup, // a key has been released. The key value is stored as a TKey
keychar, // a key has been stroke. The key is a ucchar keychar, // a key has been stroke. The key is a ucchar
keystring, // a string has been sent. The string is a ucstring keystring, // a string has been sent. The string is a utf-8 string
unknown, // uninitialized event unknown, // uninitialized event
}; };
CEventDescriptorKey() : _KeyEvent(unknown), _CtrlState(false), _ShiftState(false), _AltState(false), _Char(0) CEventDescriptorKey() : _KeyEvent(unknown), _CtrlState(false), _ShiftState(false), _AltState(false), _Char(0)
@ -82,13 +83,13 @@ public:
return _Key; return _Key;
} }
// return the char that has been pressed. The key event type MUST be 'keychar', else => assert // return the char that has been pressed. The key event type MUST be 'keychar', else => assert
ucchar getChar() const u32char getChar() const
{ {
nlassert(_KeyEvent == keychar); nlassert(_KeyEvent == keychar);
return _Char; return _Char;
} }
// return the string that has been sent. The key event type MUST be 'keystring', else => assert // return the string that has been sent. The key event type MUST be 'keystring', else => assert
ucstring getString() const std::string getString() const
{ {
nlassert(_KeyEvent == keystring); nlassert(_KeyEvent == keystring);
return _String; return _String;
@ -141,9 +142,9 @@ private:
union union
{ {
NLMISC::TKey _Key; NLMISC::TKey _Key;
ucchar _Char; u32char _Char;
}; };
ucstring _String; std::string _String;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -248,12 +249,14 @@ namespace NLGUI
// Get the header color draw. NB: depends if grayed, and if active. // Get the header color draw. NB: depends if grayed, and if active.
NLMISC::CRGBA getDrawnHeaderColor () const; NLMISC::CRGBA getDrawnHeaderColor () const;
ucstring getUCTitleOpened () const; #ifdef RYZOM_LUA_UCSTRING
void setUCTitleOpened (const ucstring &title); ucstring getUCTitleOpened () const; // Compatibility
ucstring getUCTitleClosed () const; void setUCTitleOpened (const ucstring &title); // Compatibility
void setUCTitleClosed (const ucstring &title); ucstring getUCTitleClosed () const; // Compatibility
ucstring getUCTitle () const; void setUCTitleClosed (const ucstring &title); // Compatibility
void setUCTitle (const ucstring &title); ucstring getUCTitle () const; // Compatibility
void setUCTitle (const ucstring &title); // Compatibility
#endif
void setPopable(bool popable) { _Popable = popable; } void setPopable(bool popable) { _Popable = popable; }
bool isPopable() const { return _Popable; } bool isPopable() const { return _Popable; }
@ -287,9 +290,13 @@ namespace NLGUI
REFLECT_STRING("title", getTitle, setTitle); REFLECT_STRING("title", getTitle, setTitle);
REFLECT_STRING("title_opened", getTitleOpened, setTitleOpened); REFLECT_STRING("title_opened", getTitleOpened, setTitleOpened);
REFLECT_STRING("title_closed", getTitleClosed, setTitleClosed); REFLECT_STRING("title_closed", getTitleClosed, setTitleClosed);
REFLECT_UCSTRING("uc_title_opened", getUCTitleOpened, setUCTitleOpened);
REFLECT_UCSTRING("uc_title_closed", getUCTitleClosed, setUCTitleClosed); #ifdef RYZOM_LUA_UCSTRING
REFLECT_UCSTRING("uc_title", getUCTitle, setUCTitle); REFLECT_UCSTRING("uc_title_opened", getUCTitleOpened, setUCTitleOpened); // Compatibility
REFLECT_UCSTRING("uc_title_closed", getUCTitleClosed, setUCTitleClosed); // Compatibility
REFLECT_UCSTRING("uc_title", getUCTitle, setUCTitle); // Compatibility
#endif
REFLECT_STRING("title_color", getTitleColorAsString, setTitleColorAsString); REFLECT_STRING("title_color", getTitleColorAsString, setTitleColorAsString);
REFLECT_SINT32("pop_min_h", getPopupMinH, setPopupMinH); REFLECT_SINT32("pop_min_h", getPopupMinH, setPopupMinH);
REFLECT_SINT32("pop_max_h", getPopupMaxH, setPopupMaxH); REFLECT_SINT32("pop_max_h", getPopupMaxH, setPopupMaxH);
@ -302,6 +309,8 @@ namespace NLGUI
REFLECT_BOOL("lockable", isLockable, setLockable); REFLECT_BOOL("lockable", isLockable, setLockable);
REFLECT_BOOL("locked", isLocked, setLocked); REFLECT_BOOL("locked", isLocked, setLocked);
REFLECT_BOOL("localize", isLocalize, setLocalize);
REFLECT_BOOL("header_active", getHeaderActive, setHeaderActive); REFLECT_BOOL("header_active", getHeaderActive, setHeaderActive);
REFLECT_BOOL("right_button_enabled", getRightButtonEnabled, setRightButtonEnabled); REFLECT_BOOL("right_button_enabled", getRightButtonEnabled, setRightButtonEnabled);
REFLECT_EXPORT_END REFLECT_EXPORT_END
@ -364,7 +373,7 @@ namespace NLGUI
bool isActiveSavable() const { return _ActiveSavable; } bool isActiveSavable() const { return _ActiveSavable; }
bool isLocalize() const { return _Localize; } bool isLocalize() const { return _Localize; }
void setLocalize(bool localize) { _Localize = localize; } void setLocalize(bool localize);
void setPopupX(sint32 x) { _PopupX = x; } void setPopupX(sint32 x) { _PopupX = x; }
void setPopupY(sint32 y) { _PopupY = y; } void setPopupY(sint32 y) { _PopupY = y; }
@ -477,8 +486,8 @@ namespace NLGUI
float _CurrentRolloverAlphaContainer; float _CurrentRolloverAlphaContainer;
float _CurrentRolloverAlphaContent; float _CurrentRolloverAlphaContent;
sint32 _LayerSetup; sint32 _LayerSetup;
ucstring _TitleTextOpened; std::string _TitleTextOpened;
ucstring _TitleTextClosed; std::string _TitleTextClosed;
CViewText *_TitleOpened; CViewText *_TitleOpened;
CViewText *_TitleClosed; CViewText *_TitleClosed;
sint32 _TitleDeltaMaxW; sint32 _TitleDeltaMaxW;
@ -636,6 +645,9 @@ namespace NLGUI
TTileClass convertTitleClass(const char *ptr); TTileClass convertTitleClass(const char *ptr);
void setTitledOpenedViewText();
void setTitledClosedViewText();
static COptionsContainerMove *getMoveOptions(); static COptionsContainerMove *getMoveOptions();
COptionsLayer *getContainerOptions(sint32 ls=-1); // Depends if overload by OptionsName or default used COptionsLayer *getContainerOptions(sint32 ls=-1); // Depends if overload by OptionsName or default used

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2014 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>

@ -1,8 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2017 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -63,26 +64,29 @@ namespace NLGUI
virtual bool handleEvent (const NLGUI::CEventDescriptor& eventDesc); virtual bool handleEvent (const NLGUI::CEventDescriptor& eventDesc);
/// Accessors /// Accessors
ucstring getInputString() const { return _InputString; } std::string getInputString() const;
const ucstring &getInputStringRef() const { return _InputString; } std::string getPrompt() const;
const ucstring &getPrompt() const { return _Prompt; } const ::u32string &getInputStringRef() const { return _InputString; }
const ::u32string &getPromptRef() const { return _Prompt; }
/** Set the prompt /** Set the prompt
* NB : line returns are encoded as '\n', not '\r\n' * NB : line returns are encoded as '\n', not '\r\n'
*/ */
void setPrompt(const ucstring &s) { _Prompt = s; } void setPrompt(const std::string &s);
void setInputString(const ucstring &str); void setInputString(const std::string &str);
void setInputStringRef(const ucstring &str) {_InputString = str; }; void setInputStringRef(const ::u32string &str);
void setInputStringAsInt(sint32 val); void setInputStringAsInt(sint32 val);
sint32 getInputStringAsInt() const; sint32 getInputStringAsInt() const;
void setInputStringAsInt64(sint64 val); void setInputStringAsInt64(sint64 val);
sint64 getInputStringAsInt64() const; sint64 getInputStringAsInt64() const;
void setInputStringAsFloat(float val); void setInputStringAsFloat(float val);
float getInputStringAsFloat() const; float getInputStringAsFloat() const;
void setInputStringAsStdString(const std::string &str); #ifdef RYZOM_LUA_UCSTRING
std::string getInputStringAsStdString() const; void setInputStringAsUtf16(const ucstring &str); // Compatibility
void setInputStringAsUtf8(const std::string &str); ucstring getInputStringAsUtf16() const; // Compatibility
std::string getInputStringAsUtf8() const; void setInputStringAsUtf32(const ::u32string &str) { setInputStringRef(str); } // Compatibility
::u32string getInputStringAsUtf32() const { return _InputString; } // Compatibility
#endif
void setColor(NLMISC::CRGBA col); void setColor(NLMISC::CRGBA col);
@ -97,7 +101,7 @@ namespace NLGUI
static CGroupEditBox *getMenuFather() { return _MenuFather; } static CGroupEditBox *getMenuFather() { return _MenuFather; }
void setCommand(const ucstring &command, bool execute); void setCommand(const std::string &command, bool execute);
// Stop parent from blinking // Stop parent from blinking
void stopParentBlink() { if (_Parent) _Parent->disableBlink(); } void stopParentBlink() { if (_Parent) _Parent->disableBlink(); }
@ -121,7 +125,7 @@ namespace NLGUI
sint32 getMaxHistoric() const {return _MaxHistoric;} sint32 getMaxHistoric() const {return _MaxHistoric;}
sint32 getCurrentHistoricIndex () const {return _CurrentHistoricIndex;} sint32 getCurrentHistoricIndex () const {return _CurrentHistoricIndex;}
void setCurrentHistoricIndex (sint32 index) {_CurrentHistoricIndex=index;} void setCurrentHistoricIndex (sint32 index) {_CurrentHistoricIndex=index;}
const ucstring &getHistoric(uint32 index) const {return _Historic[index];} const ::u32string &getHistoric(uint32 index) const {return _Historic[index];}
uint32 getNumHistoric() const {return (uint32)_Historic.size ();} uint32 getNumHistoric() const {return (uint32)_Historic.size ();}
// Get on change action handler // Get on change action handler
@ -139,7 +143,7 @@ namespace NLGUI
// Paste the selection into buffer // Paste the selection into buffer
void paste(); void paste();
// Write the string into buffer // Write the string into buffer
void writeString(const ucstring &str, bool replace = true, bool atEnd = true); void writeString(const std::string &str, bool replace = true, bool atEnd = true);
// Expand the expression (true if there was a '/' at the start of the line) // Expand the expression (true if there was a '/' at the start of the line)
bool expand(); bool expand();
@ -170,7 +174,7 @@ namespace NLGUI
virtual void onKeyboardCaptureLost(); virtual void onKeyboardCaptureLost();
// set the input string as "default". will be reseted at first click (used for user information) // set the input string as "default". will be reseted at first click (used for user information)
void setDefaultInputString(const ucstring &str); void setDefaultInputString(const std::string &str);
// For Interger and PositiveInteger, can specify min and max values // For Interger and PositiveInteger, can specify min and max values
void setIntegerMinValue(sint32 minValue) {_IntegerMinValue=minValue;} void setIntegerMinValue(sint32 minValue) {_IntegerMinValue=minValue;}
@ -189,8 +193,10 @@ namespace NLGUI
REFLECT_LUA_METHOD("setSelectionAll", luaSetSelectionAll); REFLECT_LUA_METHOD("setSelectionAll", luaSetSelectionAll);
REFLECT_LUA_METHOD("setFocusOnText", luaSetFocusOnText); REFLECT_LUA_METHOD("setFocusOnText", luaSetFocusOnText);
REFLECT_LUA_METHOD("cancelFocusOnText", luaCancelFocusOnText); REFLECT_LUA_METHOD("cancelFocusOnText", luaCancelFocusOnText);
REFLECT_STRING("input_string", getInputStringAsStdString, setInputStringAsStdString); REFLECT_STRING("input_string", getInputString, setInputString);
REFLECT_UCSTRING("uc_input_string", getInputString, setInputString); #ifdef RYZOM_LUA_UCSTRING
REFLECT_UCSTRING("uc_input_string", getInputStringAsUtf16, setInputStringAsUtf16); // Compatibility
#endif
REFLECT_EXPORT_END REFLECT_EXPORT_END
/** Restore the original value of the edit box. /** Restore the original value of the edit box.
@ -215,6 +221,7 @@ namespace NLGUI
float _BlinkTime; float _BlinkTime;
sint32 _CursorPos; sint32 _CursorPos;
uint32 _MaxNumChar; uint32 _MaxNumChar;
uint32 _MaxNumBytes;
uint32 _MaxNumReturn; uint32 _MaxNumReturn;
uint32 _MaxFloatPrec; // used in setInputStringAsFloat() only uint32 _MaxFloatPrec; // used in setInputStringAsFloat() only
sint32 _MaxCharsSize; sint32 _MaxCharsSize;
@ -228,17 +235,17 @@ namespace NLGUI
NLMISC::CRGBA _BackSelectColor; NLMISC::CRGBA _BackSelectColor;
// Text info // Text info
ucstring _Prompt; ::u32string _Prompt;
ucstring _InputString; ::u32string _InputString;
CViewText *_ViewText; CViewText *_ViewText;
// undo / redo // undo / redo
ucstring _StartInputString; // value of the input string when focus was acuired first ::u32string _StartInputString; // value of the input string when focus was acuired first
ucstring _ModifiedInputString; ::u32string _ModifiedInputString;
// Historic info // Historic info
typedef std::deque<ucstring> THistoric; typedef std::deque<::u32string> THistoric;
THistoric _Historic; THistoric _Historic;
uint32 _MaxHistoric; uint32 _MaxHistoric;
sint32 _CurrentHistoricIndex; sint32 _CurrentHistoricIndex;
@ -275,7 +282,7 @@ namespace NLGUI
bool _CanRedo : 1; bool _CanRedo : 1;
bool _CanUndo : 1; bool _CanUndo : 1;
std::vector<char> _NegativeFilter; std::vector<u32char> _NegativeFilter;
sint _CursorTexID; sint _CursorTexID;
sint32 _CursorWidth; sint32 _CursorWidth;
@ -298,13 +305,13 @@ namespace NLGUI
void handleEventString(const NLGUI::CEventDescriptorKey &event); void handleEventString(const NLGUI::CEventDescriptorKey &event);
void setup(); void setup();
void triggerOnChangeAH(); void triggerOnChangeAH();
void appendStringFromClipboard(const ucstring &str); void appendStringFromClipboard(const std::string &str);
ucstring getSelection(); std::string getSelection();
static CGroupEditBox *_MenuFather; static CGroupEditBox *_MenuFather;
static bool isValidAlphaNumSpace(ucchar c) static bool isValidAlphaNumSpace(u32char c)
{ {
if (c > 255) return false; if (c > 255) return false;
char ac = (char) c; char ac = (char) c;
@ -314,7 +321,7 @@ namespace NLGUI
ac==' '; ac==' ';
} }
static bool isValidAlphaNum(ucchar c) static bool isValidAlphaNum(u32char c)
{ {
if (c > 255) return false; if (c > 255) return false;
char ac = (char) c; char ac = (char) c;
@ -323,7 +330,7 @@ namespace NLGUI
(ac >= 'A' && ac <= 'Z'); (ac >= 'A' && ac <= 'Z');
} }
static bool isValidAlpha(ucchar c) static bool isValidAlpha(u32char c)
{ {
if (c > 255) return false; if (c > 255) return false;
char ac = (char) c; char ac = (char) c;
@ -331,13 +338,13 @@ namespace NLGUI
(ac >= 'A' && ac <= 'Z'); (ac >= 'A' && ac <= 'Z');
} }
static bool isValidPlayerNameChar(ucchar c) static bool isValidPlayerNameChar(u32char c)
{ {
// valid player name (with possible shard prefix / suffix format // valid player name (with possible shard prefix / suffix format
return isValidAlpha(c) || c=='.' || c=='(' || c==')'; return isValidAlpha(c) || c=='.' || c=='(' || c==')';
} }
static bool isValidFilenameChar(ucchar c) static bool isValidFilenameChar(u32char c)
{ {
if (c == '\\' || if (c == '\\' ||
c == '/' || c == '/' ||
@ -351,12 +358,12 @@ namespace NLGUI
return true; return true;
} }
// //
bool isFiltered(ucchar c) bool isFiltered(u32char c)
{ {
uint length = (uint)_NegativeFilter.size(); ptrdiff_t length = _NegativeFilter.size();
for (uint k = 0; k < length; ++k) for (ptrdiff_t k = 0; k < length; ++k)
{ {
if ((ucchar) _NegativeFilter[k] == c) return true; if (_NegativeFilter[k] == c) return true;
} }
return false; return false;
} }

@ -1,8 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010-2019 Winch Gate Property Limited // Copyright (C) 2010-2021 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2019-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -27,13 +28,16 @@
#include "nel/gui/ctrl_button.h" #include "nel/gui/ctrl_button.h"
#include "nel/gui/group_table.h" #include "nel/gui/group_table.h"
#include "nel/gui/html_element.h" #include "nel/gui/html_element.h"
#include "nel/gui/html_parser.h"
#include "nel/gui/css_style.h" #include "nel/gui/css_style.h"
#include "nel/gui/css_background_renderer.h"
// forward declaration // forward declaration
typedef void CURLM; typedef void CURLM;
namespace NLGUI namespace NLGUI
{ {
class CViewLink;
class CCtrlButton; class CCtrlButton;
class CCtrlTextButton; class CCtrlTextButton;
class CCtrlScroll; class CCtrlScroll;
@ -44,6 +48,20 @@ namespace NLGUI
extern std::string CurrentCookie; extern std::string CurrentCookie;
class ICurlDownloadCB
{
public:
ICurlDownloadCB(const std::string &url)
: url(url)
{}
virtual ~ICurlDownloadCB() {};
virtual void finish() = 0;
std::string url;
};
// HTML group // HTML group
/** /**
* Widget to have a resizable scrolltext and its scrollbar * Widget to have a resizable scrolltext and its scrollbar
@ -115,6 +133,9 @@ namespace NLGUI
// Browse error // Browse error
void browseError (const char *msg); void browseError (const char *msg);
// Error message with html content
void browseErrorHtml(const std::string &html);
bool isBrowsing(); bool isBrowsing();
// Update coords // Update coords
@ -127,9 +148,9 @@ namespace NLGUI
void endParagraph(); void endParagraph();
// add image download (used by view_bitmap.cpp to load web images) // add image download (used by view_bitmap.cpp to load web images)
void addImageDownload(const std::string &url, CViewBase *img, const CStyleParams &style = CStyleParams(), const TImageType type = NormalImage, const std::string &placeholder = "web_del.tga"); ICurlDownloadCB *addImageDownload(const std::string &url, CViewBase *img, const CStyleParams &style = CStyleParams(), const TImageType type = NormalImage, const std::string &placeholder = "web_del.tga");
// remove image from download list if present ICurlDownloadCB *addTextureDownload(const std::string &url, sint32 &texId, CViewBase *view);
void removeImageDownload(CViewBase *img); void removeImageDownload(ICurlDownloadCB *handle, CViewBase *img);
std::string localImageName(const std::string &url); std::string localImageName(const std::string &url);
// Timeout // Timeout
@ -137,37 +158,15 @@ namespace NLGUI
float getTimeout() const {return (float)_TimeoutValue;} float getTimeout() const {return (float)_TimeoutValue;}
// Some constants // Some constants
NLMISC::CRGBA BgColor;
NLMISC::CRGBA ErrorColor; NLMISC::CRGBA ErrorColor;
NLMISC::CRGBA LinkColor; NLMISC::CRGBA LinkColor;
NLMISC::CRGBA TextColor;
NLMISC::CRGBA H1Color;
NLMISC::CRGBA H2Color;
NLMISC::CRGBA H3Color;
NLMISC::CRGBA H4Color;
NLMISC::CRGBA H5Color;
NLMISC::CRGBA H6Color;
bool ErrorColorGlobalColor; bool ErrorColorGlobalColor;
bool LinkColorGlobalColor; bool LinkColorGlobalColor;
bool TextColorGlobalColor; bool TextColorGlobalColor;
bool H1ColorGlobalColor;
bool H2ColorGlobalColor;
bool H3ColorGlobalColor;
bool H4ColorGlobalColor;
bool H5ColorGlobalColor;
bool H6ColorGlobalColor;
uint TextFontSize;
uint H1FontSize;
uint H2FontSize;
uint H3FontSize;
uint H4FontSize;
uint H5FontSize;
uint H6FontSize;
uint TDBeginSpace; uint TDBeginSpace;
uint PBeginSpace; uint PBeginSpace;
uint LIBeginSpace; uint LIBeginSpace;
uint ULBeginSpace; uint ULBeginSpace;
uint LIIndent;
uint ULIndent; uint ULIndent;
float LineSpaceFontFactor; float LineSpaceFontFactor;
std::string DefaultButtonGroup; std::string DefaultButtonGroup;
@ -181,8 +180,8 @@ namespace NLGUI
std::string DefaultRadioButtonBitmapNormal; std::string DefaultRadioButtonBitmapNormal;
std::string DefaultRadioButtonBitmapPushed; std::string DefaultRadioButtonBitmapPushed;
std::string DefaultRadioButtonBitmapOver; std::string DefaultRadioButtonBitmapOver;
// TODO: remove from interface xml and code
std::string DefaultBackgroundBitmapView; std::string DefaultBackgroundBitmapView;
std::string CurrentLinkTitle;
struct TFormField { struct TFormField {
public: public:
@ -320,16 +319,22 @@ namespace NLGUI
void clearContext(); void clearContext();
// Translate a char // Translate a char
bool translateChar(ucchar &output, ucchar input, ucchar lastChar) const; bool translateChar(u32char &output, u32char input, u32char lastChar) const;
// return true if text has same style
bool isSameStyle(CViewLink *text, const CStyleParams &style) const;
// add text link using template
void newTextButton(const std::string &text, const std::string &tpl);
void newTextLink(const std::string &text);
// Add a string in the current paragraph // Add a string in the current paragraph
void addString(const ucstring &str); void addString(const std::string &str);
// Add an image in the current paragraph // Add an image in the current paragraph
void addImage(const std::string &id, const std::string &img, bool reloadImg=false, const CStyleParams &style = CStyleParams()); void addImage(const std::string &id, const std::string &img, bool reloadImg=false, const CStyleParams &style = CStyleParams());
// Add a text area in the current paragraph // Add a text area in the current paragraph
CInterfaceGroup *addTextArea (const std::string &templateName, const char *name, uint rows, uint cols, bool multiLine, const ucstring &content, uint maxlength); CInterfaceGroup *addTextArea (const std::string &templateName, const char *name, uint rows, uint cols, bool multiLine, const std::string &content, uint maxlength);
// Add a combo box in the current paragraph // Add a combo box in the current paragraph
CDBGroupComboBox *addComboBox(const std::string &templateName, const char *name); CDBGroupComboBox *addComboBox(const std::string &templateName, const char *name);
@ -340,6 +345,9 @@ namespace NLGUI
const std::string &overBitmap, const char *actionHandler, const char *actionHandlerParams, const std::string &tooltip, const std::string &overBitmap, const char *actionHandler, const char *actionHandlerParams, const std::string &tooltip,
const CStyleParams &style = CStyleParams()); const CStyleParams &style = CStyleParams());
// Set the background color
void setupBackground(CSSBackgroundRenderer *bg);
// Set the background color // Set the background color
void setBackgroundColor (const NLMISC::CRGBA &bgcolor); void setBackgroundColor (const NLMISC::CRGBA &bgcolor);
@ -350,9 +358,9 @@ namespace NLGUI
void flushString(); void flushString();
// Set the title // Set the title
void setTitle (const ucstring &title);
void setTitle (const std::string &title); void setTitle (const std::string &title);
std::string getTitle() const; std::string getTitle() const;
void setContainerTitle (const std::string &title);
// Lookup a url in local file system // Lookup a url in local file system
bool lookupLocalFile (std::string &result, const char *url, bool isUrl); bool lookupLocalFile (std::string &result, const char *url, bool isUrl);
@ -375,7 +383,16 @@ namespace NLGUI
// true if renderer is waiting for css files to finish downloading (link rel=stylesheet) // true if renderer is waiting for css files to finish downloading (link rel=stylesheet)
bool _WaitingForStylesheet; bool _WaitingForStylesheet;
// list of css file urls that are queued up for download // list of css file urls that are queued up for download
std::vector<std::string> _StylesheetQueue; std::vector<CHtmlParser::StyleLink> _StylesheetQueue;
// <style> and downloaded <link rel=stylesheet> elements
std::vector<std::string> _HtmlStyles;
// background from <html> or <body> element
CSSBackgroundRenderer m_HtmlBackground;
CSSBackgroundRenderer m_BodyBackground;
// active table.tr background color from css or from bgcolor attribute
std::vector<NLMISC::CRGBA> m_TableRowBackgroundColor;
// Valid base href was found // Valid base href was found
bool _IgnoreBaseUrlTag; bool _IgnoreBaseUrlTag;
@ -392,10 +409,10 @@ namespace NLGUI
bool _TrustedDomain; bool _TrustedDomain;
// Title prefix // Title prefix
ucstring _TitlePrefix; std::string _TitlePrefix;
// Title string // Title string
ucstring _TitleString; std::string _TitleString;
// Need to browse next update coords.. // Need to browse next update coords..
bool _BrowseNextTime; bool _BrowseNextTime;
@ -644,7 +661,7 @@ namespace NLGUI
std::string Name; std::string Name;
// Variable value // Variable value
ucstring Value; std::string Value;
// Text area group // Text area group
CInterfaceGroup *TextArea; CInterfaceGroup *TextArea;
@ -745,9 +762,7 @@ namespace NLGUI
bool _Localize; bool _Localize;
// Current node is a text area // Current node is a text area
bool _TextArea;
std::string _TextAreaTemplate; std::string _TextAreaTemplate;
ucstring _TextAreaContent;
std::string _TextAreaName; std::string _TextAreaName;
uint _TextAreaRow; uint _TextAreaRow;
uint _TextAreaCols; uint _TextAreaCols;
@ -755,7 +770,7 @@ namespace NLGUI
// current mode is in select option // current mode is in select option
bool _SelectOption; bool _SelectOption;
ucstring _SelectOptionStr; std::string _SelectOptionStr;
// Current node is a object // Current node is a object
std::string _ObjectType; std::string _ObjectType;
@ -765,7 +780,7 @@ namespace NLGUI
std::string _TextAreaScript; std::string _TextAreaScript;
// Get last char // Get last char
ucchar getLastChar() const; u32char getLastChar() const;
// Current link view // Current link view
class CViewLink *_CurrentViewLink; class CViewLink *_CurrentViewLink;
@ -826,49 +841,110 @@ namespace NLGUI
void spliceFragment(std::list<CHtmlElement>::iterator src); void spliceFragment(std::list<CHtmlElement>::iterator src);
// decode all HTML entities // decode all HTML entities
static ucstring decodeHTMLEntities(const ucstring &str); static std::string decodeHTMLEntities(const std::string &str);
struct CDataImageDownload class CDataDownload : public ICurlDownloadCB
{ {
public: public:
CDataImageDownload(CViewBase *img, CStyleParams style, TImageType type): Image(img), Style(style), Type(type) CDataDownload(const std::string &u, const std::string &d)
: ICurlDownloadCB(u), data(NULL), fp(NULL), dest(d), redirects(0), ConnectionTimeout(60)
{}
virtual ~CDataDownload();
public:
CCurlWWWData *data;
std::string dest;
std::string tmpdest;
uint32 redirects;
FILE *fp;
uint32 ConnectionTimeout;
};
class StylesheetDownloadCB : public CDataDownload
{
public:
StylesheetDownloadCB(const std::string &url, const std::string &dest, CGroupHTML *parent)
: CDataDownload(url, dest), Parent(parent)
{}
virtual void finish() NL_OVERRIDE;
private:
CGroupHTML *Parent;
};
class ImageDownloadCB : public CDataDownload
{ {
}
public: public:
struct SImageInfo
{
SImageInfo(CViewBase *img, const CStyleParams &style, TImageType type)
: Image(img), Style(style), Type(type)
{}
CViewBase *Image; CViewBase *Image;
CStyleParams Style; CStyleParams Style;
TImageType Type; TImageType Type;
}; };
struct CDataDownload ImageDownloadCB(const std::string &url, const std::string &dest, CViewBase *img, const CStyleParams &style, TImageType type, CGroupHTML *parent)
: CDataDownload(url, dest), Parent(parent)
{
addImage(img, style, type);
}
virtual void finish() NL_OVERRIDE;
void addImage(CViewBase *img, const CStyleParams &style, TImageType type);
void removeImage(CViewBase *img);
private:
std::vector<SImageInfo> Images;
CGroupHTML *Parent;
CStyleParams Style;
TImageType Type;
};
class TextureDownloadCB : public CDataDownload
{ {
public: public:
CDataDownload(const std::string &u, const std::string &d, TDataType t, CViewBase *i, const std::string &s, const std::string &m, const CStyleParams &style = CStyleParams(), const TImageType imagetype = NormalImage) TextureDownloadCB(const std::string &url, const std::string &dest, sint32 texId, CViewBase *view)
: data(NULL), fp(NULL), url(u), dest(d), type(t), luaScript(s), md5sum(m), redirects(0), ConnectionTimeout(60) : CDataDownload(url, dest)
{ {
if (t == ImgType) imgs.push_back(CDataImageDownload(i, style, imagetype)); addTexture(texId, view);
} }
~CDataDownload();
virtual void finish() NL_OVERRIDE;
void addTexture(sint32 texId, CViewBase *view) {
TextureIds.push_back(std::make_pair(texId, view));
}
private:
std::vector<std::pair<sint32, CViewBase *> > TextureIds;
};
class BnpDownloadCB : public CDataDownload
{
public: public:
CCurlWWWData *data; BnpDownloadCB(const std::string &url, const std::string &dest, const std::string md5sum, const std::string lua, CGroupHTML *parent)
std::string url; : CDataDownload(url, dest), Parent(parent), m_md5sum(md5sum), m_lua(lua)
std::string dest; {}
std::string luaScript;
std::string md5sum; virtual void finish() NL_OVERRIDE;
TDataType type;
uint32 redirects; private:
FILE *fp; CGroupHTML *Parent;
std::vector<CDataImageDownload> imgs; std::string m_md5sum;
uint32 ConnectionTimeout; std::string m_lua;
}; };
std::list<CDataDownload> Curls; std::list<CDataDownload*> Curls;
CURLM *MultiCurl; CURLM *MultiCurl;
int RunningCurls; int RunningCurls;
bool startCurlDownload(CDataDownload &download); bool startCurlDownload(CDataDownload *download);
void finishCurlDownload(const CDataDownload &download); void finishCurlDownload(CDataDownload *download);
void pumpCurlQueue(); void pumpCurlQueue();
void initImageDownload(); void initImageDownload();
@ -889,16 +965,17 @@ namespace NLGUI
std::string localBnpName(const std::string &url); std::string localBnpName(const std::string &url);
// add css file from <link href=".." rel="stylesheet"> to download queue // add css file from <link href=".." rel="stylesheet"> to download queue
void addStylesheetDownload(std::vector<std::string> links); void addStylesheetDownload(std::vector<CHtmlParser::StyleLink> links);
// stop all curl downalods (html and data) // stop all curl downalods (html and data)
void releaseDownloads(); void releaseDownloads();
void releaseDataDownloads();
void checkDownloads(); void checkDownloads();
// _CurlWWW download finished // _CurlWWW download finished
void htmlDownloadFinished(bool success, const std::string &error); void htmlDownloadFinished(bool success, const std::string &error);
// images, stylesheets, etc finished downloading // images, stylesheets, etc finished downloading
void dataDownloadFinished(bool success, const std::string &error, CDataDownload &data); void dataDownloadFinished(bool success, const std::string &error, CDataDownload *data);
// HtmlType download finished // HtmlType download finished
void htmlDownloadFinished(const std::string &content, const std::string &type, long code); void htmlDownloadFinished(const std::string &content, const std::string &type, long code);
@ -915,9 +992,6 @@ namespace NLGUI
// :before, :after rendering // :before, :after rendering
void renderPseudoElement(const std::string &pseudo, const CHtmlElement &elm); void renderPseudoElement(const std::string &pseudo, const CHtmlElement &elm);
// apply background from current style (for html, body)
void applyBackground(const CHtmlElement &elm);
void insertFormImageButton(const std::string &name, void insertFormImageButton(const std::string &name,
const std::string &tooltip, const std::string &tooltip,
const std::string &src, const std::string &src,
@ -997,11 +1071,9 @@ namespace NLGUI
void htmlTD(const CHtmlElement &elm); void htmlTD(const CHtmlElement &elm);
void htmlTDend(const CHtmlElement &elm); void htmlTDend(const CHtmlElement &elm);
void htmlTEXTAREA(const CHtmlElement &elm); void htmlTEXTAREA(const CHtmlElement &elm);
void htmlTEXTAREAend(const CHtmlElement &elm);
void htmlTH(const CHtmlElement &elm); void htmlTH(const CHtmlElement &elm);
void htmlTHend(const CHtmlElement &elm); void htmlTHend(const CHtmlElement &elm);
void htmlTITLE(const CHtmlElement &elm); void htmlTITLE(const CHtmlElement &elm);
void htmlTITLEend(const CHtmlElement &elm);
void htmlTR(const CHtmlElement &elm); void htmlTR(const CHtmlElement &elm);
void htmlTRend(const CHtmlElement &elm); void htmlTRend(const CHtmlElement &elm);
//void htmlU(const CHtmlElement &elm); //void htmlU(const CHtmlElement &elm);

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -67,13 +68,13 @@ namespace NLGUI
* \param line : text to be added * \param line : text to be added
* \param color : text color * \param color : text color
*/ */
void addTextChild (const ucstring& line,const NLMISC::CRGBA &textColor, bool multiLine = true); void addTextChild (const std::string& line,const NLMISC::CRGBA &textColor, bool multiLine = true);
/** /**
* add a text child element to the group, using the text template * add a text child element to the group, using the text template
* \param line : text to be added * \param line : text to be added
*/ */
void addTextChild (const ucstring& line, bool multiLine = true); void addTextChild (const std::string& line, bool multiLine = true);
/// Same as adding a text child but the text will be taken from the string manager /// Same as adding a text child but the text will be taken from the string manager
void addTextChildID (uint32 id, bool multiLine = true); void addTextChildID (uint32 id, bool multiLine = true);

@ -3,7 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2014-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -122,12 +122,12 @@ namespace NLGUI
// retrieve the index of a line from its id (-1 if not found) // retrieve the index of a line from its id (-1 if not found)
sint getLineFromId(const std::string &id); sint getLineFromId(const std::string &id);
CViewTextMenu* addLine (const ucstring &name, const std::string &ah, CViewTextMenu* addLine (const std::string &name, const std::string &ah,
const std::string &params, const std::string &id="", const std::string &params, const std::string &id="",
const std::string &cond = std::string(), const std::string &texture="", const std::string &cond = std::string(), const std::string &texture="",
bool checkable = false, bool checked = false, bool formatted = false bool checkable = false, bool checked = false, bool formatted = false
); );
CViewTextMenu* addLineAtIndex(uint index, const ucstring &name, const std::string &ah, CViewTextMenu* addLineAtIndex(uint index, const std::string &name, const std::string &ah,
const std::string &params, const std::string &id="", const std::string &params, const std::string &id="",
const std::string &cond = std::string(), const std::string &texture="", const std::string &cond = std::string(), const std::string &texture="",
bool checkable = false, bool checked = false, bool formatted = false bool checkable = false, bool checked = false, bool formatted = false
@ -333,11 +333,6 @@ namespace NLGUI
virtual bool isWindowUnder (sint32 x, sint32 y); virtual bool isWindowUnder (sint32 x, sint32 y);
// add line with a string, for backward compatibility
void addLine (const std::string &name, const std::string &ah, const std::string &params,
const std::string &id = std::string(),
const std::string &cond = std::string(), const std::string &texture="",
bool checkable = false, bool checked = false);
uint getNumLine() const; uint getNumLine() const;
void deleteLine(uint index); void deleteLine(uint index);
const std::string getActionHandler(uint lineIndex) const; const std::string getActionHandler(uint lineIndex) const;
@ -350,12 +345,12 @@ namespace NLGUI
void setRightClickHandler(uint lineIndex, const std::string &ah = ""); void setRightClickHandler(uint lineIndex, const std::string &ah = "");
void setRightClickHandlerParam(uint lineIndex, const std::string &params = ""); void setRightClickHandlerParam(uint lineIndex, const std::string &params = "");
void addLine (const ucstring &name, const std::string &ah = "", const std::string &params = "", void addLine (const std::string &name, const std::string &ah = "", const std::string &params = "",
const std::string &id = std::string(), const std::string &id = std::string(),
const std::string &cond = std::string(), const std::string &texture="", const std::string &cond = std::string(), const std::string &texture="",
bool checkable = false, bool checked = false bool checkable = false, bool checked = false
); );
void addLineAtIndex (uint index, const ucstring &name, const std::string &ah = "", const std::string &params = "", void addLineAtIndex (uint index, const std::string &name, const std::string &ah = "", const std::string &params = "",
const std::string &id = std::string(), const std::string &id = std::string(),
const std::string &cond = std::string(), const std::string &texture="", const std::string &cond = std::string(), const std::string &texture="",
bool checkable = false, bool checked = false bool checkable = false, bool checked = false

@ -1,8 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2021 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -54,6 +55,8 @@ namespace NLGUI
Right Right
}; };
enum TTextAlign { AlignLeft = 0, AlignCenter, AlignRight, AlignJustify };
///constructor ///constructor
CGroupParagraph(const TCtorParam &param); CGroupParagraph(const TCtorParam &param);
@ -84,19 +87,21 @@ namespace NLGUI
* \param line : text to be added * \param line : text to be added
* \param color : text color * \param color : text color
*/ */
void addTextChild (const ucstring& line,const NLMISC::CRGBA &textColor, bool multiLine = true); void addTextChild (const std::string& line,const NLMISC::CRGBA &textColor, bool multiLine = true);
/** /**
* add a text child element to the group, using the text template * add a text child element to the group, using the text template
* \param line : text to be added * \param line : text to be added
*/ */
void addTextChild (const ucstring& line, bool multiLine = true); void addTextChild (const std::string& line, bool multiLine = true);
/// Same as adding a text child but the text will be taken from the string manager /// Same as adding a text child but the text will be taken from the string manager
void addTextChildID (uint32 id, bool multiLine = true); void addTextChildID (uint32 id, bool multiLine = true);
// the same, but with id taken from the database // the same, but with id taken from the database
void addTextChildID (const std::string &dbPath, bool multiLine = true); void addTextChildID (const std::string &dbPath, bool multiLine = true);
void setTextAlign(const TTextAlign align) { _TextAlign = align; }
protected: protected:
void delChild (CViewBase* child); void delChild (CViewBase* child);
@ -270,6 +275,9 @@ namespace NLGUI
// (the element drawn are stored in _views, _contrlos or _childrengroups of cinterfacegroup // (the element drawn are stored in _views, _contrlos or _childrengroups of cinterfacegroup
std::vector<CElementInfo> _Elements; std::vector<CElementInfo> _Elements;
// Horizontal align for elements
TTextAlign _TextAlign;
// Last parent width // Last parent width
sint32 _LastW; sint32 _LastW;

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2015 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
@ -31,6 +31,7 @@
namespace NLGUI namespace NLGUI
{ {
class CSSBorderRenderer; class CSSBorderRenderer;
class CSSBackgroundRenderer;
/** /**
* This group is used to simulate HTML cells. * This group is used to simulate HTML cells.
@ -94,22 +95,10 @@ namespace NLGUI
// Memorize max width // Memorize max width
sint32 WidthMax; sint32 WidthMax;
// The cell color
NLMISC::CRGBA BgColor;
CSSBorderRenderer* Border; CSSBorderRenderer* Border;
CSSBackgroundRenderer *Background;
uint32 PaddingTop, PaddingRight, PaddingBottom, PaddingLeft; uint32 PaddingTop, PaddingRight, PaddingBottom, PaddingLeft;
// Texture
CViewRenderer::CTextureId _TextureId;
bool _TextureTiled;
bool _TextureScaled;
// cached absolute coords for background texture
sint32 _TextureXReal;
sint32 _TextureYReal;
sint32 _TextureWReal;
sint32 _TextureHReal;
// Alignment // Alignment
TAlign Align; TAlign Align;
TVAlign VAlign; TVAlign VAlign;
@ -121,6 +110,7 @@ namespace NLGUI
// The cell is nowrap // The cell is nowrap
bool NoWrap; bool NoWrap;
// deprecated background image
void setTexture(const std::string & TxName); void setTexture(const std::string & TxName);
void setTextureTile(bool tiled); void setTextureTile(bool tiled);
void setTextureScale(bool scaled); void setTextureScale(bool scaled);
@ -134,8 +124,6 @@ namespace NLGUI
static bool getDebugUICell(){ return DebugUICell; } static bool getDebugUICell(){ return DebugUICell; }
private: private:
void updateTextureCoords();
void setEnclosedGroupDefaultParams(); void setEnclosedGroupDefaultParams();
static bool DebugUICell; static bool DebugUICell;
}; };
@ -164,18 +152,18 @@ namespace NLGUI
sint32 ForceWidthMin; sint32 ForceWidthMin;
CSSBorderRenderer* Border; CSSBorderRenderer* Border;
CSSBackgroundRenderer *Background;
// Cell has 1px solid border when <table> has 'border' attribute with width > 0 // Cell has 1px solid border when <table> has 'border' attribute with width > 0
bool CellBorder; bool CellBorder;
sint32 CellPadding; sint32 CellPadding;
sint32 CellSpacing; sint32 CellSpacing;
// The table color
NLMISC::CRGBA BgColor;
uint8 CurrentAlpha; uint8 CurrentAlpha;
bool ContinuousUpdate; bool ContinuousUpdate;
// deprecated background image
void setTexture(const std::string & TxName); void setTexture(const std::string & TxName);
void setTextureTile(bool tiled); void setTextureTile(bool tiled);
void setTextureScale(bool scaled); void setTextureScale(bool scaled);
@ -201,18 +189,6 @@ namespace NLGUI
virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual bool parse (xmlNodePtr cur, CInterfaceGroup * parentGroup);
// Texture
CViewRenderer::CTextureId _TextureId;
bool _TextureTiled;
bool _TextureScaled;
// cached absolute coords for background texture
sint32 _TextureXReal;
sint32 _TextureYReal;
sint32 _TextureWReal;
sint32 _TextureHReal;
void updateTextureCoords();
// Content validated // Content validated
bool _ContentValidated; bool _ContentValidated;

@ -1,8 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2017 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -60,7 +61,7 @@ namespace NLGUI
bool Show; // If false, the node is not displayed (true default, Root ignored) bool Show; // If false, the node is not displayed (true default, Root ignored)
sint32 YDecal; sint32 YDecal;
// Text // Text
ucstring Text; // Internationalized displayed text std::string Text; // Internationalized displayed text
sint32 FontSize; // If -1 (default), then take the groupTree one sint32 FontSize; // If -1 (default), then take the groupTree one
NLMISC::CRGBA Color; NLMISC::CRGBA Color;
// Template // Template
@ -112,8 +113,12 @@ namespace NLGUI
std::string getBitmap() const { return Bitmap; } std::string getBitmap() const { return Bitmap; }
void setOpened(bool opened) { Opened = opened; } void setOpened(bool opened) { Opened = opened; }
bool getOpened() const { return Opened; } bool getOpened() const { return Opened; }
void setText(const ucstring &text) { Text = text; } void setText(const std::string &text) { Text = text; }
const ucstring& getText() const { return Text; } const std::string& getText() const { return Text; }
#ifdef RYZOM_LUA_UCSTRING
void setTextAsUtf16(const ucstring &text) { Text = text.toUtf8(); } // Compatibility
ucstring getTextAsUtf16() const { return ucstring::makeFromUtf8(Text); } // Compatibility
#endif
sint32 getFontSize() const { return FontSize; } sint32 getFontSize() const { return FontSize; }
void setFontSize(sint32 value) { FontSize = value; } void setFontSize(sint32 value) { FontSize = value; }
sint32 getYDecal() const { return YDecal; } sint32 getYDecal() const { return YDecal; }
@ -181,7 +186,11 @@ namespace NLGUI
REFLECT_STRING("AHParamsClose", getAHParamsClose, setAHParamsClose); REFLECT_STRING("AHParamsClose", getAHParamsClose, setAHParamsClose);
REFLECT_BOOL("Opened", getOpened, setOpened); REFLECT_BOOL("Opened", getOpened, setOpened);
REFLECT_BOOL("Show", getShow, setShow); REFLECT_BOOL("Show", getShow, setShow);
REFLECT_UCSTRING_REF("Text", getText, setText); #ifdef RYZOM_LUA_UCSTRING
REFLECT_UCSTRING("Text", getTextAsUtf16, setTextAsUtf16); // Compatibility
#else
REFLECT_STRING_REF("Text", getText, setText);
#endif
// lua // lua
REFLECT_LUA_METHOD("getNumChildren", luaGetNumChildren); REFLECT_LUA_METHOD("getNumChildren", luaGetNumChildren);
REFLECT_LUA_METHOD("getChild", luaGetChild); REFLECT_LUA_METHOD("getChild", luaGetChild);

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2021 Winch Gate Property Limited
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -75,6 +75,18 @@ namespace NLGUI
// update Children index/parent/next/prevSibling pointers // update Children index/parent/next/prevSibling pointers
void reindexChilds(); void reindexChilds();
// escape text tag or attribute value
std::string htmlEscape(const std::string &val) const;
// serialize element attributes as string
std::string serializeAttributes(bool escape = true) const;
// serialize child elements as html string
std::string serializeChilds(bool escape = true) const;
// serialize itself and children as html string
std::string serialize(bool escape = true) const;
// debug // debug
std::string toString(bool tree = false, uint depth = 0) const; std::string toString(bool tree = false, uint depth = 0) const;
@ -84,6 +96,9 @@ namespace NLGUI
TStyle getPseudo(const std::string &key) const; TStyle getPseudo(const std::string &key) const;
void setPseudo(const std::string &key, const TStyle &style); void setPseudo(const std::string &key, const TStyle &style);
// return lang property for css :lang() pseudo class
std::string getInheritedLanguage() const;
private: private:
// pseudo elements like ":before" and ":after" // pseudo elements like ":before" and ":after"
std::map<std::string, TStyle> _Pseudo; std::map<std::string, TStyle> _Pseudo;

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2021 Winch Gate Property Limited
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -19,6 +19,9 @@
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
// Forward declarations for libxml2
typedef struct _xmlNode xmlNode;
namespace NLGUI namespace NLGUI
{ {
class CHtmlElement; class CHtmlElement;
@ -31,14 +34,23 @@ namespace NLGUI
class CHtmlParser class CHtmlParser
{ {
public: public:
// <link rel=stylesheet>
struct StyleLink
{
uint Index;
std::string Url;
StyleLink(uint i, const std::string &url) : Index(i), Url(url)
{ }
};
bool parseHtml(std::string htmlString) const; bool parseHtml(std::string htmlString) const;
// parse html string into DOM, extract <style> tags into styleString, <link stylesheet> urls into links // parse html string into DOM, extract <style> and <link stylesheet> urls
void getDOM(std::string htmlString, CHtmlElement &parent, std::string &styleString, std::vector<std::string> &links) const; void getDOM(std::string htmlString, CHtmlElement &parent, std::vector<std::string> &styles, std::vector<StyleLink> &links) const;
private: private:
// iterate over libxml html tree, build DOM, and join all <style> tags together // iterate over libxml html tree, build DOM
void parseNode(xmlNode *a_node, CHtmlElement &parent, std::string &styleString, std::vector<std::string> &links) const; void parseNode(xmlNode *a_node, CHtmlElement &parent, std::vector<std::string> &styles, std::vector<StyleLink> &links) const;
// read <style> tag and add its content to styleString // read <style> tag and add its content to styleString
void parseStyle(xmlNode *a_node, std::string &styleString) const; void parseStyle(xmlNode *a_node, std::string &styleString) const;

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2017 Winch Gate Property Limited
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2017 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2018 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2018 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>

@ -1,8 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2018 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -59,16 +60,15 @@ namespace NLGUI
bool getBool() const; bool getBool() const;
sint64 getInteger() const; sint64 getInteger() const;
double getDouble() const; double getDouble() const;
std::string getString() const; const std::string &getString() const;
NLMISC::CRGBA getRGBA() const; NLMISC::CRGBA getRGBA() const;
const ucstring &getUCString() const;
CInterfaceExprUserType *getUserType() const; CInterfaceExprUserType *getUserType() const;
// set // set
void setBool(bool value) { clean(); _Type = Boolean; _BoolValue = value; } void setBool(bool value) { clean(); _Type = Boolean; _BoolValue = value; }
void setInteger(sint64 value) { clean(); _Type = Integer; _IntegerValue = value; } void setInteger(sint64 value) { clean(); _Type = Integer; _IntegerValue = value; }
void setDouble(double value) { clean(); _Type = Double; _DoubleValue = value; } void setDouble(double value) { clean(); _Type = Double; _DoubleValue = value; }
void setString(const std::string &value) { clean(); _Type = String; _StringValue = value; } void setString(const std::string &value) { clean(); _Type = String; _StringValue = value; }
void setUCString(const ucstring &value) { clean(); _Type = String; _StringValue = value; } void setString(const char *value) { clean(); _Type = String; _StringValue = value; }
void setRGBA(NLMISC::CRGBA value) { clean(); _Type = RGBA; _RGBAValue = (uint32)(value.R+(value.G<<8)+(value.B<<16)+(value.A<<24)); } void setRGBA(NLMISC::CRGBA value) { clean(); _Type = RGBA; _RGBAValue = (uint32)(value.R+(value.G<<8)+(value.B<<16)+(value.A<<24)); }
void setUserType(CInterfaceExprUserType *value); void setUserType(CInterfaceExprUserType *value);
// reset this object to initial state (no type) // reset this object to initial state (no type)
@ -99,7 +99,7 @@ namespace NLGUI
CInterfaceExprUserType *_UserTypeValue; CInterfaceExprUserType *_UserTypeValue;
uint32 _RGBAValue; uint32 _RGBAValue;
}; };
ucstring _StringValue; // well, can't fit in union, unless we do some horrible hack.. std::string _StringValue; // well, can't fit in union, unless we do some horrible hack..
private: private:
const char *evalBoolean(const char *expr); const char *evalBoolean(const char *expr);
const char *evalNumber(const char *expr); const char *evalNumber(const char *expr);

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013-2015 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013-2015 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
@ -184,7 +184,7 @@ namespace NLGUI
// *************************************************************************** // ***************************************************************************
// Read a CSS length value, return true if one of supported units '%, rem, em, px, pt' // Read a CSS length value, return true if one of supported units '%, rem, em, px, pt'
// On failure: 'value' and 'unit' values are undefined // On failure: 'value' and 'unit' values are undefined
bool getCssLength (float &value, std::string &unit, const std::string &str); bool getCssLength (float &value, std::string &unit, const std::string &str, bool neg = false);
// Read a width HTML parameter. "100" or "100%". Returns true if percent (0 ~ 1) else false // Read a width HTML parameter. "100" or "100%". Returns true if percent (0 ~ 1) else false
bool getPercentage (sint32 &width, float &percent, const char *str); bool getPercentage (sint32 &width, float &percent, const char *str);

@ -2,8 +2,8 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2013-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -379,6 +379,10 @@ namespace NLGUI
TSmallScriptCache _SmallScriptCache; TSmallScriptCache _SmallScriptCache;
static const char * _NELSmallScriptTableName; static const char * _NELSmallScriptTableName;
#ifdef _WIN32
HMODULE m_LuaSocket;
#endif
private: private:
// this object isn't intended to be copied // this object isn't intended to be copied
CLuaState(const CLuaState &/* other */):NLMISC::CRefCount() { nlassert(0); } CLuaState(const CLuaState &/* other */):NLMISC::CRefCount() { nlassert(0); }

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2013-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -263,8 +263,8 @@ inline lua_Integer CLuaState::toInteger(int index)
if (!isnum) if (!isnum)
{ {
lua_Number d = lua_tonumber(_State, index); lua_Number d = lua_tonumber(_State, index);
nlwarning("Lua: Unable to convert Lua number %lf to integer", d);
res = (lua_Integer)d; res = (lua_Integer)d;
nlwarning("Lua: Converting lua_Number %lf to lua_Integer %i", d, (int)res);
} }
return res; return res;
#else #else

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -86,10 +87,12 @@ namespace NLGUI
// ucstring // ucstring
#ifdef RYZOM_LUA_UCSTRING
static bool pop(CLuaState &ls, ucstring &dest); static bool pop(CLuaState &ls, ucstring &dest);
static void push(CLuaState &ls, const ucstring &value); static void push(CLuaState &ls, const ucstring &value);
static bool isUCStringOnStack(CLuaState &ls, sint index); static bool isUCStringOnStack(CLuaState &ls, sint index);
static bool getUCStringOnStack(CLuaState &ls, sint index, ucstring &dest); static bool getUCStringOnStack(CLuaState &ls, sint index, ucstring &dest);
#endif
// RGBA // RGBA
@ -108,7 +111,9 @@ namespace NLGUI
static void check(CLuaState &ls, bool ok, const std::string &failReason); static void check(CLuaState &ls, bool ok, const std::string &failReason);
static void checkArgType(CLuaState &ls, const char *funcName, uint index, int argType); static void checkArgType(CLuaState &ls, const char *funcName, uint index, int argType);
static void checkArgTypeRGBA(CLuaState &ls, const char *funcName, uint index); static void checkArgTypeRGBA(CLuaState &ls, const char *funcName, uint index);
#ifdef RYZOM_LUA_UCSTRING
static void checkArgTypeUCString(CLuaState &ls, const char *funcName, uint index); static void checkArgTypeUCString(CLuaState &ls, const char *funcName, uint index);
#endif
/** throw a lua expection (inside a C function called from lua) with the given reason, and the current call stack /** throw a lua expection (inside a C function called from lua) with the given reason, and the current call stack
* The various check... function call this function when their test fails * The various check... function call this function when their test fails
*/ */
@ -154,10 +159,12 @@ namespace NLGUI
static uint32 getLocalTime(); static uint32 getLocalTime();
static double getPreciseLocalTime(); static double getPreciseLocalTime();
static std::string findReplaceAll(const std::string &str, const std::string &search, const std::string &replace); static std::string findReplaceAll(const std::string &str, const std::string &search, const std::string &replace);
#ifdef RYZOM_LUA_UCSTRING
static ucstring findReplaceAll(const ucstring &str, const ucstring &search, const ucstring &replace); static ucstring findReplaceAll(const ucstring &str, const ucstring &search, const ucstring &replace);
static ucstring findReplaceAll(const ucstring &str, const std::string &search, const std::string &replace); static ucstring findReplaceAll(const ucstring &str, const std::string &search, const std::string &replace);
static ucstring findReplaceAll(const ucstring &str, const std::string &search, const ucstring &replace); static ucstring findReplaceAll(const ucstring &str, const std::string &search, const ucstring &replace);
static ucstring findReplaceAll(const ucstring &str, const ucstring &search, const std::string &replace); static ucstring findReplaceAll(const ucstring &str, const ucstring &search, const std::string &replace);
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -183,8 +190,10 @@ namespace NLGUI
static int runExpr(CLuaState &ls); // params: "expr". return: any of: nil,bool,string,number, RGBA, UCString static int runExpr(CLuaState &ls); // params: "expr". return: any of: nil,bool,string,number, RGBA, UCString
static int runFct(CLuaState &ls); // params: "expr", param1, param2.... return: any of: nil,bool,string,number, RGBA, UCString static int runFct(CLuaState &ls); // params: "expr", param1, param2.... return: any of: nil,bool,string,number, RGBA, UCString
static int runCommand(CLuaState &ls); // params: "command name", param1, param2 ... return true or false static int runCommand(CLuaState &ls); // params: "command name", param1, param2 ... return true or false
#ifdef RYZOM_LUA_UCSTRING
static int isUCString(CLuaState &ls); static int isUCString(CLuaState &ls);
static int concatUCString(CLuaState &ls); // workaround for + operator that don't work in luabind for ucstrings ... static int concatUCString(CLuaState &ls); // workaround for + operator that don't work in luabind for ucstrings ...
#endif
static int concatString(CLuaState &ls); // speedup concatenation of several strings static int concatString(CLuaState &ls); // speedup concatenation of several strings
static int tableToString(CLuaState &ls); // concat element of a table to build a string static int tableToString(CLuaState &ls); // concat element of a table to build a string
static int getPathContent(CLuaState &ls); static int getPathContent(CLuaState &ls);

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2019-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -41,9 +42,13 @@ namespace NLGUI
UInt32, UInt32,
Float, Float,
String, String,
#ifdef RYZOM_LUA_UCSTRING
UCString, UCString,
#endif
StringRef, StringRef,
#ifdef RYZOM_LUA_UCSTRING
UCStringRef, UCStringRef,
#endif
RGBA, RGBA,
LuaMethod LuaMethod
}; // other types will be added when needed }; // other types will be added when needed
@ -78,9 +83,13 @@ namespace NLGUI
TGetUInt32 GetUInt32; TGetUInt32 GetUInt32;
TGetFloat GetFloat; TGetFloat GetFloat;
TGetString GetString; TGetString GetString;
#ifdef RYZOM_LUA_UCSTRING
TGetUCString GetUCString; TGetUCString GetUCString;
#endif
TGetStringRef GetStringRef; TGetStringRef GetStringRef;
#ifdef RYZOM_LUA_UCSTRING
TGetUCStringRef GetUCStringRef; TGetUCStringRef GetUCStringRef;
#endif
TGetRGBA GetRGBA; TGetRGBA GetRGBA;
TLuaMethod GetLuaMethod; // lua method can only be obtained, not written ... TLuaMethod GetLuaMethod; // lua method can only be obtained, not written ...
} GetMethod; } GetMethod;
@ -91,7 +100,9 @@ namespace NLGUI
TSetUInt32 SetUInt32; TSetUInt32 SetUInt32;
TSetFloat SetFloat; TSetFloat SetFloat;
TSetString SetString; TSetString SetString;
#ifdef RYZOM_LUA_UCSTRING
TSetUCString SetUCString; TSetUCString SetUCString;
#endif
TSetRGBA SetRGBA; TSetRGBA SetRGBA;
} SetMethod; } SetMethod;
// name of the property // name of the property
@ -297,6 +308,7 @@ namespace NLGUI
props.push_back(prop); \ props.push_back(prop); \
} }
#ifdef RYZOM_LUA_UCSTRING
// export a unicode string value, by giving the name of the get and the set method // export a unicode string value, by giving the name of the get and the set method
#define REFLECT_UCSTRING(exportName, getMethod, setMethod) \ #define REFLECT_UCSTRING(exportName, getMethod, setMethod) \
{ \ { \
@ -307,6 +319,7 @@ namespace NLGUI
prop.SetMethod.SetUCString = (CReflectedProperty::TSetUCString) static_cast<TSetUCStringa>(&A::setMethod); \ prop.SetMethod.SetUCString = (CReflectedProperty::TSetUCString) static_cast<TSetUCStringa>(&A::setMethod); \
props.push_back(prop); \ props.push_back(prop); \
} }
#endif
// export a string value, by giving the name of the get and the set method // export a string value, by giving the name of the get and the set method
#define REFLECT_STRING_REF(exportName, getMethod, setMethod) \ #define REFLECT_STRING_REF(exportName, getMethod, setMethod) \
@ -319,6 +332,7 @@ namespace NLGUI
props.push_back(prop); \ props.push_back(prop); \
} }
#ifdef RYZOM_LUA_UCSTRING
// export a unicode string value, by giving the name of the get and the set method // export a unicode string value, by giving the name of the get and the set method
#define REFLECT_UCSTRING_REF(exportName, getMethod, setMethod) \ #define REFLECT_UCSTRING_REF(exportName, getMethod, setMethod) \
{ \ { \
@ -329,7 +343,7 @@ namespace NLGUI
prop.SetMethod.SetUCString = (CReflectedProperty::TSetUCString) static_cast<TSetUCStringa>(&A::setMethod); \ prop.SetMethod.SetUCString = (CReflectedProperty::TSetUCString) static_cast<TSetUCStringa>(&A::setMethod); \
props.push_back(prop); \ props.push_back(prop); \
} }
#endif
// export a color value, by giving the name of the get and the set method // export a color value, by giving the name of the get and the set method
#define REFLECT_RGBA(exportName, getMethod, setMethod) \ #define REFLECT_RGBA(exportName, getMethod, setMethod) \

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -21,11 +22,9 @@
#define STRING_CASE_H #define STRING_CASE_H
#include "nel/misc/types_nl.h" #include "nel/misc/types_nl.h"
#include "nel/misc/ucstring.h"
namespace NLGUI namespace NLGUI
{ {
enum TCaseMode enum TCaseMode
{ {
CaseNormal = 0, // Nothing done CaseNormal = 0, // Nothing done
@ -37,10 +36,7 @@ namespace NLGUI
CaseCount CaseCount
}; };
void setCase( std::string &str, TCaseMode mode );
void setCase( ucstring &str, TCaseMode mode );
} }
#endif #endif

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2016 Winch Gate Property Limited
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
@ -28,6 +28,7 @@
namespace NLGUI namespace NLGUI
{ {
class ICurlDownloadCB;
/** /**
* class implementing a bitmap view * class implementing a bitmap view
@ -61,7 +62,7 @@ namespace NLGUI
_TxtHeight = -1; _TxtHeight = -1;
// Support for https://.. textures // Support for https://.. textures
_HtmlDownload = false; _HtmlDownload = NULL;
} }
/// Destructor /// Destructor
@ -141,7 +142,9 @@ namespace NLGUI
bool _Flip : 1; bool _Flip : 1;
bool _Tile : 1; bool _Tile : 1;
bool _InheritGCAlpha : 1; bool _InheritGCAlpha : 1;
bool _HtmlDownload : 1;
// pointer to active curl download object
ICurlDownloadCB *_HtmlDownload;
// For single texture // For single texture

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2017 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -55,14 +56,17 @@ namespace NLGUI
bool getStringMode() const {return _StringMode;} bool getStringMode() const {return _StringMode;}
// Set cursor string // Set cursor string
void setString (const ucstring &str); void setString (const std::string &str);
// TEMP PATCH // TEMP PATCH
void setCursor (const std::string &name) void setCursor (const std::string &name)
{
if (_TxDefault != name)
{ {
_TxDefault = name; _TxDefault = name;
_TxIdDefault = -2; _TxIdDefault = -2;
} }
}
// TEMP PATCH // TEMP PATCH
/// Show or hide the pointer. Please, use SetMouseMode (bool freelook) instead. /// Show or hide the pointer. Please, use SetMouseMode (bool freelook) instead.
@ -126,14 +130,14 @@ namespace NLGUI
bool _ForceStringMode; bool _ForceStringMode;
CInterfaceGroup *_StringCursor; CInterfaceGroup *_StringCursor;
CInterfaceGroup *_StringCursorHardware; CInterfaceGroup *_StringCursorHardware;
ucstring _ContextString; std::string _ContextString;
// draw current cursor with the given texture, or, if in hardware mode, change the hardware cursor shape // draw current cursor with the given texture, or, if in hardware mode, change the hardware cursor shape
void drawCursor(sint32 texId, NLMISC::CRGBA col, uint8 rot); void drawCursor(sint32 texId, NLMISC::CRGBA col, uint8 rot);
private: private:
// set the string into frame for software or hardware version // set the string into frame for software or hardware version
void setString (const ucstring &str, CInterfaceGroup *target); void setString(const std::string &str, CInterfaceGroup *target);
static bool hwMouse; static bool hwMouse;

@ -1,5 +1,5 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2020 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
@ -252,6 +252,19 @@ namespace NLGUI
*/ */
bool loadTextures (const std::string &textureFileName, const std::string &uvFileName, bool uploadDXTC); bool loadTextures (const std::string &textureFileName, const std::string &uvFileName, bool uploadDXTC);
/*
* newTextureId : Return new placeholder texture id.
* You should call deleteTexture when the texture is not used anymore.
*/
sint32 newTextureId (const std::string &name);
/*
* reloadTexture : Replace existing global texture with new.
* If previous was texture atlas and still used by 2+ textures,
* then create new global texture.
*/
void reloadTexture (sint32 texId, const std::string &name, bool uploadDXTC=true, bool bReleasable=true);
/* /*
* createTexture : create a texture for the interface, possibly from an externally created texture * createTexture : create a texture for the interface, possibly from an externally created texture
* If no external texture is given, then 'sGlobalTextureName' is the filename of the big texture * If no external texture is given, then 'sGlobalTextureName' is the filename of the big texture
@ -312,6 +325,9 @@ namespace NLGUI
/** /**
* get a texture file pointer from a string name. O(logN) * get a texture file pointer from a string name. O(logN)
*
* FIXME: only works with textures in atlas loaded with loadTextures()
*
* \param id : the id of the texture * \param id : the id of the texture
* \return a texture file pointer. -1 if not found or if sName is empty() * \return a texture file pointer. -1 if not found or if sName is empty()
*/ */
@ -444,9 +460,13 @@ namespace NLGUI
SGlobalTexture () SGlobalTexture ()
{ {
FromGlobaleTexture = true; FromGlobaleTexture = true;
Scale = 1.f;
} }
uint32 Width, Height; uint32 Width, Height;
uint32 DefaultWidth, DefaultHeight; uint32 DefaultWidth, DefaultHeight;
// used by texture atlas to unscale individual texture
// getTextureSizeFromId() calls to return 1x size for GUI.
float Scale;
NL3D::UTexture *Texture; NL3D::UTexture *Texture;
std::string Name; std::string Name;
bool FromGlobaleTexture; bool FromGlobaleTexture;
@ -475,6 +495,9 @@ namespace NLGUI
// \name Texture management // \name Texture management
// *************************************************************************** // ***************************************************************************
bool loadTextureFromString(SGlobalTexture *gt, const std::string &data);
bool loadTextureFromFile(SGlobalTexture *gt, const std::string &filename);
// SImage accessors // SImage accessors
SImage *getSImage(sint32 textureId) SImage *getSImage(sint32 textureId)
{ {

@ -1,9 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2014-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -84,7 +84,12 @@ namespace NLGUI
/// Set /// Set
void setText (const ucstring &text); void setText(const std::string &text);
void setTextLocalized(const std::string &text, bool localized);
#ifdef RYZOM_LUA_UCSTRING
void setTextAsUtf16 (const ucstring &text); // Compatibility
#endif
void setLocalized(bool localized);
void setFontName (const std::string &name); void setFontName (const std::string &name);
void setFontSize (sint nFontSize, bool coef = true); void setFontSize (sint nFontSize, bool coef = true);
void setEmbolden (bool nEmbolden); void setEmbolden (bool nEmbolden);
@ -95,7 +100,10 @@ namespace NLGUI
void setShadowColor (const NLMISC::CRGBA &color); void setShadowColor (const NLMISC::CRGBA &color);
void setShadowOffset (sint x, sint y); void setShadowOffset (sint x, sint y);
void setLineMaxW (sint nMaxW, bool invalidate=true); void setLineMaxW (sint nMaxW, bool invalidate=true);
void setOverflowText(const ucstring &text) { _OverflowText = text; } void setOverflowText(const std::string &text) { _OverflowText = text; }
#ifdef RYZOM_LUA_UCSTRING
void setOverflowTextAsUtf16(const ucstring &text) { _OverflowText = text.toUtf8(); } // Compatibility
#endif
void setMultiLine (bool bMultiLine); void setMultiLine (bool bMultiLine);
void setMultiLineSpace (sint nMultiLineSpace); void setMultiLineSpace (sint nMultiLineSpace);
void setMultiLineMaxWOnly (bool state); void setMultiLineMaxWOnly (bool state);
@ -111,9 +119,13 @@ namespace NLGUI
void enableStringSelection(uint start, uint end); void enableStringSelection(uint start, uint end);
void disableStringSelection(); void disableStringSelection();
/// Get /// Get displayed text
std::string getText() const { return _Text; }
ucstring getText() const { return _Text; } #ifdef RYZOM_LUA_UCSTRING
ucstring getTextAsUtf16() const; // Compatibility
ucstring getHardTextAsUtf16() const; // Compatibility
#endif
bool isLocalized() const { return _Localized; }
sint getFontSize() const; sint getFontSize() const;
std::string getFontName() const { return _FontName; } std::string getFontName() const { return _FontName; }
bool getEmbolden() { return _Embolden; } bool getEmbolden() { return _Embolden; }
@ -124,7 +136,9 @@ namespace NLGUI
NLMISC::CRGBA getShadowColor() { return _ShadowColor; } NLMISC::CRGBA getShadowColor() { return _ShadowColor; }
void getShadowOffset(sint &x, sint &y) { x = _ShadowX; y = _ShadowY; } void getShadowOffset(sint &x, sint &y) { x = _ShadowX; y = _ShadowY; }
sint getLineMaxW() const { return _LineMaxW; } sint getLineMaxW() const { return _LineMaxW; }
ucstring getOverflowText() const { return _OverflowText; } #ifdef RYZOM_LUA_UCSTRING
ucstring getOverflowTextAsUtf16() const { return _OverflowText; } // Compatibility
#endif
bool getMultiLine() const { return _MultiLine; } bool getMultiLine() const { return _MultiLine; }
sint getMultiLineSpace() const { return _MultiLineSpace; } sint getMultiLineSpace() const { return _MultiLineSpace; }
bool getMultiLineMaxWOnly() const { return _MultiLineMaxWOnly; } bool getMultiLineMaxWOnly() const { return _MultiLineMaxWOnly; }
@ -174,8 +188,12 @@ namespace NLGUI
/// From a line number, get the character at which it ends (not including any '\n' ), or -1 if invalid /// From a line number, get the character at which it ends (not including any '\n' ), or -1 if invalid
void getLineEndIndex(uint line, sint &index, bool &endOfPreviousLine) const; void getLineEndIndex(uint line, sint &index, bool &endOfPreviousLine) const;
std::string getHardText() const { std::string result; _Text.toString (result); return result; } /// If localized, return localization key (ie "uiLanguage"), else return displayed text.
void setHardText (const std::string &ht); std::string getHardText() const { return _HardText.empty() ? _Text : _HardText; }
void setHardText (const std::string &ht); //< Localizes strings starting with "ui"
#ifdef RYZOM_LUA_UCSTRING
void setHardTextAsUtf16(const ucstring &ht); // Compatibility
#endif
std::string getColorAsString() const; std::string getColorAsString() const;
void setColorAsString(const std::string &ht); void setColorAsString(const std::string &ht);
@ -188,9 +206,15 @@ namespace NLGUI
/** Setup a Text with Format Tags. Text is store without color/format tags, and special array is allocated for Format association /** Setup a Text with Format Tags. Text is store without color/format tags, and special array is allocated for Format association
*/ */
void setTextFormatTaged(const ucstring &text); void setTextFormatTaged(const std::string &text);
#ifdef RYZOM_LUA_UCSTRING
void setTextFormatTagedAsUtf16(const ucstring &text); // Compatibility
#endif
void setSingleLineTextFormatTaged(const ucstring &text); void setSingleLineTextFormatTaged(const std::string &text);
#ifdef RYZOM_LUA_UCSTRING
void setSingleLineTextFormatTagedAsUtf16(const ucstring &text); // Compatibility
#endif
// Remove end space // Remove end space
void removeEndSpaces(); void removeEndSpaces();
@ -216,10 +240,17 @@ namespace NLGUI
int luaSetLineMaxW(CLuaState &ls); int luaSetLineMaxW(CLuaState &ls);
REFLECT_EXPORT_START(CViewText, CViewBase) REFLECT_EXPORT_START(CViewText, CViewBase)
REFLECT_STRING("hardtext", getHardText, setHardText); REFLECT_BOOL("localize", isLocalized, setLocalized);
REFLECT_UCSTRING("uc_hardtext", getText, setText); REFLECT_STRING("hardtext", getHardText, setHardText); // Same as text, but localize is implicitly set true
REFLECT_UCSTRING("uc_hardtext_format", getText, setTextFormatTaged); REFLECT_STRING("text", getText, setText);
REFLECT_UCSTRING("uc_hardtext_single_line_format", getText, setSingleLineTextFormatTaged); REFLECT_STRING("text_format", getText, setTextFormatTaged);
REFLECT_STRING("text_single_line_format", getText, setSingleLineTextFormatTaged);
#ifdef RYZOM_LUA_UCSTRING
// REFLECT_UCSTRING("uc_text", getTextAsUtf16, setTextAsUtf16); // Deprecate uc_ functions
REFLECT_UCSTRING("uc_hardtext", getHardTextAsUtf16, setHardTextAsUtf16); // Compatibility
REFLECT_UCSTRING("uc_hardtext_format", getTextAsUtf16, setTextFormatTagedAsUtf16); // Compatibility
REFLECT_UCSTRING("uc_hardtext_single_line_format", getTextAsUtf16, setSingleLineTextFormatTagedAsUtf16); // Compatibility
#endif
REFLECT_STRING ("color", getColorAsString, setColorAsString); REFLECT_STRING ("color", getColorAsString, setColorAsString);
REFLECT_RGBA ("color_rgba", getColorRGBA, setColorRGBA); REFLECT_RGBA ("color_rgba", getColorRGBA, setColorRGBA);
REFLECT_SINT32 ("alpha", getAlpha, setAlpha); REFLECT_SINT32 ("alpha", getAlpha, setAlpha);
@ -228,7 +259,6 @@ namespace NLGUI
REFLECT_LUA_METHOD("setLineMaxW", luaSetLineMaxW); REFLECT_LUA_METHOD("setLineMaxW", luaSetLineMaxW);
REFLECT_EXPORT_END REFLECT_EXPORT_END
virtual void serial(NLMISC::IStream &f); virtual void serial(NLMISC::IStream &f);
// Sets the parent element // Sets the parent element
@ -236,9 +266,12 @@ namespace NLGUI
void setParentElm( CInterfaceElement *parent ){ _ParentElm = parent; } void setParentElm( CInterfaceElement *parent ){ _ParentElm = parent; }
protected: protected:
std::string _HardtextFormat;
/// Text to display. /// Text to display.
ucstring _Text; std::string _HardTextFormat;
std::string _HardText;
std::string _Text;
mutable sint _TextLength;
bool _Localized;
/// index of the computed String associated to this text control /// index of the computed String associated to this text control
uint _Index; uint _Index;
/// info on the computed String associated to this text control /// info on the computed String associated to this text control
@ -250,11 +283,13 @@ namespace NLGUI
bool _FontSizeCoef; bool _FontSizeCoef;
bool _Embolden; bool _Embolden;
bool _Oblique; bool _Oblique;
// width of the font in pixel. Just a Hint for tabing format (computed with '_') // width of the font in pixel.
float _FontWidth; float _FontWidth;
// width of tabs
float _TabWidth;
// strings to use when computing font size // strings to use when computing font size
ucstring _FontSizingChars; std::string _FontSizingChars;
ucstring _FontSizingFallback; std::string _FontSizingFallback;
// height of the font in pixel. // height of the font in pixel.
// use getFontHeight // use getFontHeight
float _FontHeight; float _FontHeight;
@ -278,7 +313,7 @@ namespace NLGUI
sint32 _LineMaxW; sint32 _LineMaxW;
/// For single line, true if the text is clamped (ie displayed with "...") /// For single line, true if the text is clamped (ie displayed with "...")
bool _SingleLineTextClamped; bool _SingleLineTextClamped;
ucstring _OverflowText; std::string _OverflowText;
/// Multiple lines handling /// Multiple lines handling
bool _MultiLine; bool _MultiLine;
@ -339,7 +374,7 @@ namespace NLGUI
public: public:
// default ctor // default ctor
CWord(uint numSpaces = 0) : Index(0), NumSpaces(numSpaces) {} CWord(uint numSpaces = 0) : Index(0), NumSpaces(numSpaces) {}
ucstring Text; std::string Text;
uint Index; // index of the info for this word uint Index; // index of the info for this word
NL3D::UTextContext::CStringInfo Info; NL3D::UTextContext::CStringInfo Info;
uint NumSpaces; // number of spaces before this word uint NumSpaces; // number of spaces before this word
@ -347,7 +382,7 @@ namespace NLGUI
CFormatInfo Format; CFormatInfo Format;
public: public:
// build from a string, using the current text context // build from a string, using the current text context
void build(const ucstring &text, NL3D::UTextContext &textContext, uint numSpaces= 0); void build(const std::string &text, NL3D::UTextContext &textContext, uint numSpaces= 0);
}; };
typedef std::vector<CWord> TWordVect; typedef std::vector<CWord> TWordVect;
@ -360,7 +395,7 @@ namespace NLGUI
// Clear the line & remove text contexts // Clear the line & remove text contexts
void clear(NL3D::UTextContext &textContext); void clear(NL3D::UTextContext &textContext);
// Add a new word (and its context) in the line + a number of spaces to append at the end of the line // Add a new word (and its context) in the line + a number of spaces to append at the end of the line
void addWord(const ucstring &word, uint numSpaces, const CFormatInfo &wordFormat, float fontWidth, NL3D::UTextContext &textContext); void addWord(const std::string &word, uint numSpaces, const CFormatInfo &wordFormat, float fontWidth, NL3D::UTextContext &textContext);
void addWord(const CWord &word, float fontWidth); void addWord(const CWord &word, float fontWidth);
uint getNumWords() const { return (uint)_Words.size(); } uint getNumWords() const { return (uint)_Words.size(); }
CWord &getWord(uint index) { return _Words[index]; } CWord &getWord(uint index) { return _Words[index]; }
@ -434,15 +469,17 @@ namespace NLGUI
void setup (); void setup ();
void setupDefault (); void setupDefault ();
void setStringSelectionSkipingSpace(uint stringId, const ucstring &text, sint charStart, sint charEnd); void setTextLocalized(const std::string &text);
void setStringSelectionSkipingSpace(uint stringId, const std::string &text, sint charStart, sint charEnd);
// void pushString(const ucstring &str, bool deleteSpaceAtStart = false); // void pushString(const ucstring &str, bool deleteSpaceAtStart = false); // OLD
/// \from CInterfaceElement /// \from CInterfaceElement
void onInvalidateContent(); void onInvalidateContent();
// may append a new line, and append a word to the last line (no spaces) // may append a new line, and append a word to the last line (no spaces)
void flushWordInLine(ucstring &ucCurrentWord, bool &linePushed, const CFormatInfo &wordFormat); void flushWordInLine(std::string &ucCurrentWord, bool &linePushed, const CFormatInfo &wordFormat);
// Clear all the lines and free their datas // Clear all the lines and free their datas
void clearLines(); void clearLines();
// Update in the case of a multiline text // Update in the case of a multiline text
@ -456,7 +493,7 @@ namespace NLGUI
void addDontClipWordLine(std::vector<CWord> &currLine); void addDontClipWordLine(std::vector<CWord> &currLine);
// FormatTag build. // FormatTag build.
static void buildFormatTagText(const ucstring &text, ucstring &textBuild, std::vector<CFormatTag> &formatTags, std::vector<ucstring> &tooltips); static void buildFormatTagText(const std::string &text, std::string &textBuild, std::vector<CFormatTag> &formatTags, std::vector<std::string> &tooltips);
// FormatTag parsing. // FormatTag parsing.
bool isFormatTagChange(uint textIndex, uint ctIndex) const; bool isFormatTagChange(uint textIndex, uint ctIndex) const;
void getFormatTagChange(uint textIndex, uint &ctIndex, CFormatInfo &wordFormat) const; void getFormatTagChange(uint textIndex, uint &ctIndex, CFormatInfo &wordFormat) const;

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -45,7 +46,7 @@ namespace NLGUI
{ {
public: public:
virtual ~IViewTextFormatter(){} virtual ~IViewTextFormatter(){}
virtual ucstring formatString( const ucstring &inputString, const ucstring &paramString ) = 0; virtual std::string formatString( const std::string &inputString, const std::string &paramString ) = 0;
}; };
CViewTextFormated (const TCtorParam &param) : CViewText(param) CViewTextFormated (const TCtorParam &param) : CViewText(param)
@ -55,15 +56,15 @@ namespace NLGUI
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
virtual void checkCoords(); virtual void checkCoords();
const ucstring &getFormatString() const { return _FormatString; } const std::string &getFormatString() const { return _FormatString; }
void setFormatString(const ucstring &format); void setFormatString(const std::string &format);
static ucstring formatString(const ucstring &inputString, const ucstring &paramString); static std::string formatString(const std::string &inputString, const std::string &paramString);
static void setFormatter( IViewTextFormatter *formatter ){ textFormatter = formatter; } static void setFormatter( IViewTextFormatter *formatter ){ textFormatter = formatter; }
private: private:
ucstring _FormatString; std::string _FormatString;
static IViewTextFormatter *textFormatter; static IViewTextFormatter *textFormatter;
}; };

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -38,7 +39,7 @@ namespace NLGUI
public: public:
virtual ~IOnReceiveTextId() {} virtual ~IOnReceiveTextId() {}
// the deriver may change the input text // the deriver may change the input text
virtual void onReceiveTextId(ucstring &str) =0; virtual void onReceiveTextId(std::string &str) =0;
}; };
// *************************************************************************** // ***************************************************************************
@ -58,8 +59,8 @@ namespace NLGUI
{ {
public: public:
virtual ~IViewTextProvider(){} virtual ~IViewTextProvider(){}
virtual bool getString( uint32 stringId, ucstring &result ) = 0; virtual bool getString(uint32 stringId, std::string &result) = 0;
virtual bool getDynString( uint32 dynStringId, ucstring &result ) = 0; virtual bool getDynString(uint32 dynStringId, std::string &result) = 0;
}; };
CViewTextID(const TCtorParam &param) : CViewText(param) CViewTextID(const TCtorParam &param) : CViewText(param)
@ -144,7 +145,7 @@ namespace NLGUI
// If true, setTextFormatted() is used instead of setText() // If true, setTextFormatted() is used instead of setText()
bool _IsTextFormatTaged; bool _IsTextFormatTaged;
// Optional ucstring modifier // Optional utf-8 string modifier
IOnReceiveTextId *_StringModifier; IOnReceiveTextId *_StringModifier;
std::string _DBPath; std::string _DBPath;
static IViewTextProvider* getTextProvider(){ return textProvider; } static IViewTextProvider* getTextProvider(){ return textProvider; }

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -49,10 +50,10 @@ namespace NLGUI
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const; xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);
virtual void checkCoords(); virtual void checkCoords();
const ucstring &getFormatString() const { return _FormatString; } const std::string &getFormatString() const { return _FormatString; }
void setFormatString(const ucstring &format); void setFormatString(const std::string &format);
private: private:
ucstring _FormatString; std::string _FormatString;
}; };
} }

@ -1,9 +1,9 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/> // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2020 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013-2014 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2013-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -333,8 +333,8 @@ namespace NLGUI
void updateTooltipCoords(CCtrlBase *newCtrl); void updateTooltipCoords(CCtrlBase *newCtrl);
/// for ContextHelp action handler only: set the result name /// for ContextHelp action handler only: set the result name
void setContextHelpText( const ucstring &text ){ _ContextHelpText = text; } void setContextHelpText( const std::string &text ){ _ContextHelpText = text; }
ucstring& getContextHelpText(){ return _ContextHelpText; } std::string& getContextHelpText(){ return _ContextHelpText; }
/// force disable the context help /// force disable the context help
void disableContextHelp(); void disableContextHelp();
@ -626,7 +626,7 @@ namespace NLGUI
SInterfaceTimes interfaceTimes; SInterfaceTimes interfaceTimes;
ucstring _ContextHelpText; std::string _ContextHelpText;
bool _ContextHelpActive; bool _ContextHelpActive;
bool inGame; bool inGame;

@ -1,5 +1,5 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2020 Winch Gate Property Limited
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as

@ -1,5 +1,5 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2015 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2016 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2016 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>

@ -96,6 +96,7 @@ public:
_Property = 0; _Property = 0;
_oldProperty = 0; _oldProperty = 0;
_Type = UNKNOWN; _Type = UNKNOWN;
m_Nullable = false;
_Changed = false; _Changed = false;
_LastChangeGC = 0; _LastChangeGC = 0;
} }
@ -235,6 +236,9 @@ private:
/// property type /// property type
EPropType _Type; EPropType _Type;
/// nullable
bool m_Nullable;
/// true if this value has changed /// true if this value has changed
bool _Changed; bool _Changed;

@ -1,10 +1,10 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010-2018 Winch Gate Property Limited // Copyright (C) 2010-2020 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2010 Matt RAYKOWSKI (sfb) <matt.raykowski@gmail.com> // Copyright (C) 2010 Matt RAYKOWSKI (sfb) <matt.raykowski@gmail.com>
// Copyright (C) 2010 Robert TIMM (rti) <mail@rtti.de> // Copyright (C) 2010 Robert TIMM (rti) <mail@rtti.de>
// Copyright (C) 2015-2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2015-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -227,18 +227,62 @@ inline double isValidDouble (double v)
* \param str a string to transform to lower case * \param str a string to transform to lower case
*/ */
std::string toLower ( const char *str ); std::string toLower ( const char *str ); // UTF-8
std::string toLower ( const std::string &str ); std::string toLower ( const std::string &str ); // UTF-8
void toLower ( char *str ); void toLower ( char *str ); // Ascii only
char toLower ( const char ch ); // convert only one character char toLower ( const char ch ); // convert only one character
/** Convert a string in upper case. /** Convert a string in upper case.
* \param a string to transform to upper case * \param a string to transform to upper case
*/ */
std::string toUpper ( const std::string &str); std::string toUpper ( const char *str ); // UTF-8
void toUpper ( char *str); std::string toUpper ( const std::string &str); // UTF-8
void toUpper ( char *str); // Ascii only
/** Convert a single character in UTF-8 to upper or lowercase.
* \param res Character is appended in UTF-8 into this string.
* \param src Character is sourced from this UTF-8 string.
* \param i Index in `str`, incremented by the number of bytes read.
*/
void appendToLower(std::string &res, const char *str, ptrdiff_t &i);
void appendToLower(std::string &res, const std::string &str, ptrdiff_t &i);
void appendToUpper(std::string &res, const char *str, ptrdiff_t &i);
void appendToUpper(std::string &res, const std::string &str, ptrdiff_t &i);
void appendToTitle(std::string &res, const char *str, ptrdiff_t &i);
void appendToTitle(std::string &res, const std::string &str, ptrdiff_t &i);
/** UTF-8 case insensitive compare */
int compareCaseInsensitive(const char *a, const char *b);
int compareCaseInsensitive(const char *a, size_t lenA, const char *b, size_t lenB);
inline int compareCaseInsensitive(const std::string &a, const std::string &b) { return compareCaseInsensitive(&a[0], a.size(), &b[0], b.size()); }
inline bool ltCaseInsensitive(const std::string &a, const std::string &b) { return compareCaseInsensitive(&a[0], a.size(), &b[0], b.size()) < 0; }
std::string toCaseInsensitive(const char *str); // UTF-8, case-insensitive toLower
std::string toCaseInsensitive(const std::string &str); // UTF-8, case-insensitive toLower
/** ASCII to lowercase. Useful for internal identifiers.
* Characters outside of the 7-bit ASCII space, and control characters, are replaced.
*/
std::string toLowerAscii(const std::string &str, char replacement);
void toLowerAscii(char *str, char replacement);
/** ASCII to uppercase. Useful for internal identifiers.
* Characters outside of the 7-bit ASCII space, and control characters, are replaced.
*/
std::string toUpperAscii(const std::string &str, char replacement);
void toUpperAscii(char *str, char replacement);
/** ASCII to lowercase. Useful for internal identifiers.
* Characters outside of the 7-bit ASCII space are not affected.
*/
std::string toLowerAscii(const std::string &str);
void toLowerAscii(char *str);
/** ASCII to uppercase. Useful for internal identifiers.
* Characters outside of the 7-bit ASCII space are not affected.
*/
std::string toUpperAscii(const std::string &str);
void toUpperAscii(char *str);
/** /**
* Convert to an hexadecimal std::string * Convert to an hexadecimal std::string

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2015 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2015-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -89,6 +89,9 @@ void createDebug (const char *logPath = NULL, bool logInFile = true, bool eraseL
/// Do not call this, unless you know what you're trying to do (it kills debug)! /// Do not call this, unless you know what you're trying to do (it kills debug)!
void destroyDebug(); void destroyDebug();
/// Attach exception handler, for new threads and fibers
void attachExceptionHandler();
// call this if you want to change the dir of the log.log file // call this if you want to change the dir of the log.log file
void changeLogDirectory(const std::string &dir); void changeLogDirectory(const std::string &dir);
@ -352,7 +355,7 @@ void setCrashAlreadyReported(bool state);
* Same as nlassertex(false,exp); * Same as nlassertex(false,exp);
*/ */
// removed because we always check assert (even in release mode) #if defined (NL_OS_WINDOWS) && defined (NL_DEBUG) #if defined(NL_DEBUG) /* Debug break is only useful in debug builds */
#if defined(NL_OS_WINDOWS) #if defined(NL_OS_WINDOWS)
#define NLMISC_BREAKPOINT __debugbreak() #define NLMISC_BREAKPOINT __debugbreak()
#elif defined(NL_OS_UNIX) && defined(NL_COMP_GCC) #elif defined(NL_OS_UNIX) && defined(NL_COMP_GCC)
@ -360,6 +363,9 @@ void setCrashAlreadyReported(bool state);
#else #else
#define NLMISC_BREAKPOINT abort() #define NLMISC_BREAKPOINT abort()
#endif #endif
#else
#define NLMISC_BREAKPOINT do { } while (0)
#endif
// Internal, don't use it (make smaller assert code) // Internal, don't use it (make smaller assert code)
extern bool _assert_stop(bool &ignoreNextTime, sint line, const char *file, const char *funcName, const char *exp); extern bool _assert_stop(bool &ignoreNextTime, sint line, const char *file, const char *funcName, const char *exp);
@ -374,7 +380,7 @@ extern bool _assertex_stop_1(bool &ignoreNextTime);
#define nlassume(exp) do { } while (0) #define nlassume(exp) do { } while (0)
#endif #endif
#ifdef NL_NO_DEBUG #ifdef NL_NO_ASSERT
# define nlassert(exp) nlassume(exp) # define nlassert(exp) nlassume(exp)
# define nlassertonce(exp) nlassume(exp) # define nlassertonce(exp) nlassume(exp)
# define nlassertex(exp, str) nlassume(exp) # define nlassertex(exp, str) nlassume(exp)

@ -0,0 +1,83 @@
// NeL - MMORPG Framework <https://wiki.ryzom.dev/>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef NLMISC_DEEP_PTR_H
#define NLMISC_DEEP_PTR_H
#include <nel/misc/types_nl.h>
namespace NLMISC {
/// Pointer template with deep copy and move semantics
template<class T>
class CDeepPtr
{
public:
NL_FORCE_INLINE CDeepPtr() : m(NULL) { } //< Null
NL_FORCE_INLINE ~CDeepPtr() { delete m; }
NL_FORCE_INLINE CDeepPtr(const CDeepPtr &p) : m(p.m ? new T(*p) : NULL) { } //< Copy operator
NL_FORCE_INLINE CDeepPtr &operator=(const CDeepPtr &p) { if (p.m) { if (!m) m = new T(*p); else *m = *p; } else { delete m; m = NULL; } return *this; } //< Copy operator
#ifdef NL_CPP14
NL_FORCE_INLINE CDeepPtr(CDeepPtr &&p) noexcept : m(p.m) { p.m = NULL; } //< Move operator
NL_FORCE_INLINE CDeepPtr &operator=(CDeepPtr &&p) noexcept { delete m; m = p.m; p.m = NULL; return *this; } //< Move operator
#endif
NL_FORCE_INLINE CDeepPtr(T *p) : m(p) { } //< Initializer
NL_FORCE_INLINE CDeepPtr &operator=(T *p) { delete m; m = p; return *this; } //< Initializer
NL_FORCE_INLINE bool operator==(const CDeepPtr &p) const { return /* (m == p.m) || */ (m && p.m && *m == *p); }
NL_FORCE_INLINE bool operator!=(const CDeepPtr &p) const { return !(*this == p); }
NL_FORCE_INLINE bool operator==(const T *p) const { return (m == p) || (m && p && *m == *p); }
NL_FORCE_INLINE bool operator!=(const T *p) const { return !(*this == p); }
NL_FORCE_INLINE bool operator==(const T &p) const { return (m == &p) || (m && *m == p); }
NL_FORCE_INLINE bool operator!=(const T &p) const { return !(*this == p); }
NL_FORCE_INLINE bool operator==(long int p) const { return (*this == (const T *)(ptrdiff_t)p); } //< == NULL
NL_FORCE_INLINE bool operator!=(long int p) const { return (*this != (const T *)(ptrdiff_t)p); } //< != NULL
NL_FORCE_INLINE bool operator==(int p) const { return (*this == (const T *)(ptrdiff_t)p); } //< == 0
NL_FORCE_INLINE bool operator!=(int p) const { return (*this != (const T *)(ptrdiff_t)p); } //< != 0
#ifdef NL_CPP14
NL_FORCE_INLINE bool operator==(nullptr_t p) const { return (*this == (const T *)(ptrdiff_t)p); } //< == nullptr
NL_FORCE_INLINE bool operator!=(nullptr_t p) const { return (*this != (const T *)(ptrdiff_t)p); } //< != nullptr
#endif
NL_FORCE_INLINE T &operator*() { return *m; }
NL_FORCE_INLINE const T &operator*() const { return *m; }
NL_FORCE_INLINE T *operator->() { return m; }
NL_FORCE_INLINE const T *operator->() const { return m; }
NL_FORCE_INLINE operator bool() const { return m; }
NL_FORCE_INLINE bool operator!() const { return !m; }
NL_FORCE_INLINE T *ptr() { return m; }
NL_FORCE_INLINE const T *ptr() const { return m; }
private:
T *m;
};
} /* namespace NLMISC */
#endif /* #ifndef NLMISC_DEEP_PTR_H */
/* end of file */

@ -1,6 +1,9 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the
@ -48,8 +51,8 @@ public:
/// From IEventEmitter. This call submitEvents on all the emitters /// From IEventEmitter. This call submitEvents on all the emitters
virtual void submitEvents(CEventServer &server, bool allWindows); virtual void submitEvents(CEventServer &server, bool allWindows);
virtual bool copyTextToClipboard(const ucstring &text); virtual bool copyTextToClipboard(const std::string &text);
virtual bool pasteTextFromClipboard(ucstring &text); virtual bool pasteTextFromClipboard(std::string &text);
private: private:
typedef std::vector<std::pair<IEventEmitter *, bool> > TEmitterCont; typedef std::vector<std::pair<IEventEmitter *, bool> > TEmitterCont;

@ -1,6 +1,9 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the
@ -320,11 +323,11 @@ public:
class CEventChar : public CEventKey class CEventChar : public CEventKey
{ {
public: public:
CEventChar (ucchar c, TKeyButton button, IEventEmitter* emitter) : CEventKey (button, emitter, EventCharId), _Raw(true) CEventChar (u32char c, TKeyButton button, IEventEmitter* emitter) : CEventKey (button, emitter, EventCharId), _Raw(true)
{ {
Char=c; Char=c;
} }
ucchar Char; u32char Char;
virtual CEvent *clone() const {return new CEventChar(*this);} virtual CEvent *clone() const {return new CEventChar(*this);}
void setRaw( bool raw ) { _Raw = raw; } void setRaw( bool raw ) { _Raw = raw; }
@ -341,11 +344,11 @@ private:
class CEventString : public CEventKey class CEventString : public CEventKey
{ {
public: public:
CEventString (const ucstring &str, IEventEmitter* emitter) : CEventKey (noKeyButton, emitter, EventStringId) CEventString (const std::string &str, IEventEmitter* emitter) : CEventKey (noKeyButton, emitter, EventStringId)
{ {
String = str; String = str;
} }
ucstring String; std::string String;
virtual CEvent *clone() const {return new CEventString(*this);} virtual CEvent *clone() const {return new CEventString(*this);}
}; };

@ -1,6 +1,9 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010-2019 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the
@ -58,12 +61,8 @@ public:
static CFactory &instance() static CFactory &instance()
{ {
// Singleton instance pointer. // Singleton instance pointer.
static CFactory *instance = NULL; static CFactory instance;
if (!instance) return instance;
{
instance = new CFactory();
}
return *instance;
} }
/** Register a factorable object in the factory. /** Register a factorable object in the factory.
@ -185,12 +184,8 @@ public:
/// Get the singleton instance reference. /// Get the singleton instance reference.
static CFactoryIndirect &instance() static CFactoryIndirect &instance()
{ {
static CFactoryIndirect *instance = NULL; static CFactoryIndirect instance;
if (!instance) return instance;
{
instance = new CFactoryIndirect();
}
return *instance;
} }
void registerClass(const KeyType &key, IFactoryIndirectRegister<BaseFactoryClass> *factoryRegister) void registerClass(const KeyType &key, IFactoryIndirectRegister<BaseFactoryClass> *factoryRegister)

@ -1,5 +1,8 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
//
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2014 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2014-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -107,6 +107,7 @@ private:
uint _NumBlockPerChunk; uint _NumBlockPerChunk;
// //
uint _NumAlloc; uint _NumAlloc;
uint8 *_SpareMem;
}; };
} // NLMISC } // NLMISC

@ -3,6 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2012 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2012 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -99,7 +100,7 @@ public:
/// Return a vector with all language available. The vector contains the name of the language. /// Return a vector with all language available. The vector contains the name of the language.
/// The index in the vector is used in \c load() function /// The index in the vector is used in \c load() function
static const std::vector<ucstring> &getLanguageNames(); static const std::vector<std::string> &getLanguageNames();
/** Return a vector with all language code available. /** Return a vector with all language code available.
* Code are ISO 639-2 compliant. * Code are ISO 639-2 compliant.
@ -122,7 +123,7 @@ public:
static void loadFromFilename (const std::string &filename, bool reload); static void loadFromFilename (const std::string &filename, bool reload);
/// Returns the name of the language in the language name (English, Francais, ...) /// Returns the name of the language in the language name (English, Francais, ...)
static ucstring getCurrentLanguageName (); static std::string getCurrentLanguageName ();
/// Returns the code of the language ("fr", "en", ...) /// Returns the code of the language ("fr", "en", ...)
static std::string getCurrentLanguageCode (); static std::string getCurrentLanguageCode ();
@ -134,7 +135,10 @@ public:
static bool setSystemLanguageCode (const std::string &languageCode); static bool setSystemLanguageCode (const std::string &languageCode);
/// Find a string in the selected language and return his association. /// Find a string in the selected language and return his association.
static const ucstring &get (const std::string &label); static const ucstring &getAsUtf16 (const std::string &label);
/// Find a string in the selected language and return his association.
static const std::string &get (const std::string &label);
// Test if a string has a translation in the selected language. // Test if a string has a translation in the selected language.
// NB : The empty string is considered to have a translation // NB : The empty string is considered to have a translation
@ -219,24 +223,28 @@ public:
private: private:
typedef std::map<std::string, ucstring> StrMapContainer; typedef std::map<std::string, std::string> StrMapContainer;
typedef std::map<std::string, ucstring> StrMapContainer16;
static ILoadProxy *_LoadProxy; static ILoadProxy *_LoadProxy;
static StrMapContainer _StrMap; static StrMapContainer _StrMap;
static StrMapContainer16 _StrMap16;
static bool _StrMapLoaded; static bool _StrMapLoaded;
// the alternative language that will be used if the sentence is not found in the original language // the alternative language that will be used if the sentence is not found in the original language
static StrMapContainer _StrMapFallback; static StrMapContainer _StrMapFallback;
static StrMapContainer16 _StrMapFallback16;
static std::vector<std::string> _LanguageCodes; static std::vector<std::string> _LanguageCodes;
static std::vector<ucstring> _LanguageNames; static std::vector<std::string> _LanguageNames;
static std::string _SystemLanguageCode; static std::string _SystemLanguageCode;
static bool _LanguagesNamesLoaded; static bool _LanguagesNamesLoaded;
static std::string _SelectedLanguageCode; static std::string _SelectedLanguageCode;
static const ucstring _NotTranslatedValue; static const ucstring _NotTranslatedValue16;
static const std::string _NotTranslatedValue;
/** Structure to hold contextual info during /** Structure to hold contextual info during
* read of preprocessed file * read of preprocessed file
@ -256,7 +264,7 @@ private:
/// Init _LanguageCodes and _LanguageNames /// Init _LanguageCodes and _LanguageNames
static void initLanguages(); static void initLanguages();
static bool loadFileIntoMap(const std::string &filename, StrMapContainer &dest); static bool loadFileIntoMap(const std::string &filename, StrMapContainer &dest, StrMapContainer16 &dest16);
/// The internal read function, it does the real job of readTextFile /// The internal read function, it does the real job of readTextFile
static void _readTextFile(const std::string &filename, static void _readTextFile(const std::string &filename,

@ -1,5 +1,5 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2020 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2014-2015 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2014-2015 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
@ -731,11 +731,18 @@ struct CFile
static bool createDirectoryTree(const std::string &dirname); static bool createDirectoryTree(const std::string &dirname);
/** Try to set the file access to read/write if not already set. /** Try to set the file access to read/write if not already set.
* On linux/macOS also set +x on directory.
* return true if the file doesn't exist or if the file already have RW access. * return true if the file doesn't exist or if the file already have RW access.
* \return true if RW access is granted * \return true if RW access is granted
*/ */
static bool setRWAccess(const std::string &filename); static bool setRWAccess(const std::string &filename);
/** Try to set +x bit on linux/macOS to make file executable. no-op on Windows
* On Windows, always returns true, even if file does not exist.
* \return true if file exists and +x was set, false if operation failed.
*/
static bool setExecutable(const std::string &filename);
/** Delete a file if possible (change the write access if possible) /** Delete a file if possible (change the write access if possible)
* \return true if the delete occurs. * \return true if the delete occurs.
*/ */

@ -1,5 +1,5 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010-2019 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2019-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2012 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2012-2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as

@ -1,6 +1,9 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the

@ -1,6 +1,9 @@
// NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
// Copyright (C) 2014-2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2014-2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This source file has been modified by the following contributors:
// Copyright (C) 2021 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the // published by the Free Software Foundation, either version 3 of the
@ -32,7 +35,7 @@ public:
uint32 Size; uint32 Size;
uint32 LastModified; uint32 LastModified;
void serial(NLMISC::IStream &f) throw(NLMISC::EStream); void serial(NLMISC::IStream &f);
}; };
@ -40,7 +43,7 @@ public:
CStreamedPackage(); CStreamedPackage();
~CStreamedPackage(); ~CStreamedPackage();
void serial(NLMISC::IStream &f) throw(NLMISC::EStream); void serial(NLMISC::IStream &f);
/// result: [out] ex. /00/00/000000000.. /// result: [out] ex. /00/00/000000000..
/// hash: [in] /// hash: [in]

@ -3,7 +3,7 @@
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2012 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com> // Copyright (C) 2012 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
// Copyright (C) 2016-2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2016-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -193,6 +193,10 @@ inline std::string toString(const sint32 &val) { return toString("%d", val); }
inline std::string toString(const uint64 &val) { return toString("%" NL_I64 "u", val); } inline std::string toString(const uint64 &val) { return toString("%" NL_I64 "u", val); }
inline std::string toString(const sint64 &val) { return toString("%" NL_I64 "d", val); } inline std::string toString(const sint64 &val) { return toString("%" NL_I64 "d", val); }
#ifdef NL_OS_WINDOWS
inline std::string toString(const wchar_t &val) { return toString(reinterpret_cast<const uint16 &>(val)); }
#endif
#ifdef NL_COMP_GCC #ifdef NL_COMP_GCC
# if GCC_VERSION == 40102 # if GCC_VERSION == 40102
@ -246,9 +250,14 @@ inline bool fromString(const std::string &str, sint64 &val) { bool ret = sscanf(
inline bool fromString(const std::string &str, float &val) { bool ret = sscanf(str.c_str(), "%f", &val) == 1; if (!ret) val = 0.0f; return ret; } inline bool fromString(const std::string &str, float &val) { bool ret = sscanf(str.c_str(), "%f", &val) == 1; if (!ret) val = 0.0f; return ret; }
inline bool fromString(const std::string &str, double &val) { bool ret = sscanf(str.c_str(), "%lf", &val) == 1; if (!ret) val = 0.0; return ret; } inline bool fromString(const std::string &str, double &val) { bool ret = sscanf(str.c_str(), "%lf", &val) == 1; if (!ret) val = 0.0; return ret; }
// Fast string to bool, reliably defined for strings starting with 0, 1, t, T, f, F, y, Y, n, N, anything else is undefined. #ifdef NL_OS_WINDOWS
// (str[0] == '1' || (str[0] & 0xD2) == 0x50) inline bool fromString(const std::string &str, wchar_t &val) { return fromString(str, reinterpret_cast<uint16 &>(val)); }
// - Kaetemi #endif
/// Fast string to bool, reliably defined for strings starting with 0, 1, t, T, f, F, y, Y, n, N, and empty strings, anything else is undefined.
/// - Kaetemi
inline bool toBool(const char *str) { return str[0] == '1' || (str[0] & 0xD2) == 0x50; }
inline bool toBool(const std::string &str) { return toBool(str.c_str()); } // Safe because first byte may be null
bool fromString(const std::string &str, bool &val); bool fromString(const std::string &str, bool &val);
@ -290,6 +299,14 @@ inline bool endsWith(const char *str, const char *suffix) { return endsWith(str,
inline bool endsWith(const std::string &str, const char *suffix) { return endsWith(str.c_str(), str.size(), suffix, strlen(suffix)); } inline bool endsWith(const std::string &str, const char *suffix) { return endsWith(str.c_str(), str.size(), suffix, strlen(suffix)); }
inline bool endsWith(const std::string &str, const std::string &suffix) { return endsWith(str.c_str(), str.size(), suffix.c_str(), suffix.size()); } inline bool endsWith(const std::string &str, const std::string &suffix) { return endsWith(str.c_str(), str.size(), suffix.c_str(), suffix.size()); }
// ****************************************************************************
// Conversion of strings between
// - UTF-8
// - Local codepage (UTF-8 on Linux)
// - TString (Local codepage or wide on Windows)
// - Wide (wchar_t *, UTF-16 on Windows, UTF-32 on Linux)
// ****************************************************************************
// Convert local codepage to UTF-8 // Convert local codepage to UTF-8
// On Windows, the local codepage is undetermined // On Windows, the local codepage is undetermined
// On Linux, the local codepage is always UTF-8 (no-op) // On Linux, the local codepage is always UTF-8 (no-op)

@ -0,0 +1,131 @@
// NeL - MMORPG Framework <https://wiki.ryzom.dev/>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef NLMISC_STRING_VIEW_H
#define NLMISC_STRING_VIEW_H
#include <nel/misc/types_nl.h>
#include <string>
#ifdef NL_CPP14
using namespace std::string_literals;
#ifdef NL_CPP17
#include <string_view>
using namespace std::string_view_literals;
#endif
#endif
#ifdef NL_CPP14
/// Obtain an std::string from a string literal.
#define nlstr(strLit) (strLit##s)
#else
/// Obtain an std::string from a string literal.
#define nlstr(strLit) (std::string(strLit))
#endif
#ifdef NL_CPP17
/// Obtain a string view from a string literal.
#define nlsv(strLit) (strLit##sv)
/// Obtain an std::string from a string view.
#define nlsvs(strView) (std::string(strView))
#else
/// Obtain a string view from a string literal.
#define nlsv(strLit) (CStringView(strLit, ::strlen(strLit)))
/// Obtain an std::string from a string view.
#define nlsvs(strView) (std::string(strView.data(), strView.size()))
#endif
/// Obtain a temporary C-string from a string view. Use directly in argument, do not store.
#define nlsvc(strView) ((strView.data()[strView.size()]) ? nlsvs(strView).c_str() : strView.data())
namespace NLMISC {
/// String view literals allow bypassing allocation and strlen calls.
/// CStringView is a 100% drop-in replacement for (const char *str, size_t len) tuples. It's a non-owning reference.
/// Always use `CStringView` where previously `const std::string &` would have been used. It avoids accidental copy.
/// Gotcha: CStringView doesn't need to end with \0, so there's no guarantee with functions that expect \0 terminated strings,
/// use the `nlsvc` macro to get a temporary C-string from a CStringView.
/// Use the `nlsv` macro to get a CStringView from a string literal.
/// Use the `nlstr` macro to get an std::string from a string literal.
/// Use the `nlsvs` macro to get an std::string from a CStringView.
#ifdef NL_CPP17
typedef std::string_view CStringView;
#else
class CStringView
{
public:
CStringView(const std::string &str) : m_Str(&str[0]), m_Len(str.size()) {}
CStringView(const char *const str, const size_t len) : m_Str(str), m_Len(len) {}
CStringView(const char *const str) : m_Str(str), m_Len(sizeof(str)) {}
inline const char *data() const { return m_Str; }
inline size_t length() const { return m_Len; }
inline size_t size() const { return m_Len; }
inline CStringView substr(const size_t offset, const size_t count = -1) { return CStringView(m_Str + offset, std::min(m_Len - offset, count)); }
inline bool operator==(const CStringView o) { if (m_Len != o.m_Len) return false; return memcmp(m_Str, o.m_Str, m_Len) == 0; }
inline bool operator!=(const CStringView o) { if (m_Len != o.m_Len) return true; return memcmp(m_Str, o.m_Str, m_Len) != 0; }
struct const_iterator
{
public:
const_iterator() : m_Addr(NULL) { }
inline void operator++()
{
++m_Addr;
}
inline void operator+=(ptrdiff_t v)
{
m_Addr += v;
}
inline void operator--()
{
--m_Addr;
}
inline void operator-=(ptrdiff_t v)
{
m_Addr -= v;
}
inline bool operator!=(const const_iterator &o) const { return m_Addr != o.m_Addr; }
inline bool operator==(const const_iterator &o) const { return m_Addr == o.m_Addr; }
inline const char &operator*() const { return *m_Addr; }
private:
friend class CStringView;
inline const_iterator(const char *addr) : m_Addr(addr) {}
const char *m_Addr;
};
typedef const_iterator iterator;
iterator begin() const { return iterator(m_Str); }
inline iterator end() const { return iterator(m_Str + m_Len); }
private:
const char *m_Str;
size_t m_Len;
};
#endif
}
#endif /* #ifndef NLMISC_STRING_VIEW_H */
/* end of file */

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2015-2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2015-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -49,10 +49,10 @@ public:
static bool updateProgressBar(uint value, uint total); static bool updateProgressBar(uint value, uint total);
/// Copy a string to system clipboard. /// Copy a string to system clipboard.
static bool copyTextToClipboard(const ucstring &text); static bool copyTextToClipboard(const std::string &text);
/// Paste a string from system clipboard. /// Paste a string from system clipboard.
static bool pasteTextFromClipboard(ucstring &text); static bool pasteTextFromClipboard(std::string &text);
/// Check if system supports unicode. /// Check if system supports unicode.
static bool supportUnicode(); static bool supportUnicode();

@ -2,7 +2,7 @@
// Copyright (C) 2010-2011 Winch Gate Property Limited // Copyright (C) 2010-2011 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2014-2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2014-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -174,10 +174,6 @@
# define NL_COMP_GCC # define NL_COMP_GCC
#endif #endif
#if defined(_HAS_CPP0X) || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 110)
# define NL_ISO_CPP0X_AVAILABLE
#endif
#if defined(NL_COMP_GCC) && (__cplusplus >= 201103L) #if defined(NL_COMP_GCC) && (__cplusplus >= 201103L)
# define NL_NO_EXCEPTION_SPECS # define NL_NO_EXCEPTION_SPECS
#endif #endif
@ -233,6 +229,10 @@
# endif # endif
#endif #endif
#if defined(_HAS_CPP0X) || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(NL_COMP_VC_VERSION) && NL_COMP_VC_VERSION >= 110) || (defined(NL_COMP_GCC) && (GCC_VERSION >= 40400) && (__cplusplus >= 201103L))
# define NL_ISO_CPP0X_AVAILABLE
#endif
// Remove stupid Visual C++ warnings // Remove stupid Visual C++ warnings
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# pragma warning (disable : 4503) // STL: Decorated name length exceeded, name was truncated # pragma warning (disable : 4503) // STL: Decorated name length exceeded, name was truncated
@ -274,7 +274,7 @@
//#define NL_NO_DEBUG //#define NL_NO_DEBUG
#undef NL_NO_DEBUG #undef NL_NO_DEBUG
#define NL_NO_ASSERT
// Standard types // Standard types
@ -548,6 +548,14 @@ template<> struct hash<uint64>
*/ */
typedef uint16 ucchar; typedef uint16 ucchar;
#ifdef NL_CPP14
typedef char32_t u32char;
typedef std::u32string u32string;
#else
typedef uint32 u32char;
typedef std::basic_string<uint32> u32string;
#endif
#ifndef NL_OVERRIDE #ifndef NL_OVERRIDE
#define NL_OVERRIDE override #define NL_OVERRIDE override
#endif #endif

@ -2,7 +2,7 @@
// Copyright (C) 2010 Winch Gate Property Limited // Copyright (C) 2010 Winch Gate Property Limited
// //
// This source file has been modified by the following contributors: // This source file has been modified by the following contributors:
// Copyright (C) 2015 Jan BOON (Kaetemi) <jan.boon@kaetemi.be> // Copyright (C) 2015-2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
// //
// This program is free software: you can redistribute it and/or modify // This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as // it under the terms of the GNU Affero General Public License as
@ -20,6 +20,8 @@
#ifndef NL_UCSTRING_H #ifndef NL_UCSTRING_H
#define NL_UCSTRING_H #define NL_UCSTRING_H
#define RYZOM_LUA_UCSTRING
#include "types_nl.h" #include "types_nl.h"
#include "debug.h" #include "debug.h"
@ -35,14 +37,22 @@ typedef std::basic_string<ucchar> ucstringbase;
class ucstring : public ucstringbase class ucstring : public ucstringbase
{ {
public: public:
ucstring() { } ucstring() { }
ucstring (const ucstringbase &str) : ucstringbase (str) {} ucstring(const ucstringbase &str)
: ucstringbase(str)
{
}
ucstring(const ucchar *begin, const ucchar *end)
: ucstringbase(begin, end)
{
}
ucstring (const std::string &str) : ucstringbase () ucstring(const std::string &str)
: ucstringbase()
{ {
rawCopy(str); fromUtf8(str);
} }
~ucstring() { } ~ucstring() { }
@ -128,17 +138,7 @@ public:
} }
/// Converts the controlled ucstring to a string str /// Converts the controlled ucstring to a string str
void toString (std::string &str) const void toString(std::string &str) const;
{
str.resize (size ());
for (uint i = 0; i < str.size (); i++)
{
if (operator[](i) > 255)
str[i] = '?';
else
str[i] = (char) operator[](i);
}
}
/// Converts the controlled ucstring and returns the resulting string /// Converts the controlled ucstring and returns the resulting string
std::string toString() const std::string toString() const
@ -149,43 +149,7 @@ public:
} }
/// Convert this ucstring (16bits char) into a utf8 string /// Convert this ucstring (16bits char) into a utf8 string
std::string toUtf8() const std::string toUtf8() const;
{
std::string res;
ucstring::const_iterator first(begin()), last(end());
for (; first != last; ++first)
{
//ucchar c = *first;
uint nbLoop = 0;
if (*first < 0x80)
res += char(*first);
else if (*first < 0x800)
{
ucchar c = *first;
c = c >> 6;
c = c & 0x1F;
res += char(c) | 0xC0;
nbLoop = 1;
}
else /*if (*first < 0x10000)*/
{
ucchar c = *first;
c = c >> 12;
c = c & 0x0F;
res += char(c) | 0xE0;
nbLoop = 2;
}
for (uint i=0; i<nbLoop; ++i)
{
ucchar c = *first;
c = c >> ((nbLoop - i - 1) * 6);
c = c & 0x3F;
res += char(c) | 0x80;
}
}
return res;
}
ucstring substr(size_type pos = 0, size_type n = npos) const ucstring substr(size_type pos = 0, size_type n = npos) const
{ {
@ -199,86 +163,7 @@ public:
} }
/// Convert the utf8 string into this ucstring (16 bits char) /// Convert the utf8 string into this ucstring (16 bits char)
void fromUtf8(const std::string &stringUtf8) void fromUtf8(const std::string &stringUtf8);
{
// clear the string
erase();
uint8 c;
ucchar code;
sint iterations = 0;
std::string::const_iterator first(stringUtf8.begin()), last(stringUtf8.end());
for (; first != last; )
{
c = *first++;
code = c;
if ((code & 0xFE) == 0xFC)
{
code &= 0x01;
iterations = 5;
}
else if ((code & 0xFC) == 0xF8)
{
code &= 0x03;
iterations = 4;
}
else if ((code & 0xF8) == 0xF0)
{
code &= 0x07;
iterations = 3;
}
else if ((code & 0xF0) == 0xE0)
{
code &= 0x0F;
iterations = 2;
}
else if ((code & 0xE0) == 0xC0)
{
code &= 0x1F;
iterations = 1;
}
else if ((code & 0x80) == 0x80)
{
// If it's not a valid UTF8 string, just copy the line without utf8 conversion
rawCopy(stringUtf8);
return;
}
else
{
push_back(code);
iterations = 0;
}
if (iterations)
{
for (sint i = 0; i < iterations; i++)
{
if (first == last)
{
// If it's not a valid UTF8 string, just copy the line without utf8 conversion
rawCopy(stringUtf8);
return;
}
uint8 ch;
ch = *first ++;
if ((ch & 0xC0) != 0x80)
{
// If it's not a valid UTF8 string, just copy the line without utf8 conversion
rawCopy(stringUtf8);
return;
}
code <<= 6;
code |= (ucchar)(ch & 0x3F);
}
push_back(code);
}
}
}
static ucstring makeFromUtf8(const std::string &stringUtf8) static ucstring makeFromUtf8(const std::string &stringUtf8)
{ {
@ -288,20 +173,6 @@ public:
return ret; return ret;
} }
private:
void rawCopy(const std::string &str)
{
// We need to convert the char into 8bits unsigned int before promotion to 16 bits
// otherwise, as char are signed on some compiler (MSCV for ex), the sign bit is extended to 16 bits.
resize(str.size());
std::string::const_iterator first(str.begin()), last(str.end());
iterator dest(begin());
for (;first != last; ++first, ++dest)
{
*dest = uint8(*first);
}
}
}; };
inline ucstring operator+(const ucstringbase &ucstr, ucchar c) inline ucstring operator+(const ucstringbase &ucstr, ucchar c)
@ -352,13 +223,16 @@ inline ucstring operator+(const std::string &c, const ucstringbase &ucstr)
return ret; return ret;
} }
namespace NLMISC namespace NLMISC {
{
// Traits for hash_map using CEntityId // Traits for hash_map using CEntityId
struct CUCStringHashMapTraits struct CUCStringHashMapTraits
{ {
enum { bucket_size = 4, min_buckets = 8 }; enum
{
bucket_size = 4,
min_buckets = 8
};
CUCStringHashMapTraits() { } CUCStringHashMapTraits() { }
size_t operator()(const ucstring &id) const size_t operator()(const ucstring &id) const
{ {

@ -0,0 +1,178 @@
// NeL - MMORPG Framework <https://wiki.ryzom.dev/>
// Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef NLMISC_UTF_STRING_VIEW_H
#define NLMISC_UTF_STRING_VIEW_H
#include <nel/misc/types_nl.h>
#include <string>
#include <nel/misc/string_view.h>
#include <nel/misc/ucstring.h>
namespace NLMISC {
class IStream;
/// String view for UTF-8 and UTF-32 iteration as 32-bit codepoints.
/// This string view keeps the string as a reference, it does not make a copy.
/// Only use this for iterating a string's codepoints.
/// String must be NUL terminated, but its size may specify a substring.
class CUtfStringView
{
public:
inline CUtfStringView() : m_Str(NULL), m_Size(0), m_Iterator(utf32Iterator) {}
inline CUtfStringView(const std::string &utf8Str) : m_Str(utf8Str.c_str()), m_Size(utf8Str.size()), m_Iterator(utf8Iterator) {}
inline CUtfStringView(const char *utf8Str) : m_Str(utf8Str), m_Size(strlen(utf8Str)), m_Iterator(utf8Iterator) {}
inline CUtfStringView(const char *utf8Str, size_t len): m_Str(utf8Str), m_Size(len), m_Iterator(utf8Iterator)
{
nlassert(len <= strlen(utf8Str));
}
inline CUtfStringView(CStringView utf8Str) : m_Str(utf8Str.data()), m_Size(utf8Str.size()), m_Iterator(utf8Iterator) {}
#if defined(NL_OS_WINDOWS)
inline CUtfStringView(const wchar_t *utf16Str) : m_Str(utf16Str), m_Size(wcslen(utf16Str)), m_Iterator(utf16Iterator) {}
inline CUtfStringView(const wchar_t *utf16Str, size_t len): m_Str(utf16Str), m_Size(len), m_Iterator(utf16Iterator)
{
nlassert(len <= wcslen(utf16Str));
}
#else
inline CUtfStringView(const wchar_t *utf32Str) : m_Str(utf32Str), m_Size(wcslen(utf32Str)), m_Iterator(utf32Iterator) {}
inline CUtfStringView(const wchar_t *utf32Str, size_t len): m_Str(utf32Str), m_Size(len), m_Iterator(utf32Iterator)
{
nlassert(len <= wcslen(utf32Str));
}
#endif
inline CUtfStringView(const ucstring &utf16Str) : m_Str(utf16Str.c_str()), m_Size(utf16Str.size() << 1), m_Iterator(utf16Iterator) {}
inline CUtfStringView(const ucchar *utf16Str) : m_Str(utf16Str), m_Size(strlen((const char *)utf16Str) & (ptrdiff_t)(-2)), m_Iterator(utf16Iterator) {}
inline CUtfStringView(const ::u32string &utf32Str) : m_Str(utf32Str.c_str()), m_Size(utf32Str.size() << 2), m_Iterator(utf32Iterator) {}
std::string toUtf8(bool reEncode = false) const; // Makes a copy
ucstring toUtf16(bool reEncode = false) const; // Makes a copy
::u32string toUtf32() const; // Makes a copy
std::wstring toWide() const; // Platform dependent, UTF-16 or UTF-32. Makes a copy.
std::string toAscii() const; // Returns only values 0-127, 7-bit ASCII. Makes a copy.
inline bool isUtf8() const { return m_Iterator == utf8Iterator; }
inline bool isUtf16() const { return m_Iterator == utf16Iterator; }
inline bool isUtf32() const { return m_Iterator == utf32Iterator; }
struct const_iterator
{
public:
inline void operator++()
{
if ((ptrdiff_t)m_Next > ((ptrdiff_t)m_View.m_Str + m_View.m_Size))
m_Next = (void *)((ptrdiff_t)m_View.m_Str + m_View.m_Size);
m_Addr = m_Next;
m_Char = m_View.m_Iterator(&m_Next);
}
inline void operator+=(ptrdiff_t a)
{
while ((ptrdiff_t)m_Addr < ((ptrdiff_t)m_View.m_Str + m_View.m_Size))
{
++(*this);
}
}
inline bool operator!=(const const_iterator &o) const { return m_Addr != o.m_Addr; }
inline bool operator==(const const_iterator &o) const { return m_Addr == o.m_Addr; }
inline const u32char &operator*() const { return m_Char; }
const_iterator() : m_View(*(CUtfStringView *)NULL), m_Addr(NULL), m_Char(0) { }
const_iterator &operator=(const const_iterator &other)
{
if (this == &other) return *this;
this->~const_iterator();
return *new(this) const_iterator(other);
}
const void *ptr() const { return m_Addr; }
private:
friend class CUtfStringView;
inline const_iterator(const CUtfStringView &view, const void *addr) : m_View(view), m_Addr(addr), m_Next(addr), m_Char(view.m_Iterator(&m_Next))
{
if ((ptrdiff_t)m_Next > ((ptrdiff_t)m_View.m_Str + m_View.m_Size))
m_Next = (void *)((ptrdiff_t)m_View.m_Str + m_View.m_Size);
}
inline const_iterator(const CUtfStringView &view) : m_View(view), m_Addr((char *)view.m_Str + view.m_Size), m_Next((char *)view.m_Str + view.m_Size + 1), m_Char(0) { }
const CUtfStringView &m_View;
const void *m_Addr; // Current address
const void *m_Next; // Next address
u32char m_Char;
};
typedef const_iterator iterator;
iterator begin() const { return iterator(*this, m_Str); }
inline iterator end() const { return iterator(*this); }
/// Largest possible number of characters in this string.
/// Number of actual characters may be less or equal.
inline size_t largestSize() const { return m_Size; }
inline bool empty() const { return !m_Size; }
const void *ptr() const { return m_Str; }
size_t count() const; //< Slow count of UTF-32 codepoints
ptrdiff_t offset(ptrdiff_t i); const //< Get byte offset by utf-32 codepoint index
inline CUtfStringView substr(const iterator &begin, const iterator &end) const
{
return CUtfStringView(begin.m_Addr, (ptrdiff_t)end.m_Addr - (ptrdiff_t)begin.m_Addr, m_Iterator);
}
inline bool endsWith(char c) { nlassert(c < 0x80); return *((char *)m_Str + m_Size - 1) == c; }
CUtfStringView &operator=(const CUtfStringView &other)
{
if(this == &other) return *this;
this->~CUtfStringView();
return *new(this) CUtfStringView(other);
}
static void append(std::string &str, u32char c);
/// Encode or decode a single UTF-8 character in a stream (also useful for packing unsigned 20-bit integers)
static void append(IStream &s, u32char c);
static u32char get(IStream &s);
/// Get an UTF-8 string from an undefined ASCII-based codepage, without attempting to convert non-7-bit characters
static std::string fromAscii(const std::string &str);
private:
typedef u32char (*TIterator)(const void **addr);
static u32char utf8Iterator(const void **addr);
static u32char utf16Iterator(const void **addr);
static u32char utf32Iterator(const void **addr);
inline CUtfStringView(const void *str, size_t len, TIterator it) : m_Str(str), m_Size(len), m_Iterator(it) { }
const void *const m_Str; // String
const size_t m_Size; // Size in bytes
const TIterator m_Iterator;
}; /* class CUtfStringView */
} /* namespace NLMISC */
#endif /* #ifndef NLMISC_UTF_STRING_VIEW_H */
/* end of file */

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save