[Unreal] Button 기본 사용 버튼을 드래그해서 BP에 배치 후 적당한 이름으로 변경(여기서는 BTN_Ok로 설정) 필요 헤더#include "Components/Button.h" BP에 배치된 Button을 C++에서 참조// 유저 위젯 헤더// 확인 버튼UPROPERTY(meta = (BindWidget))class UButton* BTN_Ok = nullptr;BindWidget을 사용하면 BP에 배치된 위젯을 C++에서 참조 할수 있다. 이때 BP에 동일한 이름의 위젯이 없는경우 BP 컴파일 에러 발생 클릭시 처리.h// 헤더에 핸들러 함수 선언UFUNCTION()void OnClicked_Ok(); .cpp// 등록void UMyWidget::NativeConstruct(){ Super::NativeConstruct(); /.. 2025. 5. 2. [Unreal] DetailViewWidget 디테일뷰 정보처럼 UObject 에 설정된 변수 확인 및 수정 DetailsViewWidget.h// Fill out your copyright notice in the Description page of Project Settings.#pragma once#include "CoreMinimal.h"#include "Blueprint/UserWidget.h"#include "DetailsViewWidget.generated.h"/** * */UCLASS()class UDetailsViewWidget : public UUserWidget{ GENERATED_BODY() public: // UObject를 설정하여 DetailsView에 표시 UFUNCTION(BlueprintCallable, .. 2025. 1. 28. [Unreal] ScrollBox에 페이지 기능 설정 기능 - ScrollBox에 현재/최대 페이지 출력 - 버튼으로 페이지 이동 처리 .h // Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Blueprint/UserWidget.h" #include "TestScrollBoxPage.generated.h" /** * */ UCLASS() class TESTPROJECT_4_27_API UTestScrollBoxPage : public UUserWidget { GENERATED_BODY() protected: // 틱 처리 virtual void NativeTick(const FGeo.. 2023. 3. 26. 이전 1 다음