List of commits:
Subject Hash Author Date (UTC)
Fix potential text alignment bug d01b21124d3b4ec19c507c2b9df80f0cb9c132b6 mse 2023-01-22 23:54:03
Update gamecontrollerdb abaf1ead824d92c23aac9df2f53896e53217faed mse 2023-01-16 17:00:05
Bug fixes 1be19fe815ac742ac8b3d6db65dbaba1936640ff mse 2022-11-27 05:21:03
Convert Entity and Item to classes 217b7965a75513d94028d7f4399682477f55ae0e mse 2022-10-29 20:45:32
Add vnDrawStats 51ac185dc323ea564d60ef3bb675ab0855a966f7 mse 2022-09-05 09:10:33
Add cave-confec-gl2 targets (WIP) c89db928efc4b68d42d9b66079e444decedc49e2 mse 2022-08-16 04:24:50
Simplify debug target d55157f6ff96ec2103b2d703b96925b767c08ce2 mse 2022-08-16 03:45:00
Bump version to 0.8.0 6f5adaa7a93dff9a24ba03aef36f620d153816f4 mse 2022-08-08 12:16:23
Default saves to ./userdata and replace optional --savehere arg with --saveinos d0cb1ab86c2110cdc0f2aba19fc3843902d6a5ea mse 2022-08-08 11:42:21
Enable Chinese image buttons 3129899ee20ee1821b13db063dcd83477e37c505 mse 2022-08-06 04:44:38
Expand Chinese translations 2baa34f7247c32af12480feb801cb41787022115 mse 2022-08-04 18:34:02
Add VNHACK command 4539d3931617e58e73b295d6ca3679150acdcf78 mse 2022-08-04 06:59:04
Refactor FG3 to allow separate compilation eb1bb8bbc8c60169c2bbd789b38c608b4bb9cbab mse 2022-08-03 22:30:45
Fix menu bugs and bump to v0.7.11 ae193263f4b8461c299f6db66f130beae94724cc mse 2022-07-07 04:52:30
Bump version to 0.7.10 5f70f1aba48d3df67d5e4a70d9595e92aeac4afb mse 2022-05-11 10:54:09
ADV-style text advance 5fbb734d07a2dcf0162245b5afc6b5b4b9021b6f mse 2022-04-12 12:25:24
Switch interaction to mouse-up 345ce8d1ea9755f51365a2676cce0415f9cf68c2 mse 2022-04-10 21:07:15
Use gradient for text backdrop 6ad98cdaf4df37e8b24d9c1e8e2f9b0e904da9aa mse 2022-04-10 13:04:29
Improve vn button highlight 51b2c6c07b0cfb0efdb8cdf5cbeba49ef54d9ccb mse 2022-04-09 06:54:39
Darken the screen when drawing a menu with non-VN text 8f3bcee6d57817ea8c1dd999c68cb129dea1550c mse 2022-04-08 16:01:52
Commit d01b21124d3b4ec19c507c2b9df80f0cb9c132b6 - Fix potential text alignment bug
Author: mse
Author date (UTC): 2023-01-22 23:54
Committer name: mse
Committer date (UTC): 2023-01-22 23:54
Parent(s): abaf1ead824d92c23aac9df2f53896e53217faed
Signing key:
Tree: 4ec22644b83bfa1cce8fb8c8ac24a4ec0bbc377f
File Lines added Lines deleted
include/fg2/fg2.h 3 10
include/fg3/fg3.h 2 9
File include/fg2/fg2.h changed (mode: 100755) (index 278bc4a..06910f0)
... ... float getTextWidth( std::string text, Font &font ){
2454 2454 return getTextWidthUtf32( utf8ToUtf32( text ), font ); return getTextWidthUtf32( utf8ToUtf32( text ), font );
2455 2455 } }
2456 2456
2457 void drawTextUtf32( std::u32string codepoints, Font &font, float posX, float posY, float scale, int align = 0, float wordWrap = 0.0f ){
2457 void drawTextUtf32( std::u32string codepoints, Font &font, float posX, float posY, float scale, int align, float wordWrap ){
2458 2458 // align modes -- 0: left, 1: center, 2: right // align modes -- 0: left, 1: center, 2: right
2459 2459
2460 2460 Texture &tex = font.texture; Texture &tex = font.texture;
 
... ... void drawTextUtf32( std::u32string codepoints, Font &font, float posX, float pos
2491 2491 wordStart = i + 1; wordStart = i + 1;
2492 2492 wordStartX = charX; wordStartX = charX;
2493 2493 }else if( cp == '\n' ){ }else if( cp == '\n' ){
2494 if( align == 0 ){ // Left-to-right alignment.
2495 wordStart = i + 1;
2496 wordStartX = charX;
2497 charX = 0.0f;
2498 charY += leading;
2499 }else{ // Other alignment.
2500 drawTextUtf32( codepoints.substr( i + 1 ), font, posX, posY + leading * scale, scale, align, wordWrap );
2501 break;
2502 }
2494 drawTextUtf32( codepoints.substr( i + 1 ), font, posX, posY + leading * scale, scale, align, wordWrap );
2495 break;
2503 2496 }else if( wordWrap > 0.0f && charX * scale > wordWrap && wordStart > 0 ){ }else if( wordWrap > 0.0f && charX * scale > wordWrap && wordStart > 0 ){
2504 2497 // re-align // re-align
2505 2498 charX = wordStartX; charX = wordStartX;
File include/fg3/fg3.h changed (mode: 100644) (index a515b1c..e833686)
... ... void drawTextUtf32( std::u32string codepoints, Font &font, float posX, float pos
2982 2982 wordStart = i + 1; wordStart = i + 1;
2983 2983 wordStartX = charX; wordStartX = charX;
2984 2984 }else if( cp == '\n' ){ }else if( cp == '\n' ){
2985 if( align == 0 ){ // Left-to-right alignment.
2986 wordStart = i + 1;
2987 wordStartX = charX;
2988 charX = 0.0f;
2989 charY += leading;
2990 }else{ // Other alignment.
2991 drawTextUtf32( codepoints.substr( i + 1 ), font, posX, posY + leading * scale, scale, align, wordWrap );
2992 break;
2993 }
2985 drawTextUtf32( codepoints.substr( i + 1 ), font, posX, posY + leading * scale, scale, align, wordWrap );
2986 break;
2994 2987 }else if( wordWrap > 0.0f && charX * scale > wordWrap && wordStart > 0 ){ }else if( wordWrap > 0.0f && charX * scale > wordWrap && wordStart > 0 ){
2995 2988 // re-align // re-align
2996 2989 charX = wordStartX; charX = wordStartX;
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mse/ConfectionerEngine

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mse/ConfectionerEngine

Clone this repository using git:
git clone git://git.rocketgit.com/user/mse/ConfectionerEngine

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main