mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:30:05 +00:00 
			
		
		
		
	Change text background to draw item
This commit is contained in:
		
							parent
							
								
									0945eff733
								
							
						
					
					
						commit
						689f3dc464
					
				
					 8 changed files with 24 additions and 113 deletions
				
			
		|  | @ -67,6 +67,7 @@ public: | |||
|    void Update(); | ||||
| }; | ||||
| 
 | ||||
| // TODO: OpenGL context with shaders
 | ||||
| Rectangle::Rectangle(OpenGLFunctions& gl) : | ||||
|     DrawItem(), p(std::make_unique<RectangleImpl>(gl)) | ||||
| { | ||||
|  | @ -159,12 +160,13 @@ void Rectangle::SetFill(boost::gil::rgba8_pixel_t color) | |||
|    } | ||||
| } | ||||
| 
 | ||||
| void Rectangle::SetPosition(float x, float y) | ||||
| void Rectangle::SetPosition(float x, float y, float z) | ||||
| { | ||||
|    if (p->x_ != x || p->y_ != y) | ||||
|    if (p->x_ != x || p->y_ != y || p->z_ != z) | ||||
|    { | ||||
|       p->x_     = x; | ||||
|       p->y_     = y; | ||||
|       p->z_     = z; | ||||
|       p->dirty_ = true; | ||||
|    } | ||||
| } | ||||
|  |  | |||
|  | @ -34,7 +34,7 @@ public: | |||
| 
 | ||||
|    void SetBorder(float width, boost::gil::rgba8_pixel_t color); | ||||
|    void SetFill(boost::gil::rgba8_pixel_t color); | ||||
|    void SetPosition(float x, float y); | ||||
|    void SetPosition(float x, float y, float z = 0.0f); | ||||
|    void SetSize(float width, float height); | ||||
|    void SetVisible(bool visible); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat