File tree Expand file tree Collapse file tree 3 files changed +20
-11
lines changed
Expand file tree Collapse file tree 3 files changed +20
-11
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,18 @@ namespace Game
143143 return event (8 )->data <EVWORK_CAR>();
144144 }
145145
146+ inline bool is_in_game ()
147+ {
148+ return
149+ *Game::current_mode == GameState::STATE_GAME ||
150+ *Game::current_mode == GameState::STATE_GOAL ||
151+ *Game::current_mode == GameState::STATE_TIMEUP ||
152+ *Game::current_mode == GameState::STATE_TRYAGAIN ||
153+ *Game::current_mode == GameState::STATE_OUTRUNMILES ||
154+ *Game::current_mode == GameState::STATE_SMPAUSEMENU ||
155+ (*Game::current_mode == GameState::STATE_START && *Game::game_start_progress_code == 65 );
156+ }
157+
146158 inline void init ()
147159 {
148160 current_mode = Module::exe_ptr<GameState>(0x38026C );
Original file line number Diff line number Diff line change @@ -693,16 +693,7 @@ class UILetterboxing : public Hook
693693 VertexBuf->Unlock ();
694694 }
695695
696- bool isInGame =
697- *Game::current_mode == GameState::STATE_GAME ||
698- *Game::current_mode == GameState::STATE_GOAL ||
699- *Game::current_mode == GameState::STATE_TIMEUP ||
700- *Game::current_mode == GameState::STATE_TRYAGAIN ||
701- *Game::current_mode == GameState::STATE_OUTRUNMILES ||
702- *Game::current_mode == GameState::STATE_SMPAUSEMENU ||
703- (*Game::current_mode == GameState::STATE_START && *Game::game_start_progress_code == 65 );
704-
705- if (Settings::UILetterboxing == 1 && isInGame)
696+ if (Settings::UILetterboxing == 1 && Game::is_in_game ())
706697 return ; // disable letterboxing while in-game
707698
708699 // Backup existing cullmode and set to none, otherwise we won't get drawn
Original file line number Diff line number Diff line change @@ -43,7 +43,13 @@ class Notifications
4343 ImVec2 screenSize = ImGui::GetIO ().DisplaySize ;
4444
4545 // Calculate starting position for the latest notification
46- float startX = screenSize.x - notificationSize.x - 10 .0f ; // 10px padding from the right
46+ // (move it outside of letterbox if letterboxing enabled)
47+ float contentWidth = screenSize.y / (3 .f / 4 .f );
48+ float borderWidth = ((screenSize.x - contentWidth) / 2 ) + 0 .5f ;
49+ if (Settings::UILetterboxing != 1 || Game::is_in_game ())
50+ borderWidth = 0 ;
51+
52+ float startX = screenSize.x - notificationSize.x - borderWidth - 10 .f ; // 10px padding from the right
4753 float startY = (screenSize.y / 4 .0f ) - (notifications.size () * (notificationSize.y + notificationSpacing) / 2 .0f );
4854
4955 std::lock_guard<std::mutex> lock (notificationsMutex);
You can’t perform that action at this time.
0 commit comments