16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 07:49:19 +02:00

refactoring: selectable gfx renderer groundwork

This commit is contained in:
tmj-fstate
2019-10-12 18:38:01 +02:00
parent c312251580
commit 936e537a7a
24 changed files with 245 additions and 171 deletions

View File

@@ -323,7 +323,7 @@ drivermouse_input::button( int const Button, int const Action ) {
// left mouse button launches on_click event associated with to the node
if( Button == GLFW_MOUSE_BUTTON_LEFT ) {
if( Action == GLFW_PRESS ) {
auto const *node { GfxRenderer.Update_Pick_Node() };
auto const *node { GfxRenderer->Update_Pick_Node() };
if( ( node == nullptr )
|| ( typeid( *node ) != typeid( TAnimModel ) ) ) {
return;
@@ -369,7 +369,7 @@ drivermouse_input::button( int const Button, int const Action ) {
}
else {
// if not release then it's press
auto const lookup = m_buttonbindings.find( simulation::Train->GetLabel( GfxRenderer.Update_Pick_Control() ) );
auto const lookup = m_buttonbindings.find( simulation::Train->GetLabel( GfxRenderer->Update_Pick_Control() ) );
if( lookup != m_buttonbindings.end() ) {
// if the recognized element under the cursor has a command associated with the pressed button, notify the recipient
mousecommand = (