> home > Custom Layer Boundary API

view_set_preferred_x

January 19th 2020
Set the preferred x on a view

Signature

C++
b32
view_set_preferred_x(Application_Links* app,
                     View_ID view_id,
                     f32 x);

Parameters

app

the standard custom layer context pointer

view_id

the id of the view to modify

x

the new preferred x coordinate

Return

non-zero if the view exists, zero otherwise

Details

the preferred x is used to keep a cursor aligned as closely as possible to a particular x-coordinate durring vertical movements