Merge commit 'fc2dec64389824a251fb258f6fd0a9074e521cc2'

This commit is contained in:
Gary Talent 2024-06-02 11:35:07 -05:00
commit 2afade2447
3 changed files with 1 additions and 13 deletions

View File

@ -28,12 +28,6 @@ class StudioUIDrawer: public turbine::gl::Drawer {
}
};
static int updateHandler(turbine::Context &ctx) noexcept {
auto sctx = turbine::applicationData<studio::StudioContext>(ctx);
sctx->ui.update();
return 10 * 1000;
}
static void keyEventHandler(turbine::Context &ctx, turbine::Key key, bool down) noexcept {
auto sctx = turbine::applicationData<studio::StudioContext>(ctx);
sctx->ui.handleKeyEvent(key, down);
@ -45,7 +39,6 @@ static ox::Error runApp(
ox::UPtr<ox::FileSystem> &&fs) noexcept {
oxRequireM(ctx, turbine::init(std::move(fs), appName));
turbine::setWindowTitle(*ctx, keelCtx(*ctx).appName);
turbine::setUpdateHandler(*ctx, updateHandler);
turbine::setKeyEventHandler(*ctx, keyEventHandler);
turbine::setRefreshWithin(*ctx, 0);
StudioUI ui(*ctx, projectDataDir);

View File

@ -78,10 +78,6 @@ StudioUI::StudioUI(turbine::Context &ctx, ox::StringView projectDataDir) noexcep
}
}
void StudioUI::update() noexcept {
m_taskRunner.update(m_ctx);
}
void StudioUI::handleKeyEvent(turbine::Key key, bool down) noexcept {
for (auto p : m_popups) {
if (p->isOpen()) {
@ -124,6 +120,7 @@ void StudioUI::draw() noexcept {
}
ImGui::End();
handleKeyInput();
m_taskRunner.update(m_ctx);
}
void StudioUI::drawMenu() noexcept {

View File

@ -50,8 +50,6 @@ class StudioUI: public ox::SignalHandler {
public:
explicit StudioUI(turbine::Context &ctx, ox::StringView projectDataDir) noexcept;
void update() noexcept;
void handleKeyEvent(turbine::Key, bool down) noexcept;
[[nodiscard]]