Commit 632afd4 1 parent 733572b commit 632afd4 Copy full SHA for 632afd4
File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -279,11 +279,10 @@ auto make_controls(view& view_)
279
279
sprite mail_button = sprite{" mail_180x790.png" , 158 *button_scale, button_scale};
280
280
sprite transpo_button = sprite{" transpo_180x632.png" , 158 *button_scale, button_scale};
281
281
282
+ // Note: When disabling a sprite button, the sprite must have a fifth
283
+ // frame specifically for the disabled state.
282
284
auto phase_disabled = toggle_button (phase_button);
283
- phase_disabled.enable (false ); // Note: When disabling a sprite button, the
284
- // sprite must have a fifth frame
285
- // specifically for the disabled
286
- // state.
285
+ phase_disabled.enable (false );
287
286
288
287
auto sprite_buttons =
289
288
group (" Sprite Buttons" ,
Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ namespace cycfi::elements
45
45
46
46
bool basic_button::cursor (context const & ctx, point /* p */ , cursor_tracking status)
47
47
{
48
+ if (!is_enabled ())
49
+ return false ;
48
50
bool is_leaving = status != cursor_tracking::leaving;
49
51
if (_state.hilite != is_leaving)
50
52
hilite (is_leaving);
You can’t perform that action at this time.
0 commit comments