Aligned textbox to bottom of screen.
This commit is contained in:
		@@ -35,6 +35,9 @@ typedef struct {
 | 
				
			|||||||
  /** X, Y Position of the textbox */
 | 
					  /** X, Y Position of the textbox */
 | 
				
			||||||
  float x, y;
 | 
					  float x, y;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /** Readonly values for the dimensions of the textbox */
 | 
				
			||||||
 | 
					  float width, height;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /** Animation of the textbox */
 | 
					  /** Animation of the textbox */
 | 
				
			||||||
  float textScroll;
 | 
					  float textScroll;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,6 +29,8 @@ queueaction_t * vnConversationAdd(vnconversation_t *conversation) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void vnConversationUpdate(vnconversation_t *convo, engine_t *engine) {
 | 
					void vnConversationUpdate(vnconversation_t *convo, engine_t *engine) {
 | 
				
			||||||
  queueUpdate(&convo->actionQueue, engine);
 | 
					  queueUpdate(&convo->actionQueue, engine);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  convo->textbox.y = engine->render.height - convo->textbox.height;
 | 
				
			||||||
  vnTextBoxUpdate(&convo->textbox, engine);
 | 
					  vnTextBoxUpdate(&convo->textbox, engine);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,6 +39,7 @@ void vnTextBoxRebuffer(vntextbox_t *box) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  // Determine size of the textbox inside the frame.
 | 
					  // Determine size of the textbox inside the frame.
 | 
				
			||||||
  float textMaxWidth = box->widthMax - FRAME_BORDER_SIZE_FULL;
 | 
					  float textMaxWidth = box->widthMax - FRAME_BORDER_SIZE_FULL;
 | 
				
			||||||
 | 
					  box->width = box->widthMax;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Rebuffer the text.
 | 
					  // Rebuffer the text.
 | 
				
			||||||
  fontTextClamp(
 | 
					  fontTextClamp(
 | 
				
			||||||
@@ -47,9 +48,8 @@ void vnTextBoxRebuffer(vntextbox_t *box) {
 | 
				
			|||||||
  fontTextInit(box->font, &box->primitive, &box->textInfo);
 | 
					  fontTextInit(box->font, &box->primitive, &box->textInfo);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Resize the frame
 | 
					  // Resize the frame
 | 
				
			||||||
  frameSetSize(
 | 
					  box->height = FONT_LINE_HEIGHT * box->linesMax;
 | 
				
			||||||
    &box->frame, box->widthMax, FONT_LINE_HEIGHT * box->linesMax
 | 
					  frameSetSize(&box->frame, box->width, box->height);
 | 
				
			||||||
  );
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void vnTextBoxUpdate(vntextbox_t *box, engine_t *engine) {
 | 
					void vnTextBoxUpdate(vntextbox_t *box, engine_t *engine) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user