BorderBounds borderBounds(MVWindowType type) { switch (type) { case MacVenture::kDocument: break; case MacVenture::kDBox: break; case MacVenture::kPlainDBox: return BorderBounds(3, 3, 3, 3); case MacVenture::kAltBox: return BorderBounds(0, 0, 0, 0); // Hand-tested case MacVenture::kNoGrowDoc: return BorderBounds(1, 20, 1, 1); case MacVenture::kMovableDBox: break; case MacVenture::kZoomDoc: return BorderBounds(1, 20, 17, 1); case MacVenture::kZoomNoGrow: break; case MacVenture::kInvWindow: return BorderBounds(1, 20, 17, 17); case MacVenture::kRDoc16: break; case MacVenture::kRDoc4: return BorderBounds(1, 20, 1, 1); case MacVenture::kRDoc6: break; case MacVenture::kRDoc10: break; default: break; } return BorderBounds(0, 0, 0, 0); }
ButtonGridTextureSheet::ButtonGridTextureSheet(TextureAtlas* textureAtlas) { TextureSheet buttonBackgroundSheet = textureAtlas->AddTextureSheet(Image().LoadFromResource(Resource("Textures/ButtonNormal.png"))); TextureSheet buttonHighlightSheet = textureAtlas->AddTextureSheet(Image().LoadFromResource(Resource("Textures/ButtonHighlight.png"))); TextureSheet buttonSelectedSheet = textureAtlas->AddTextureSheet(Image().LoadFromResource(Resource("Textures/ButtonSelected.png"))); TextureSheet buttonIcons = textureAtlas->AddTextureSheet(Image().LoadFromResource(Resource("Textures/ButtonIcons.png"))); TextureSheet editorTools = textureAtlas->AddTextureSheet(Image().LoadFromResource(Resource("Textures/EditorTools.png"))); buttonBackground = buttonBackgroundSheet.NewTextureImage(BorderBounds(0, 0, 64, 64).Inset(32)); buttonHighlight = buttonHighlightSheet.NewTextureImage(BorderBounds(0, 0, 64, 64).Inset(32)); buttonSelected = buttonSelectedSheet.NewTextureImage(BorderBounds(0, 0, 64, 64).Inset(32)); buttonIconPlay = buttonIcons.NewTextureImage(BorderBounds(0, 0, 25, 32)); buttonIconPause = buttonIcons.NewTextureImage(BorderBounds(25, 0, 25, 32)); buttonEditorToolHand = editorTools.NewTextureImage(BorderBounds(0, 0, 64, 64)); buttonEditorToolPaint = editorTools.NewTextureImage(BorderBounds(64, 0, 64, 64)); buttonEditorToolErase = editorTools.NewTextureImage(BorderBounds(128, 0, 64, 64)); buttonEditorToolSmear = editorTools.NewTextureImage(BorderBounds(196, 0, 64, 64)); buttonEditorToolHills = editorTools.NewTextureImage(BorderBounds(0, 64, 64, 64)); buttonEditorToolTrees = editorTools.NewTextureImage(BorderBounds(64, 64, 64, 64)); buttonEditorToolWater = editorTools.NewTextureImage(BorderBounds(128, 64, 64, 64)); buttonEditorToolFords = editorTools.NewTextureImage(BorderBounds(196, 64, 64, 64)); }