mirror of
				https://github.com/nicbarker/clay.git
				synced 2025-11-04 08:36:17 +00:00 
			
		
		
		
	[Bindings/Odin] Update odin bindings for text config userdata pointer
This commit is contained in:
		
							parent
							
								
									8e6640f7a2
								
							
						
					
					
						commit
						22e8cc318c
					
				| 
						 | 
					@ -102,6 +102,7 @@ TextAlignment :: enum EnumBackingType {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TextElementConfig :: struct {
 | 
					TextElementConfig :: struct {
 | 
				
			||||||
 | 
						userData:			rawptr,
 | 
				
			||||||
	textColor:          Color,
 | 
						textColor:          Color,
 | 
				
			||||||
	fontId:             u16,
 | 
						fontId:             u16,
 | 
				
			||||||
	fontSize:           u16,
 | 
						fontSize:           u16,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -489,7 +489,7 @@ errorHandler :: proc "c" (errorData: clay.ErrorData) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
main :: proc() {
 | 
					main :: proc() {
 | 
				
			||||||
    minMemorySize: u32 = clay.MinMemorySize()
 | 
					    minMemorySize: c.size_t = cast(c.size_t)clay.MinMemorySize()
 | 
				
			||||||
    memory := make([^]u8, minMemorySize)
 | 
					    memory := make([^]u8, minMemorySize)
 | 
				
			||||||
    arena: clay.Arena = clay.CreateArenaWithCapacityAndMemory(minMemorySize, memory)
 | 
					    arena: clay.Arena = clay.CreateArenaWithCapacityAndMemory(minMemorySize, memory)
 | 
				
			||||||
    clay.Initialize(arena, {cast(f32)raylib.GetScreenWidth(), cast(f32)raylib.GetScreenHeight()}, { handler = errorHandler })
 | 
					    clay.Initialize(arena, {cast(f32)raylib.GetScreenWidth(), cast(f32)raylib.GetScreenHeight()}, { handler = errorHandler })
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -119,6 +119,7 @@
 | 
				
			||||||
        {name: 'bottomRight', type: 'float'},
 | 
					        {name: 'bottomRight', type: 'float'},
 | 
				
			||||||
    ]};
 | 
					    ]};
 | 
				
			||||||
    let textConfigDefinition = { name: 'text', type: 'struct', members: [
 | 
					    let textConfigDefinition = { name: 'text', type: 'struct', members: [
 | 
				
			||||||
 | 
					        { name: 'userData', type: 'uint32_t' },
 | 
				
			||||||
        { name: 'textColor', ...colorDefinition },
 | 
					        { name: 'textColor', ...colorDefinition },
 | 
				
			||||||
        { name: 'fontId', type: 'uint16_t' },
 | 
					        { name: 'fontId', type: 'uint16_t' },
 | 
				
			||||||
        { name: 'fontSize', type: 'uint16_t' },
 | 
					        { name: 'fontSize', type: 'uint16_t' },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -119,6 +119,7 @@
 | 
				
			||||||
        {name: 'bottomRight', type: 'float'},
 | 
					        {name: 'bottomRight', type: 'float'},
 | 
				
			||||||
    ]};
 | 
					    ]};
 | 
				
			||||||
    let textConfigDefinition = { name: 'text', type: 'struct', members: [
 | 
					    let textConfigDefinition = { name: 'text', type: 'struct', members: [
 | 
				
			||||||
 | 
					        { name: 'userData', type: 'uint32_t' },
 | 
				
			||||||
        { name: 'textColor', ...colorDefinition },
 | 
					        { name: 'textColor', ...colorDefinition },
 | 
				
			||||||
        { name: 'fontId', type: 'uint16_t' },
 | 
					        { name: 'fontId', type: 'uint16_t' },
 | 
				
			||||||
        { name: 'fontSize', type: 'uint16_t' },
 | 
					        { name: 'fontSize', type: 'uint16_t' },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue