VIP inspection tooling #4
			
				
			
		
		
		
	| 
						 | 
					@ -64,9 +64,7 @@ impl TextureSink {
 | 
				
			||||||
            sample_count: 1,
 | 
					            sample_count: 1,
 | 
				
			||||||
            dimension: wgpu::TextureDimension::D2,
 | 
					            dimension: wgpu::TextureDimension::D2,
 | 
				
			||||||
            format: TextureFormat::Rg8Unorm,
 | 
					            format: TextureFormat::Rg8Unorm,
 | 
				
			||||||
            usage: TextureUsages::COPY_SRC
 | 
					            usage: TextureUsages::COPY_DST | TextureUsages::TEXTURE_BINDING,
 | 
				
			||||||
                | TextureUsages::COPY_DST
 | 
					 | 
				
			||||||
                | TextureUsages::TEXTURE_BINDING,
 | 
					 | 
				
			||||||
            view_formats: &[TextureFormat::Rg8Unorm],
 | 
					            view_formats: &[TextureFormat::Rg8Unorm],
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        device.create_texture(&desc)
 | 
					        device.create_texture(&desc)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -49,11 +49,10 @@ impl UiExt for Ui {
 | 
				
			||||||
        let old_rect = res.response.rect;
 | 
					        let old_rect = res.response.rect;
 | 
				
			||||||
        let mut text_rect = old_rect;
 | 
					        let mut text_rect = old_rect;
 | 
				
			||||||
        text_rect.min.x += 6.0;
 | 
					        text_rect.min.x += 6.0;
 | 
				
			||||||
        let new_rect = self
 | 
					        self.allocate_new_ui(UiBuilder::new().max_rect(text_rect), |ui| ui.label(text));
 | 
				
			||||||
            .allocate_new_ui(UiBuilder::new().max_rect(text_rect), |ui| ui.label(text))
 | 
					        if old_rect.width() > 0.0 {
 | 
				
			||||||
            .response
 | 
					            self.advance_cursor_after_rect(old_rect);
 | 
				
			||||||
            .rect;
 | 
					        }
 | 
				
			||||||
        self.allocate_space((old_rect.max - new_rect.max) - (old_rect.min - new_rect.min));
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    fn selectable_button(&mut self, selected: bool, text: impl Into<WidgetText>) -> Response {
 | 
					    fn selectable_button(&mut self, selected: bool, text: impl Into<WidgetText>) -> Response {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -130,7 +130,6 @@ impl RegisterWindow {
 | 
				
			||||||
        let row_height = self.row_height(ui);
 | 
					        let row_height = self.row_height(ui);
 | 
				
			||||||
        let mut raw_dpstts = self.read_address(0x0005f820);
 | 
					        let mut raw_dpstts = self.read_address(0x0005f820);
 | 
				
			||||||
        let mut dpstts = DisplayReg::parse(raw_dpstts);
 | 
					        let mut dpstts = DisplayReg::parse(raw_dpstts);
 | 
				
			||||||
        ui.add_space(-ui.spacing().item_spacing.x);
 | 
					 | 
				
			||||||
        ui.section("Display", |ui| {
 | 
					        ui.section("Display", |ui| {
 | 
				
			||||||
            let width = ui.available_width();
 | 
					            let width = ui.available_width();
 | 
				
			||||||
            TableBuilder::new(ui)
 | 
					            TableBuilder::new(ui)
 | 
				
			||||||
| 
						 | 
					@ -213,7 +212,6 @@ impl RegisterWindow {
 | 
				
			||||||
        let row_height = self.row_height(ui);
 | 
					        let row_height = self.row_height(ui);
 | 
				
			||||||
        let [mut raw_xpstts, raw_xpctrl] = self.read_address(0x0005f840);
 | 
					        let [mut raw_xpstts, raw_xpctrl] = self.read_address(0x0005f840);
 | 
				
			||||||
        let mut xpstts = DrawingReg::parse(raw_xpstts);
 | 
					        let mut xpstts = DrawingReg::parse(raw_xpstts);
 | 
				
			||||||
        ui.add_space(-ui.spacing().item_spacing.x);
 | 
					 | 
				
			||||||
        ui.section("Drawing", |ui| {
 | 
					        ui.section("Drawing", |ui| {
 | 
				
			||||||
            let width = ui.available_width();
 | 
					            let width = ui.available_width();
 | 
				
			||||||
            TableBuilder::new(ui)
 | 
					            TableBuilder::new(ui)
 | 
				
			||||||
| 
						 | 
					@ -311,7 +309,6 @@ impl RegisterWindow {
 | 
				
			||||||
    fn show_colors(&mut self, ui: &mut Ui) {
 | 
					    fn show_colors(&mut self, ui: &mut Ui) {
 | 
				
			||||||
        let row_height = self.row_height(ui);
 | 
					        let row_height = self.row_height(ui);
 | 
				
			||||||
        let registers = self.registers.borrow();
 | 
					        let registers = self.registers.borrow();
 | 
				
			||||||
        ui.add_space(-ui.spacing().item_spacing.x);
 | 
					 | 
				
			||||||
        ui.section("Colors", |ui| {
 | 
					        ui.section("Colors", |ui| {
 | 
				
			||||||
            let width = ui.available_width();
 | 
					            let width = ui.available_width();
 | 
				
			||||||
            let xspace = ui.spacing().item_spacing.x;
 | 
					            let xspace = ui.spacing().item_spacing.x;
 | 
				
			||||||
| 
						 | 
					@ -501,14 +498,13 @@ impl RegisterWindow {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    fn show_objects(&mut self, ui: &mut Ui) {
 | 
					    fn show_objects(&mut self, ui: &mut Ui) {
 | 
				
			||||||
        let row_height = self.row_height(ui);
 | 
					        let row_height = self.row_height(ui);
 | 
				
			||||||
        ui.add_space(-ui.spacing().item_spacing.x);
 | 
					 | 
				
			||||||
        ui.section("Objects", |ui| {
 | 
					        ui.section("Objects", |ui| {
 | 
				
			||||||
            let width = ui.available_width();
 | 
					            let width = ui.available_width();
 | 
				
			||||||
            let xspace = ui.spacing().item_spacing.x;
 | 
					            let xspace = ui.spacing().item_spacing.x;
 | 
				
			||||||
            TableBuilder::new(ui)
 | 
					            TableBuilder::new(ui)
 | 
				
			||||||
                .column(Column::exact(width * 0.25 - xspace))
 | 
					                .column(Column::exact(width * 0.3 - xspace))
 | 
				
			||||||
                .column(Column::exact(width * 0.25 - xspace))
 | 
					                .column(Column::exact(width * 0.3 - xspace))
 | 
				
			||||||
                .column(Column::exact(width * 0.5 - xspace))
 | 
					                .column(Column::exact(width * 0.4 - xspace))
 | 
				
			||||||
                .cell_layout(Layout::left_to_right(Align::Center).with_main_align(Align::RIGHT))
 | 
					                .cell_layout(Layout::left_to_right(Align::Center).with_main_align(Align::RIGHT))
 | 
				
			||||||
                .body(|mut body| {
 | 
					                .body(|mut body| {
 | 
				
			||||||
                    body.row(row_height, |mut row| {
 | 
					                    body.row(row_height, |mut row| {
 | 
				
			||||||
| 
						 | 
					@ -551,7 +547,6 @@ impl RegisterWindow {
 | 
				
			||||||
    fn show_misc(&mut self, ui: &mut Ui) {
 | 
					    fn show_misc(&mut self, ui: &mut Ui) {
 | 
				
			||||||
        let row_height = self.row_height(ui);
 | 
					        let row_height = self.row_height(ui);
 | 
				
			||||||
        let registers = self.registers.borrow();
 | 
					        let registers = self.registers.borrow();
 | 
				
			||||||
        ui.add_space(-ui.spacing().item_spacing.x);
 | 
					 | 
				
			||||||
        ui.section("Misc.", |ui| {
 | 
					        ui.section("Misc.", |ui| {
 | 
				
			||||||
            let width = ui.available_width();
 | 
					            let width = ui.available_width();
 | 
				
			||||||
            let xspace = ui.spacing().item_spacing.x;
 | 
					            let xspace = ui.spacing().item_spacing.x;
 | 
				
			||||||
| 
						 | 
					@ -653,12 +648,12 @@ impl AppWindow for RegisterWindow {
 | 
				
			||||||
        CentralPanel::default().show(ctx, |ui| {
 | 
					        CentralPanel::default().show(ctx, |ui| {
 | 
				
			||||||
            ScrollArea::vertical().show(ui, |ui| {
 | 
					            ScrollArea::vertical().show(ui, |ui| {
 | 
				
			||||||
                ui.horizontal_top(|ui| {
 | 
					                ui.horizontal_top(|ui| {
 | 
				
			||||||
 | 
					                    let width = ui.available_width();
 | 
				
			||||||
                    let xspace = ui.spacing().item_spacing.x;
 | 
					                    let xspace = ui.spacing().item_spacing.x;
 | 
				
			||||||
                    let width = ui.available_width() - (xspace * 5.0);
 | 
					 | 
				
			||||||
                    StripBuilder::new(ui)
 | 
					                    StripBuilder::new(ui)
 | 
				
			||||||
                        .size(Size::exact(width * 0.2 - xspace))
 | 
					                        .size(Size::exact(width * 0.25 - xspace))
 | 
				
			||||||
                        .size(Size::exact(width * 0.2 - xspace))
 | 
					                        .size(Size::exact(width * 0.225 - xspace))
 | 
				
			||||||
                        .size(Size::exact(width * 0.4 - xspace))
 | 
					                        .size(Size::exact(width * 0.325 - xspace))
 | 
				
			||||||
                        .size(Size::exact(width * 0.2 - xspace))
 | 
					                        .size(Size::exact(width * 0.2 - xspace))
 | 
				
			||||||
                        .horizontal(|mut strip| {
 | 
					                        .horizontal(|mut strip| {
 | 
				
			||||||
                            strip.cell(|ui| {
 | 
					                            strip.cell(|ui| {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue