Simple center and right label justification in v8

Sorry for the noob question but I’ve been playing with this for a couple of hours.

I’m trying to port some code written for GTK that simply places text (labels) on the screen at specified locations. The location is the anchor for text that is either left, right or center justified. For example, on a screen that is 800x480 if the text is center justified at location 400, 240 then the text should be centered on the screen…simple right?

I can’t figure out how to do this with LVGL (v8.1). I can place a label at 400,240 and it is left justified as expected but I can’t figure out how to make it center justified (or right justified). Here is what I’m doing now

	lv_obj_t	*pLabel = lv_label_create(lv_scr_act());

	if (align == LV_TEXT_ALIGN_RIGHT)
		lv_label_set_long_mode(pLabel, LV_LABEL_LONG_CLIP);
		lv_obj_set_style_text_align(pLabel, LV_TEXT_ALIGN_RIGHT, 0);
	else if (align = LV_TEXT_ALIGN_CENTER)
		lv_obj_set_style_text_align(pLabel, LV_TEXT_ALIGN_CENTER, 0);

	lv_obj_set_pos(pLabel, xPos, yPos);
	lv_label_set_text(pLabel, text);

There seems to have been specific label text alignment calls in previous functions but they don’t seem to exist in v8. What is the proper way to do this in v8?