fix move to the end
This commit is contained in:
parent
73649a48e6
commit
57d96cab71
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
bin/main.cpp
Normal file → Executable file
0
bin/main.cpp
Normal file → Executable file
0
bin/meson.build
Normal file → Executable file
0
bin/meson.build
Normal file → Executable file
0
icon.png
Normal file → Executable file
0
icon.png
Normal file → Executable file
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
0
img_logo.png
Normal file → Executable file
0
img_logo.png
Normal file → Executable file
Before Width: | Height: | Size: 406 KiB After Width: | Height: | Size: 406 KiB |
0
meson.build
Normal file → Executable file
0
meson.build
Normal file → Executable file
0
rrr.gif
Normal file → Executable file
0
rrr.gif
Normal file → Executable file
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
0
src/meson.build
Normal file → Executable file
0
src/meson.build
Normal file → Executable file
0
src/rrr/buffer/buffer.hpp
Normal file → Executable file
0
src/rrr/buffer/buffer.hpp
Normal file → Executable file
0
src/rrr/content/content.cpp
Normal file → Executable file
0
src/rrr/content/content.cpp
Normal file → Executable file
0
src/rrr/content/content.hpp
Normal file → Executable file
0
src/rrr/content/content.hpp
Normal file → Executable file
0
src/rrr/content/file/file.cpp
Normal file → Executable file
0
src/rrr/content/file/file.cpp
Normal file → Executable file
0
src/rrr/content/file/file.hpp
Normal file → Executable file
0
src/rrr/content/file/file.hpp
Normal file → Executable file
0
src/rrr/content/history/history.cpp
Normal file → Executable file
0
src/rrr/content/history/history.cpp
Normal file → Executable file
0
src/rrr/content/history/history.hpp
Normal file → Executable file
0
src/rrr/content/history/history.hpp
Normal file → Executable file
0
src/rrr/content/navigation/navigation.cpp
Normal file → Executable file
0
src/rrr/content/navigation/navigation.cpp
Normal file → Executable file
0
src/rrr/content/navigation/navigation.hpp
Normal file → Executable file
0
src/rrr/content/navigation/navigation.hpp
Normal file → Executable file
0
src/rrr/content/preview/preview.cpp
Normal file → Executable file
0
src/rrr/content/preview/preview.cpp
Normal file → Executable file
0
src/rrr/content/preview/preview.hpp
Normal file → Executable file
0
src/rrr/content/preview/preview.hpp
Normal file → Executable file
2
src/rrr/layers/gui/browser/history/history.cpp
Normal file → Executable file
2
src/rrr/layers/gui/browser/history/history.cpp
Normal file → Executable file
@ -52,7 +52,7 @@ namespace rrr::layers::gui
|
||||
TR_PUSH_FONT(SEMI_BOLD, 18);
|
||||
ImGui::TextUnformatted(">");
|
||||
ImGui::SameLine(22.f);
|
||||
current_position = std::distance(it, data->begin());
|
||||
current_position = std::distance(data->begin(), it);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
0
src/rrr/layers/gui/browser/history/history.hpp
Normal file → Executable file
0
src/rrr/layers/gui/browser/history/history.hpp
Normal file → Executable file
9
src/rrr/layers/gui/browser/navigation/navigation.cpp
Normal file → Executable file
9
src/rrr/layers/gui/browser/navigation/navigation.cpp
Normal file → Executable file
@ -60,7 +60,7 @@ namespace rrr::layers::gui
|
||||
ImGui::TextUnformatted(">");
|
||||
ImGui::SameLine(22.f);
|
||||
|
||||
current_position = std::distance(it, data->begin());
|
||||
current_position = std::distance(data->begin(), it);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -201,6 +201,9 @@ namespace rrr::layers::gui
|
||||
// удаление
|
||||
if (key.get_keycode() == try_engine::key::D)
|
||||
{
|
||||
// HERE начинаем тут
|
||||
// удаление сохраненного файла trycastaer жделает краш приложения
|
||||
// пс. не понял что тут не так. пиши более развернуто чтоли...
|
||||
em->execute(types::event_type::SHOW_DELETE_ONE_FILE_DIALOG, selected_file);
|
||||
freeze = true;
|
||||
}
|
||||
@ -285,6 +288,7 @@ namespace rrr::layers::gui
|
||||
|
||||
if (key.get_keycode() == try_engine::key::L)
|
||||
{
|
||||
if (!std::filesystem::is_directory(selected_file.path)) return;
|
||||
cnt->navigation_right();
|
||||
data = cnt->get(TYPE_WIN::NAVIGATION);
|
||||
selected_file = cnt->get_selected_file(TYPE_WIN::NAVIGATION);
|
||||
@ -384,13 +388,14 @@ namespace rrr::layers::gui
|
||||
if (current_position >= size) current_position = size - 1;
|
||||
|
||||
bool is_end = size - current_position <= 10;
|
||||
if (cursor_position >= h - 10 && !is_end)
|
||||
if (cursor_position >= h - 10 && !is_end)
|
||||
{
|
||||
++delta;
|
||||
cursor_position = h - 10;
|
||||
}
|
||||
|
||||
if (cursor_position >= h) cursor_position = h;
|
||||
hack::log()(cursor_position, current_position, h);
|
||||
}
|
||||
|
||||
if (mvd == MOVE_DIRECTION::UP)
|
||||
|
0
src/rrr/layers/gui/browser/navigation/navigation.hpp
Normal file → Executable file
0
src/rrr/layers/gui/browser/navigation/navigation.hpp
Normal file → Executable file
2
src/rrr/layers/gui/browser/preview/preview.cpp
Normal file → Executable file
2
src/rrr/layers/gui/browser/preview/preview.cpp
Normal file → Executable file
@ -75,7 +75,7 @@ namespace rrr::layers::gui
|
||||
TR_PUSH_FONT(SEMI_BOLD, 18);
|
||||
ImGui::TextUnformatted(">");
|
||||
ImGui::SameLine(22.f);
|
||||
current_position = std::distance(it, data->begin());
|
||||
current_position = std::distance(data->begin(), it);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
0
src/rrr/layers/gui/browser/preview/preview.hpp
Normal file → Executable file
0
src/rrr/layers/gui/browser/preview/preview.hpp
Normal file → Executable file
0
src/rrr/layers/gui/dialogs/dialogs.cpp
Normal file → Executable file
0
src/rrr/layers/gui/dialogs/dialogs.cpp
Normal file → Executable file
0
src/rrr/layers/gui/dialogs/dialogs.hpp
Normal file → Executable file
0
src/rrr/layers/gui/dialogs/dialogs.hpp
Normal file → Executable file
0
src/rrr/meson.build
Normal file → Executable file
0
src/rrr/meson.build
Normal file → Executable file
0
src/rrr/rrr.hpp
Normal file → Executable file
0
src/rrr/rrr.hpp
Normal file → Executable file
0
src/rrr/utils/func.hpp
Normal file → Executable file
0
src/rrr/utils/func.hpp
Normal file → Executable file
0
src/rrr/utils/types.hpp
Normal file → Executable file
0
src/rrr/utils/types.hpp
Normal file → Executable file
0
subprojects/glad.wrap
Normal file → Executable file
0
subprojects/glad.wrap
Normal file → Executable file
0
subprojects/glfw.wrap
Normal file → Executable file
0
subprojects/glfw.wrap
Normal file → Executable file
0
subprojects/glm.wrap
Normal file → Executable file
0
subprojects/glm.wrap
Normal file → Executable file
0
subprojects/gtest.wrap
Normal file → Executable file
0
subprojects/gtest.wrap
Normal file → Executable file
0
subprojects/hack.wrap
Normal file → Executable file
0
subprojects/hack.wrap
Normal file → Executable file
0
subprojects/imgui.wrap
Normal file → Executable file
0
subprojects/imgui.wrap
Normal file → Executable file
0
subprojects/nlohmann_json.wrap
Normal file → Executable file
0
subprojects/nlohmann_json.wrap
Normal file → Executable file
0
subprojects/taglib.wrap
Normal file → Executable file
0
subprojects/taglib.wrap
Normal file → Executable file
0
subprojects/try_engine.wrap
Normal file → Executable file
0
subprojects/try_engine.wrap
Normal file → Executable file
0
tests/meson.build
Normal file → Executable file
0
tests/meson.build
Normal file → Executable file
Loading…
Reference in New Issue
Block a user