Commit graph

291 commits

Author SHA1 Message Date
MrTheShy 05a27edc25 Fix TextInput caret behavior and add proper cursor editing for KBM direct edit
The direct text editing mode introduced for KBM users had several
issues with the TextInput control's caret (blinking cursor) and text
manipulation:

1. Caret visible when not editing:
   When navigating to the world name field with keyboard/mouse, Flash's
   Iggy focus system would show the blinking caret even though the field
   wasn't active for editing yet (Enter not pressed). This was misleading
   since typing had no effect in that state.

   Fix: access the FJ_TextInput's internal m_mcCaret MovieClip and
   force its visibility based on editing state. This is enforced every
   tick because setLabel() and Flash focus transitions continuously
   reset the caret state.

2. No cursor movement during editing:
   The direct edit implementation treated the text as a simple buffer
   with push_back/pop_back — there was no concept of cursor position.
   Backspace only deleted from the end, and arrow keys did nothing.

   Fix: track cursor position (m_iCursorPos) in C++ and use wstring
   insert/erase at that position. Arrow keys (Left/Right), Home, End,
   and Delete now work as expected. The visual caret position is synced
   to Flash via the FJ_TextInput's SetCaretIndex method.

3. setLabel() resetting caret position:
   Every call to setLabel() (when text changes) caused Flash to reset
   the caret to the end of the string, making the cursor jump visually
   even though the C++ position was correct.

   Fix: enforce caret position via setCaretIndex every tick during
   editing, so any Flash-side resets are immediately corrected.

New UIControl_TextInput API:
- setCaretVisible(bool): toggles m_mcCaret.visible in Flash
- setCaretIndex(int): calls FJ_TextInput.SetCaretIndex in Flash
2026-03-05 22:04:34 +01:00
MrTheShy 7ff958e124 Use last active input device to decide keyboard mode instead of connection state
The keyboard UI mode (on-screen virtual keyboard vs direct text input)
was determined by Win64_IsControllerConnected(), which checks if any
XInput controller is physically plugged in. This meant that even if
the player was actively using mouse and keyboard, the virtual keyboard
would still appear as long as a controller was connected.

Replace the connection check with g_KBMInput.IsKBMActive(), which
tracks the actual last-used input device based on per-frame input
detection. Now the keyboard mode is determined by what the player is
currently using, not what hardware happens to be plugged in.

Affected scenes: CreateWorldMenu (world naming) and LoadOrJoinMenu
(world renaming).
2026-03-05 22:04:34 +01:00
MrTheShy 9ec08e0af8 Sync keyboard text buffer from Flash before processing physical input
The native keyboard scene maintained a separate C++ buffer
(m_win64TextBuffer) for physical keyboard input, which was pushed
to the Flash text field via setLabel(). However, when the user typed
with the on-screen controller buttons, Flash updated its text field
directly through ActionScript without updating the C++ buffer.

This caused a desync: switching back to the physical keyboard would
overwrite any text entered via controller, since m_win64TextBuffer
still held the old value before the controller edits.

Fix: read the current Flash text field into m_win64TextBuffer at the
start of each tick(), before consuming new physical keyboard chars.
This ensures both input methods always operate on the same state.
2026-03-05 22:04:34 +01:00
dtentiion aadb511504
Fix save list, delete save, exit without saving, and blank username on Windows64 (#539)
* Fix world save rename not applying new name

KeyboardCompleteWorldNameCallback had no _WINDOWS64 branch, so the
typed name was validated then silently discarded on every rename attempt.

Write the new name to a worldname.txt sidecar file next to the save
(Windows64\GameHDD\{folder}\worldname.txt) and update the in-memory
display name immediately. ReadLevelNameFromSaveFile now checks for this
sidecar first so renamed saves persist correctly across restarts.

* Fixed gamertag being blank upon renaming and re-joining a save

* Save deletion fix, exiting without saving fix

* Add native in-game keyboard UI for world naming and renaming
2026-03-05 14:57:37 -06:00
Loki Rautio f48a39ae3d Adjust github action for debug 2026-03-05 14:33:33 -06:00
Cristiandis d3593f1df3
Trim newline characters from IP address (#600) 2026-03-05 14:27:08 -06:00
ModMaker101 7147dbad92
Fix debug build not working (#603) 2026-03-05 14:17:12 -06:00
Loki Rautio 9e52beaa9d Support debug compile test in PRs 2026-03-05 14:12:31 -06:00
Loki Rautio f208a5c80e Add debug action 2026-03-05 14:11:04 -06:00
void_17 5c6f09f395
Forgot these AUTO_VAR macros too
Remove the remaining `AUTO_VAR` macros I forgot to remove
2026-03-06 02:46:20 +07:00
ModMaker101 cbcf3de358
Fix gamma slider via pixel shader #178 (#481)
* Fix gamma slider via pixel shader #178

* LCE-like gamma using postprocess shader
2026-03-06 02:41:17 +07:00
void_17 55231bb8d3
Remove AUTO_VAR macro and _toString function (#592) 2026-03-06 02:11:18 +07:00
Siepert 7d6658fe5b
Add servers.txt so players can add an arbitrary amount of servers to the "Join Game" list (#478)
* Code to read servers.txt

* logging (still doesnt work)

* server names load properly hooray

* remove logger as it only spews out nonsense anyways

* Do not use _countof, use sizeof(label)/sizeof(wchar_t) or make label std::array<wchar_t, 128> and call .size()

* Fix memory leak by listing info pointers

* C++ style cast (i think)

* this throws a RAV but why

* why oh why

* I just assume infos get deleted elsewhere otherwise idk why it breaks no matter what i do

* they get deleted all this time ohhhhhh

---------

Co-authored-by: Siepert123 <createlegacy69@gmail.com>
2026-03-05 22:57:54 +07:00
Loki Rautio a03c36f83f Update nightly description
Fix broken new lines. Oops, forgot this was yaml
2026-03-05 09:06:14 -06:00
Loki Rautio 1b69eef4b0 Update nightly description 2026-03-05 07:48:32 -06:00
Marlian 9c17f3473a
Fix Ctrl-sprint not working while flying in creative mode (#563)
Remove the !player->abilities.flying guard that was incorrectly added around the Ctrl-sprint block in Input.cpp during the KBM refactor. This prevented Ctrl+W from initiating sprint while flying in creative mode. Sprinting on the ground in both survival and creative worked fine.

The sprint flag now sets correctly whenever Ctrl+W is held, including while flying. LocalPlayer::aiStep() still properly gates setSprinting() with onGround, enoughFoodToSprint, isUsingItem etc.

Fixes smartcmd/MinecraftConsoles#470
2026-03-05 07:39:11 -06:00
Loki Rautio a37ebe221c Add Contributor's Guide, update README 2026-03-05 07:23:01 -06:00
Loki Rautio 23cb7de110 Add additional warnings and a field to PR template 2026-03-05 07:11:47 -06:00
Marlian c236e46ef6
Fix music disc sound leaking across dimensions (#552)
Stop streaming music (jukebox) when the player changes dimensions so music disc sounds from the overworld cannot be heard in the nether or vice versa.

Previously, the streaming audio continued playing at its original world coordinates even after a dimension change, causing the sound to leak into the new dimension at the same position.

Fixes #411
2026-03-05 17:22:55 +07:00
GabsPuNs123 c2da9e90f8
Fix DLCs textures and update logo in 720p (#517)
* Fix DLCs textures and crash in 720p

* Revert "Fix DLCs textures and crash in 720p"

This reverts commit 7c38605360.

* Update Durango and Windows64 DLCs Textures also fix crash in 720p
2026-03-05 15:12:50 +07:00
void_17 8cb42a4806
Revert "Fix crash when launching at 720p" (#545) 2026-03-05 15:12:01 +07:00
Korean 8d5452679f
Updated to work with KBM refactor (#507) 2026-03-05 14:48:06 +07:00
Marvelco c77bb4dae4
fixed delay issue when breaking a block (#537) 2026-03-05 14:46:38 +07:00
qwasdrizzel 892a6056ea
Modify dispense behavior to set outcome as LEFT_ITEM (#542) 2026-03-05 14:31:37 +07:00
disintegrate 33c798a885
Failsafe for signs if entered over max line length (#389)
* Failsafe for signs if entered over max line length

* Removed debug message.

* Revert "Removed debug message."

This reverts commit 553c436697.

* Update SignTileEntity.cpp

* Changed flag to _DEBUG
2026-03-05 14:30:56 +07:00
Portal fcc9970ec6
Replace CopyAssets.cmake with multithreaded Robocopy (and rsync) implementation. (#410)
* Replace CopyAssets.cmake with Robocopy implementation.

* Replace CopyAssets.cmake with Robocopy implementation.
2026-03-05 14:30:22 +07:00
Alezito2008 053eb0119c
Fix F3 opening host menu (#522)
* Fix debug menu opening game info menu

* remove redundant F4 handling
2026-03-05 14:26:19 +07:00
ModMaker101 91e50aa346
Fix animals stuck in panic state #514 (#519) 2026-03-05 14:23:56 +07:00
Siobhan 🏳️‍⚧️ 981c87732c
Restore the original follow range for Zombies and Withers (#510)
* Restore original follow range for Zombie

* Restore original WitherBoss follow range
2026-03-05 14:22:31 +07:00
Alezito2008 87e3bd193c
Fix beacon crash (#512) 2026-03-05 14:17:17 +07:00
Skeagle 8cdbf08900
fix creeper model y offset (#504) 2026-03-05 14:16:18 +07:00
Loki f1d477c1ec
Merge pull request #523 from kuwacom/main
Fix crash when launching at 720p
2026-03-04 20:18:05 -06:00
kuwacom 26582a7439 fix: Fixed crash when launching at 720p #517
Modify `MediaWindows64.arc` to include `skinHud.swf`
2026-03-05 11:13:31 +09:00
Loki 9383b2aa01
Merge pull request #491 from siobhan-saoirse/main
Decrease the mob ticks from 3 to 1 to reduce jittering
2026-03-04 16:25:57 -06:00
Siobhan 🏳️‍⚧️ 4f85afe325
Adjust entity tracking ticks for several types
This fixes the jittery problem.
2026-03-04 17:19:05 -05:00
Loki Rautio cb9ab4ef51 Ship revised logo from @wiskerdmage
This one looks a bit nicer so let's use this for now...
2026-03-04 15:23:12 -06:00
Loki Rautio 391dd3caae Ship updated, maybe temporary subtitle
People keep going "Oh no I don't like the red WINDOWS text, oh no! I hate it!
The red windows text is the devil, it will be my undoing! Please remove the red
windows text or I shall simply perish!" And for that? Well, I have removed it. Now
you can enjoy this logo made by @wiskerdmage in the style of the existing Edition
logos. (https://github.com/smartcmd/MinecraftConsoles/pull/385#issuecomment-3996671081)
2026-03-04 14:56:53 -06:00
Marlian 3f1388e06f
Persist fullscreen setting and start windowed mode maximized (#446)
Save fullscreen toggle state to options.txt when F11 is pressed, and restore it on the next launch. When starting in windowed mode, the window now opens maximized instead of at a smaller default size.

Previously, g_isFullscreen was hardcoded to false and never persisted, so the game always started in windowed mode. The window also started at a non-maximized size requiring manual maximization.

Fixes #391
2026-03-05 03:50:06 +07:00
LetsGoAway c517f31b3d
Update ItemInHandRenderer.cpp (#418) 2026-03-05 03:26:56 +07:00
Loki Rautio 51eb86ad28 Revert "fix: fix #464"
This reverts commit 5922824950.
2026-03-04 13:43:40 -06:00
Fayaz Shaikh 9372887aef
Fix for any aspect ratio in 3D Environments (#320)
* Add initial AnyAspectRatio support

* Remove some logic that didn't work

* Remove rogue back slash

* Remove more remnants

* Update UILayer.h

* Update some comments

* Remove WIP UI changes

* Fix diffs

* Remove UI resize call from `UpdateAspectRatio`

* handle merge conflict

* Update to C++ style static cast

* Fix syntax
2026-03-05 02:13:58 +07:00
daoge_cmd 5922824950 fix: fix #464 2026-03-05 02:57:52 +08:00
daoge_cmd 4108ed142b fix: restore KBM sprint on either Ctrl key 2026-03-05 01:49:38 +08:00
daoge_cmd 7b35df8714 Fix controller paging regression in creative menu
Preserve smooth row-by-row scrolling for mouse wheel input, but restore
full-page movement for controller/menu scroll actions in the creative
inventory.

Commit 3093ca3 changed page indexing to support smooth scrolling, which
caused ACTION_MENU_OTHER_STICK_UP/DOWN to advance by one row instead of
one page. Track whether the scroll action originated from the mouse
wheel and only use single-row steps in that case.

Fixes #253
2026-03-05 01:38:34 +08:00
daoge_cmd ef66f6736d fix: ignore dedicated server properties in normal world startup 2026-03-05 01:26:21 +08:00
ModMaker101 870d3e4b68
Fix mob nametag position to match correct height offset #422 (#440) 2026-03-05 00:24:42 +07:00
daoge_cmd 1dc8a005ed refactor: refactor KBM input code 2026-03-05 01:12:48 +08:00
Alezito2008 ac03b88a90
Fix:Prevent horse spawner crash (#433) 2026-03-04 23:42:32 +07:00
ModMaker101 206c6800f2
Fix incorrect distance comparison return value (#432) 2026-03-04 23:41:59 +07:00
ModMaker101 464cf91f4c
Prevent door sounds from playing twice #392 (#425) 2026-03-04 23:28:37 +07:00