Slate基础使用说明

目录

Slate基础使用说明

1. 简单教程

2. 要点说明     

2.1  TCommands以及TCommands基类

2.2  FUICommandInfo

2.3  FUICommandList

2.4  FUIAction

2.5  UICommand

3. 代码源码

4. 工具使用 

4.1 Display Ul Extension Points

4. 参考文章


Slate基础使用说明

1. 简单教程

2. 要点说明     

2.1  TCommands以及TCommands基类
/** A base class for a set of commands. Inherit from it to make a set of commands. See MainFrameActions for an example. */
template<typename CommandContextType>
class TCommands : public FBindingContext
/**
 * Represents a context in which input bindings are valid
 */
class SLATE_API FBindingContext
	: public TSharedFromThis<FBindingContext>
2.2  FUICommandInfo
private:

	/** Input commands that executes this action */
	TArray<TSharedRef<FInputChord>> ActiveChords;

	/** Default display name of the command */
	FText Label;

	/** Localized help text for this command */
	FText Description;

	/** The default input chords for this command (can be invalid) */
	TArray<FInputChord> DefaultChords;

	/** Brush name for icon to use in tool bars and menu items to represent this command */
	FSlateIcon Icon;

	/** Brush name for icon to use in tool bars and menu items to represent this command in its toggled on (checked) state*/
	FName UIStyle;

	/** Name of the command */
	FName CommandName;

	/** The context in which this command is active */
	FName BindingContext;

	/** The bundle to group this command into. The bundle must have been added to the BindingContext first. */
	FName Bundle;

	/** The type of user interface to associated with this action */
	EUserInterfaceActionType UserInterfaceType;

	/** True if should we use long names for when getting text for input chords */
	bool bUseLongDisplayName;
2.3  FUICommandList
class SLATE_API FUICommandList
	: public TSharedFromThis<FUICommandList>
2.4  FUIAction
/**
 * Implements an UI action.
 */
struct SLATE_API FUIAction
{
	/** Holds a delegate that is executed when this action is activated. */
	FExecuteAction ExecuteAction;

	/** Holds a delegate that is executed when determining whether this action can execute. */
	FCanExecuteAction CanExecuteAction;

	/** Holds a delegate that is executed when determining the check state of this action. */
	FGetActionCheckState GetActionCheckState;

	/** Holds a delegate that is executed when determining whether this action is visible. */
	FIsActionButtonVisible IsActionVisibleDelegate;

	/** Can this action can be repeated if the chord used to call it is held down? */
	EUIActionRepeatMode RepeatMode;
2.5  UICommand
#define UI_COMMAND( CommandId, FriendlyName, InDescription, CommandType, InDefaultChord, ... ) \

3. 代码源码

4. 工具使用 

4.1 Display Ul Extension Points

4. 参考文章

https://docs.unrealengine.com/5.2/zh-CN/slate-editor-window-quickstart-guide-for-unreal-engine/

观察UE4的界面命令(UICommand)扩展编辑器界面的流程并实践_ue4 查看编辑器界面一些功能的函数流程_YakSue的博客-CSDN博客

(UE4 4.21 ) UE4给编辑器添加菜单栏(Menu),工具栏(TooBar),Tab窗口_ue4左侧工具栏怎么打开_带帯大师兄的博客-CSDN博客

TCommands用法 - 知乎

《调教UE5:编辑器拓展指南》Command 探索 - 知乎

UE4-注册UI菜单的套路以及尝试将工具类蓝图动态注册进UI - 知乎

  • 7
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Jennifer33K

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值