Infraestrutura cliente da promocao de classe (Jobs.1). WBP_JobChangePanel NAO esta neste commit — foi exploracao descartada (criar UI dinamica de botoes via MCP BP graph esbarrou em limites do CreateWidget node). A fundacao C++ fica pronta pra ser usada quando voltarmos pra UI. INFRA C++ NOVA (Source/ZMMOJobs/) * UZMMOJobChangeNetworkHandler (WorldSubsystem novo) — bind no OnJobChangeResult do plugin e re-broadcast via FZMMOOnJobChangeResultBP (dynamic multicast assignavel em BP). WBP futura escuta direto. * UZMMOJobsSubsystem helpers: GetJobsByTier(EZMMOJobTier) + GetEligibleNextJobs(currentClassId) — filtra por ParentClassId. Pure. * UZMMOJobsLibrary BPFL wrappers + SendJobChangeRequest convenience (delega pro UZeusNetworkSubsystem). Dep ZeusNetwork adicionada no Build.cs. ENUM + INPUT * EZMMOInGameUIState ganha JobChangePanel (entre StatusWindow e Inventory). DA_InGameScreenSet pendente de receber entry quando WBP for criada (tecla J vai falhar silenciosamente ate la). * ZMMOPlayerController: tecla J -> ToggleJobChangePanel -> Flow->ToggleScreen(JobChangePanel). Espelha pattern do Alt+A do StatusWindow (InputComponent legacy BindKey + FInputChord). UI TWEAKS * WBP_StatusWindow + DT_UI_Styles: ajustes visuais no Editor durante a sessao (sem mudanca funcional documentavel — provavelmente fontes/ spacing/cores). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
57 lines
1.7 KiB
C++
57 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/PlayerController.h"
|
|
#include "ZMMOPlayerController.generated.h"
|
|
|
|
class UInputMappingContext;
|
|
class UUserWidget;
|
|
|
|
/**
|
|
* AZMMOPlayerController
|
|
*
|
|
* Player controller do cliente Zeus MMO. Responsavel apenas pela camada de
|
|
* input do Unreal (Enhanced Input Mapping Contexts e widget opcional de
|
|
* controlos touch). Toda a logica de identidade Zeus, envio de input e
|
|
* reconciliacao vive em `AZMMOPlayerCharacter`.
|
|
*/
|
|
UCLASS(Blueprintable, BlueprintType)
|
|
class ZMMO_API AZMMOPlayerController : public APlayerController
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AZMMOPlayerController();
|
|
|
|
protected:
|
|
/** Mapping contexts default (sempre adicionados). */
|
|
UPROPERTY(EditAnywhere, Category = "Input|Input Mappings")
|
|
TArray<UInputMappingContext*> DefaultMappingContexts;
|
|
|
|
/** Mapping contexts saltados quando estamos em modo touch. */
|
|
UPROPERTY(EditAnywhere, Category = "Input|Input Mappings")
|
|
TArray<UInputMappingContext*> MobileExcludedMappingContexts;
|
|
|
|
/** Widget opcional de controlos touch (mobile / forced). */
|
|
UPROPERTY(EditAnywhere, Category = "Input|Touch Controls")
|
|
TSubclassOf<UUserWidget> MobileControlsWidgetClass;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UUserWidget> MobileControlsWidget;
|
|
|
|
/** Forca controlos touch mesmo fora de plataformas mobile (uso em desktop dev). */
|
|
UPROPERTY(EditAnywhere, Config, Category = "Input|Touch Controls")
|
|
bool bForceTouchControls = false;
|
|
|
|
virtual void BeginPlay() override;
|
|
virtual void SetupInputComponent() override;
|
|
|
|
bool ShouldUseTouchControls() const;
|
|
|
|
/** Hotkey Alt+A → toggle StatusWindow via UUIInGameFlowSubsystem. */
|
|
void ToggleStatusWindow();
|
|
|
|
/** Hotkey J → toggle JobChangePanel (Jobs.1 — promocao de classe). */
|
|
void ToggleJobChangePanel();
|
|
};
|