dl
dl
misc
dl_layout.h
浏览该文件的文档.
1
12
#pragma once
13
14
#include "
base/dl_string.h
"
15
16
namespace
dl
17
{
18
enum class
Layout
19
{
20
X
,
21
Y
,
22
XY
,
23
ORIGIN
,
24
};
25
26
inline
Layout
String2Layout
(std::string_view str)
27
{
28
if
(String::EqualToLower(str,
"x"
))
29
return
Layout::X
;
30
if
(String::EqualToLower(str,
"y"
))
31
return
Layout::Y
;
32
if
(String::EqualToLower(str,
"xy"
))
33
return
Layout::XY
;
34
if
(String::EqualToLower(str,
"origin"
))
35
return
Layout::ORIGIN
;
36
log_err
(
"未知布局格式:{}"
, str);
37
return
Layout::X
;
38
}
39
40
}
log_err
#define log_err(...)
定义
dl_log.h:284
dl_string.h
字符串相关
dl
定义
dl_array.h:22
dl::PadCode::X
@ X
定义
dl_input.h:40
dl::PadCode::Y
@ Y
定义
dl_input.h:41
dl::String2Layout
Layout String2Layout(std::string_view str)
定义
dl_layout.h:26
dl::Layout
Layout
定义
dl_layout.h:19
dl::Layout::X
@ X
x轴移动
定义
dl_layout.h:20
dl::Layout::Y
@ Y
y轴移动
定义
dl_layout.h:21
dl::Layout::ORIGIN
@ ORIGIN
不变位置(主要为了简化计算)
定义
dl_layout.h:23
dl::Layout::XY
@ XY
xy同时移动
定义
dl_layout.h:22
制作者
1.13.1