Skip to content

Commit

Permalink
change touch editor colors
Browse files Browse the repository at this point in the history
  • Loading branch information
nillerusr committed Aug 22, 2023
1 parent b5d6051 commit 1d4f7fb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions game/client/touch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ void CTouchControls::ResetToDefaults()
{
rgba_t color(255, 255, 255, 155);
char buf[MAX_PATH];
gridcolor = rgba_t(255, 0, 0, 50);
gridcolor = rgba_t(255, 0, 0, 30);

RemoveButtons();

Expand Down Expand Up @@ -372,7 +372,7 @@ void CTouchControls::Init()
mouse_events = 0;
move_start_x = move_start_y = 0.0f;
m_flPreviousYaw = m_flPreviousPitch = 0.f;
gridcolor = rgba_t(255, 0, 0, 50);
gridcolor = rgba_t(255, 0, 0, 30);

m_bCutScene = false;
showtexture = hidetexture = resettexture = closetexture = joytexture = 0;
Expand Down Expand Up @@ -659,6 +659,8 @@ void CTouchControls::Paint()

CUtlLinkedList<CTouchButton*>::iterator it;

const rgba_t buttonEditClr = rgba_t( 61, 153, 0, 40 );

if( state == state_edit )
{
vgui::surface()->DrawSetColor(gridcolor.r, gridcolor.g, gridcolor.b, gridcolor.a*3); // 255, 0, 0, 200 <- default here
Expand All @@ -685,7 +687,7 @@ void CTouchControls::Paint()
g_pMatSystemSurface->DrawColoredText( 2, btn->x1*screen_w, btn->y1*screen_h+40, 255, 255, 255, 255, "RGBA: %d %d %d %d", btn->color.r, btn->color.g, btn->color.b, btn->color.a );// color
}

vgui::surface()->DrawSetColor(gridcolor.r, gridcolor.g, gridcolor.b, gridcolor.a); // 255, 0, 0, 50 <- default here
vgui::surface()->DrawSetColor(buttonEditClr.r, buttonEditClr.g, buttonEditClr.b, buttonEditClr.a); // 255, 0, 0, 50 <- default here
vgui::surface()->DrawFilledRect( btn->x1*screen_w, btn->y1*screen_h, btn->x2*screen_w, btn->y2*screen_h );
}
}
Expand Down

0 comments on commit 1d4f7fb

Please sign in to comment.