注释整理
This commit is contained in:
@@ -386,7 +386,7 @@ void meditable_text_box::delete_char_before_cursor() {
|
||||
void meditable_text_box::delete_char_at_cursor() {
|
||||
if (text_.empty()) return;
|
||||
|
||||
size_t delete_pos = get_text_index_from_cursor();
|
||||
const auto delete_pos = get_text_index_from_cursor();
|
||||
|
||||
if (delete_pos < text_.size()) {
|
||||
text_.erase(delete_pos, 1);
|
||||
|
||||
@@ -48,9 +48,10 @@ private:
|
||||
float cursor_alpha_ = 0.f;
|
||||
Eigen::Vector2f no_warp_size_{};
|
||||
|
||||
// 光标位置 值是字符索引, x坐标表示在哪个字符的左边, y坐标表示行索引
|
||||
size_t cursor_x_ = 0;
|
||||
size_t cursor_y_ = 0; // 光标位置, 用于IME输入时的光标位置
|
||||
// 光标位置 值是字符索引
|
||||
size_t cursor_x_ = 0; // 在哪个字符的左边
|
||||
size_t cursor_y_ = 0; // 行索引
|
||||
|
||||
text_layout_t layout_{};
|
||||
std::u32string text_; // 最终显示的文本
|
||||
std::u32string temp_text_; // 当前输入的文本
|
||||
|
||||
Reference in New Issue
Block a user