| 
									
										
										
										
											2021-02-21 03:38:12 +01:00
										 |  |  | import {UIElement} from "./UIElement"; | 
					
						
							| 
									
										
										
										
											2021-06-12 02:58:32 +02:00
										 |  |  | import BaseUIElement from "./BaseUIElement"; | 
					
						
							|  |  |  | import Combine from "./Base/Combine"; | 
					
						
							| 
									
										
										
										
											2021-02-21 03:38:12 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * A button floating above the map, in a uniform style | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | export default class MapControlButton extends UIElement { | 
					
						
							| 
									
										
										
										
											2021-06-12 02:58:32 +02:00
										 |  |  |     private _contents: BaseUIElement; | 
					
						
							| 
									
										
										
										
											2021-02-21 03:38:12 +01:00
										 |  |  |      | 
					
						
							| 
									
										
										
										
											2021-06-12 02:58:32 +02:00
										 |  |  |     constructor(contents: BaseUIElement) { | 
					
						
							| 
									
										
										
										
											2021-02-21 03:38:12 +01:00
										 |  |  |         super(); | 
					
						
							| 
									
										
										
										
											2021-06-12 02:58:32 +02:00
										 |  |  |         this._contents = new Combine([contents]); | 
					
						
							| 
									
										
										
										
											2021-02-21 03:38:12 +01:00
										 |  |  |         this.SetClass("relative block rounded-full w-10 h-10 p-1 pointer-events-auto z-above-map subtle-background") | 
					
						
							|  |  |  |         this.SetStyle("box-shadow: 0 0 10px var(--shadow-color);"); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |      | 
					
						
							| 
									
										
										
										
											2021-06-10 01:36:20 +02:00
										 |  |  |     InnerRender() { | 
					
						
							|  |  |  |         return this._contents; | 
					
						
							| 
									
										
										
										
											2021-02-21 03:38:12 +01:00
										 |  |  |     } | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  | } |