├── README.md ├── Windows 98.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── JCassio.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist └── Windows 98 ├── App-assets └── ezgif-5-5398063dcce3.gif ├── AppDelegate.swift ├── ApplicationWindow.swift ├── Assets.xcassets ├── AppIcon.appiconset │ └── Contents.json ├── Contents.json ├── battery_alt-0.imageset │ ├── Contents.json │ └── battery_alt-0.png ├── computer_explorer-5.imageset │ ├── Contents.json │ └── computer_explorer-5.png ├── iu-1.imageset │ ├── Contents.json │ └── iu-1.png ├── iu-10.imageset │ ├── Contents.json │ └── iu-10.png ├── iu-11.imageset │ ├── Contents.json │ └── iu-11.png ├── iu-3.imageset │ ├── Contents.json │ └── iu-3.png ├── iu-4.imageset │ ├── Contents.json │ └── iu-4.png ├── iu-5.imageset │ ├── Contents.json │ └── iu-5.png ├── iu-6.imageset │ ├── Contents.json │ └── iu-6.png ├── iu-7.imageset │ ├── Contents.json │ └── iu-7.png ├── iu-8.imageset │ ├── Contents.json │ └── iu-8.png ├── iu-9.imageset │ ├── Contents.json │ └── iu-9.png ├── joystick-5.imageset │ ├── Contents.json │ └── joystick-5.png ├── keys-5.imageset │ ├── Contents.json │ └── keys-5.png ├── launch-screen.imageset │ ├── Contents.json │ └── daobodr-7dc4c4b1-7bd3-4b50-87bb-c987e2c4dfb7.jpg ├── msn3-5.imageset │ ├── Contents.json │ └── msn3-5.png ├── network_drive-0.imageset │ ├── Contents.json │ └── network_drive-0.png ├── network_normal_two_pcs-2.imageset │ ├── Contents.json │ └── network_normal_two_pcs-2.png ├── paint.imageset │ ├── Contents.json │ └── display_properties-4.png ├── scanner_alt_network-4.imageset │ ├── Contents.json │ └── scanner_alt_network-4.png └── windows-logo.imageset │ ├── Contents.json │ └── iu-1.png ├── Base.lproj └── LaunchScreen.storyboard ├── BorderModifier.swift ├── ContentView.swift ├── Info.plist ├── Preview Content └── Preview Assets.xcassets │ └── Contents.json ├── SceneDelegate.swift ├── StartPopUp.swift ├── TurnedOffState.swift ├── ViewRouter.swift └── afterLaunchScreen.swift /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 | ## 🚀 Tech 6 |
7 | SwiftUI 8 |
9 | 10 | 11 | ## ✋🏻 Prerequisites 12 | 13 | - [Xcode](https://developer.apple.com/xcode/) 14 | 15 | 16 | ## 🔥 Install & Execute 17 | 18 | 1. Clone the repo; 19 | 2. Open the cloned repo; 20 | 3. Select iPad Pro 11 inch 21 | 4. Run application by pressing CMD + R; 22 | 23 | ## 📝 Other features that can be added 24 | 25 | 1. Multitask icon when an app is opened; 26 | 2. Internet explorer application; 27 | 3. Support for multiple dimensions; 28 | 4. Replicate crashes (a bonus!); 29 | -------------------------------------------------------------------------------- /Windows 98.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F21BACB124E1A52D0035C860 /* StartPopUp.swift in Sources */ = {isa = PBXBuildFile; fileRef = F21BACB024E1A52D0035C860 /* StartPopUp.swift */; }; 11 | F21BACB324E2B96E0035C860 /* ApplicationWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = F21BACB224E2B96E0035C860 /* ApplicationWindow.swift */; }; 12 | F21BACB924E2C1D80035C860 /* BorderModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = F21BACB824E2C1D80035C860 /* BorderModifier.swift */; }; 13 | F21BACBB24E2D8540035C860 /* ViewRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F21BACBA24E2D8540035C860 /* ViewRouter.swift */; }; 14 | F21BACBD24E31B1F0035C860 /* TurnedOffState.swift in Sources */ = {isa = PBXBuildFile; fileRef = F21BACBC24E31B1F0035C860 /* TurnedOffState.swift */; }; 15 | F241F8DC24DB7909006582BA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F241F8DB24DB7909006582BA /* AppDelegate.swift */; }; 16 | F241F8DE24DB7909006582BA /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F241F8DD24DB7909006582BA /* SceneDelegate.swift */; }; 17 | F241F8E024DB7909006582BA /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F241F8DF24DB7909006582BA /* ContentView.swift */; }; 18 | F241F8E224DB790F006582BA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F241F8E124DB790F006582BA /* Assets.xcassets */; }; 19 | F241F8E524DB790F006582BA /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F241F8E424DB790F006582BA /* Preview Assets.xcassets */; }; 20 | F241F8E824DB790F006582BA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F241F8E624DB790F006582BA /* LaunchScreen.storyboard */; }; 21 | F241F8F024DB7C71006582BA /* afterLaunchScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = F241F8EF24DB7C71006582BA /* afterLaunchScreen.swift */; }; 22 | F28276DE24E3551900BC3074 /* ezgif-5-5398063dcce3.gif in Resources */ = {isa = PBXBuildFile; fileRef = F28276DD24E3551900BC3074 /* ezgif-5-5398063dcce3.gif */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXFileReference section */ 26 | F21BACB024E1A52D0035C860 /* StartPopUp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartPopUp.swift; sourceTree = ""; }; 27 | F21BACB224E2B96E0035C860 /* ApplicationWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationWindow.swift; sourceTree = ""; }; 28 | F21BACB824E2C1D80035C860 /* BorderModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BorderModifier.swift; sourceTree = ""; }; 29 | F21BACBA24E2D8540035C860 /* ViewRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewRouter.swift; sourceTree = ""; }; 30 | F21BACBC24E31B1F0035C860 /* TurnedOffState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TurnedOffState.swift; sourceTree = ""; }; 31 | F241F8D824DB7909006582BA /* Windows 98.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Windows 98.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | F241F8DB24DB7909006582BA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33 | F241F8DD24DB7909006582BA /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 34 | F241F8DF24DB7909006582BA /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 35 | F241F8E124DB790F006582BA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 36 | F241F8E424DB790F006582BA /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 37 | F241F8E724DB790F006582BA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 38 | F241F8E924DB790F006582BA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | F241F8EF24DB7C71006582BA /* afterLaunchScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = afterLaunchScreen.swift; sourceTree = ""; }; 40 | F28276DD24E3551900BC3074 /* ezgif-5-5398063dcce3.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "ezgif-5-5398063dcce3.gif"; sourceTree = ""; }; 41 | /* End PBXFileReference section */ 42 | 43 | /* Begin PBXFrameworksBuildPhase section */ 44 | F241F8D524DB7909006582BA /* Frameworks */ = { 45 | isa = PBXFrameworksBuildPhase; 46 | buildActionMask = 2147483647; 47 | files = ( 48 | ); 49 | runOnlyForDeploymentPostprocessing = 0; 50 | }; 51 | /* End PBXFrameworksBuildPhase section */ 52 | 53 | /* Begin PBXGroup section */ 54 | F241F8CF24DB7909006582BA = { 55 | isa = PBXGroup; 56 | children = ( 57 | F241F8DA24DB7909006582BA /* Windows 98 */, 58 | F241F8D924DB7909006582BA /* Products */, 59 | ); 60 | sourceTree = ""; 61 | }; 62 | F241F8D924DB7909006582BA /* Products */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | F241F8D824DB7909006582BA /* Windows 98.app */, 66 | ); 67 | name = Products; 68 | sourceTree = ""; 69 | }; 70 | F241F8DA24DB7909006582BA /* Windows 98 */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | F28276DA24E353BF00BC3074 /* App-assets */, 74 | F241F8DB24DB7909006582BA /* AppDelegate.swift */, 75 | F241F8DD24DB7909006582BA /* SceneDelegate.swift */, 76 | F241F8DF24DB7909006582BA /* ContentView.swift */, 77 | F241F8EF24DB7C71006582BA /* afterLaunchScreen.swift */, 78 | F21BACB024E1A52D0035C860 /* StartPopUp.swift */, 79 | F21BACB224E2B96E0035C860 /* ApplicationWindow.swift */, 80 | F21BACB824E2C1D80035C860 /* BorderModifier.swift */, 81 | F21BACBA24E2D8540035C860 /* ViewRouter.swift */, 82 | F21BACBC24E31B1F0035C860 /* TurnedOffState.swift */, 83 | F241F8E124DB790F006582BA /* Assets.xcassets */, 84 | F241F8E624DB790F006582BA /* LaunchScreen.storyboard */, 85 | F241F8E924DB790F006582BA /* Info.plist */, 86 | F241F8E324DB790F006582BA /* Preview Content */, 87 | ); 88 | path = "Windows 98"; 89 | sourceTree = ""; 90 | }; 91 | F241F8E324DB790F006582BA /* Preview Content */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | F241F8E424DB790F006582BA /* Preview Assets.xcassets */, 95 | ); 96 | path = "Preview Content"; 97 | sourceTree = ""; 98 | }; 99 | F28276DA24E353BF00BC3074 /* App-assets */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | F28276DD24E3551900BC3074 /* ezgif-5-5398063dcce3.gif */, 103 | ); 104 | path = "App-assets"; 105 | sourceTree = ""; 106 | }; 107 | /* End PBXGroup section */ 108 | 109 | /* Begin PBXNativeTarget section */ 110 | F241F8D724DB7909006582BA /* Windows 98 */ = { 111 | isa = PBXNativeTarget; 112 | buildConfigurationList = F241F8EC24DB790F006582BA /* Build configuration list for PBXNativeTarget "Windows 98" */; 113 | buildPhases = ( 114 | F241F8D424DB7909006582BA /* Sources */, 115 | F241F8D524DB7909006582BA /* Frameworks */, 116 | F241F8D624DB7909006582BA /* Resources */, 117 | ); 118 | buildRules = ( 119 | ); 120 | dependencies = ( 121 | ); 122 | name = "Windows 98"; 123 | productName = "Windows 98"; 124 | productReference = F241F8D824DB7909006582BA /* Windows 98.app */; 125 | productType = "com.apple.product-type.application"; 126 | }; 127 | /* End PBXNativeTarget section */ 128 | 129 | /* Begin PBXProject section */ 130 | F241F8D024DB7909006582BA /* Project object */ = { 131 | isa = PBXProject; 132 | attributes = { 133 | LastSwiftUpdateCheck = 1160; 134 | LastUpgradeCheck = 1160; 135 | ORGANIZATIONNAME = "Joselson Dias"; 136 | TargetAttributes = { 137 | F241F8D724DB7909006582BA = { 138 | CreatedOnToolsVersion = 11.6; 139 | }; 140 | }; 141 | }; 142 | buildConfigurationList = F241F8D324DB7909006582BA /* Build configuration list for PBXProject "Windows 98" */; 143 | compatibilityVersion = "Xcode 9.3"; 144 | developmentRegion = en; 145 | hasScannedForEncodings = 0; 146 | knownRegions = ( 147 | en, 148 | Base, 149 | ); 150 | mainGroup = F241F8CF24DB7909006582BA; 151 | productRefGroup = F241F8D924DB7909006582BA /* Products */; 152 | projectDirPath = ""; 153 | projectRoot = ""; 154 | targets = ( 155 | F241F8D724DB7909006582BA /* Windows 98 */, 156 | ); 157 | }; 158 | /* End PBXProject section */ 159 | 160 | /* Begin PBXResourcesBuildPhase section */ 161 | F241F8D624DB7909006582BA /* Resources */ = { 162 | isa = PBXResourcesBuildPhase; 163 | buildActionMask = 2147483647; 164 | files = ( 165 | F28276DE24E3551900BC3074 /* ezgif-5-5398063dcce3.gif in Resources */, 166 | F241F8E824DB790F006582BA /* LaunchScreen.storyboard in Resources */, 167 | F241F8E524DB790F006582BA /* Preview Assets.xcassets in Resources */, 168 | F241F8E224DB790F006582BA /* Assets.xcassets in Resources */, 169 | ); 170 | runOnlyForDeploymentPostprocessing = 0; 171 | }; 172 | /* End PBXResourcesBuildPhase section */ 173 | 174 | /* Begin PBXSourcesBuildPhase section */ 175 | F241F8D424DB7909006582BA /* Sources */ = { 176 | isa = PBXSourcesBuildPhase; 177 | buildActionMask = 2147483647; 178 | files = ( 179 | F21BACBD24E31B1F0035C860 /* TurnedOffState.swift in Sources */, 180 | F21BACB124E1A52D0035C860 /* StartPopUp.swift in Sources */, 181 | F241F8DC24DB7909006582BA /* AppDelegate.swift in Sources */, 182 | F21BACB924E2C1D80035C860 /* BorderModifier.swift in Sources */, 183 | F241F8DE24DB7909006582BA /* SceneDelegate.swift in Sources */, 184 | F241F8E024DB7909006582BA /* ContentView.swift in Sources */, 185 | F21BACB324E2B96E0035C860 /* ApplicationWindow.swift in Sources */, 186 | F241F8F024DB7C71006582BA /* afterLaunchScreen.swift in Sources */, 187 | F21BACBB24E2D8540035C860 /* ViewRouter.swift in Sources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXSourcesBuildPhase section */ 192 | 193 | /* Begin PBXVariantGroup section */ 194 | F241F8E624DB790F006582BA /* LaunchScreen.storyboard */ = { 195 | isa = PBXVariantGroup; 196 | children = ( 197 | F241F8E724DB790F006582BA /* Base */, 198 | ); 199 | name = LaunchScreen.storyboard; 200 | sourceTree = ""; 201 | }; 202 | /* End PBXVariantGroup section */ 203 | 204 | /* Begin XCBuildConfiguration section */ 205 | F241F8EA24DB790F006582BA /* Debug */ = { 206 | isa = XCBuildConfiguration; 207 | buildSettings = { 208 | ALWAYS_SEARCH_USER_PATHS = NO; 209 | CLANG_ANALYZER_NONNULL = YES; 210 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 211 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 212 | CLANG_CXX_LIBRARY = "libc++"; 213 | CLANG_ENABLE_MODULES = YES; 214 | CLANG_ENABLE_OBJC_ARC = YES; 215 | CLANG_ENABLE_OBJC_WEAK = YES; 216 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 217 | CLANG_WARN_BOOL_CONVERSION = YES; 218 | CLANG_WARN_COMMA = YES; 219 | CLANG_WARN_CONSTANT_CONVERSION = YES; 220 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 221 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 222 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 223 | CLANG_WARN_EMPTY_BODY = YES; 224 | CLANG_WARN_ENUM_CONVERSION = YES; 225 | CLANG_WARN_INFINITE_RECURSION = YES; 226 | CLANG_WARN_INT_CONVERSION = YES; 227 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 228 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 229 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 230 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 231 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 232 | CLANG_WARN_STRICT_PROTOTYPES = YES; 233 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 234 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 235 | CLANG_WARN_UNREACHABLE_CODE = YES; 236 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 237 | COPY_PHASE_STRIP = NO; 238 | DEBUG_INFORMATION_FORMAT = dwarf; 239 | ENABLE_STRICT_OBJC_MSGSEND = YES; 240 | ENABLE_TESTABILITY = YES; 241 | GCC_C_LANGUAGE_STANDARD = gnu11; 242 | GCC_DYNAMIC_NO_PIC = NO; 243 | GCC_NO_COMMON_BLOCKS = YES; 244 | GCC_OPTIMIZATION_LEVEL = 0; 245 | GCC_PREPROCESSOR_DEFINITIONS = ( 246 | "DEBUG=1", 247 | "$(inherited)", 248 | ); 249 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 250 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 251 | GCC_WARN_UNDECLARED_SELECTOR = YES; 252 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 253 | GCC_WARN_UNUSED_FUNCTION = YES; 254 | GCC_WARN_UNUSED_VARIABLE = YES; 255 | IPHONEOS_DEPLOYMENT_TARGET = 13.6; 256 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 257 | MTL_FAST_MATH = YES; 258 | ONLY_ACTIVE_ARCH = YES; 259 | SDKROOT = iphoneos; 260 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 261 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 262 | }; 263 | name = Debug; 264 | }; 265 | F241F8EB24DB790F006582BA /* Release */ = { 266 | isa = XCBuildConfiguration; 267 | buildSettings = { 268 | ALWAYS_SEARCH_USER_PATHS = NO; 269 | CLANG_ANALYZER_NONNULL = YES; 270 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 271 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 272 | CLANG_CXX_LIBRARY = "libc++"; 273 | CLANG_ENABLE_MODULES = YES; 274 | CLANG_ENABLE_OBJC_ARC = YES; 275 | CLANG_ENABLE_OBJC_WEAK = YES; 276 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 277 | CLANG_WARN_BOOL_CONVERSION = YES; 278 | CLANG_WARN_COMMA = YES; 279 | CLANG_WARN_CONSTANT_CONVERSION = YES; 280 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 281 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 282 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 283 | CLANG_WARN_EMPTY_BODY = YES; 284 | CLANG_WARN_ENUM_CONVERSION = YES; 285 | CLANG_WARN_INFINITE_RECURSION = YES; 286 | CLANG_WARN_INT_CONVERSION = YES; 287 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 288 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 289 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 290 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 291 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 292 | CLANG_WARN_STRICT_PROTOTYPES = YES; 293 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 294 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 295 | CLANG_WARN_UNREACHABLE_CODE = YES; 296 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 297 | COPY_PHASE_STRIP = NO; 298 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 299 | ENABLE_NS_ASSERTIONS = NO; 300 | ENABLE_STRICT_OBJC_MSGSEND = YES; 301 | GCC_C_LANGUAGE_STANDARD = gnu11; 302 | GCC_NO_COMMON_BLOCKS = YES; 303 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 304 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 305 | GCC_WARN_UNDECLARED_SELECTOR = YES; 306 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 307 | GCC_WARN_UNUSED_FUNCTION = YES; 308 | GCC_WARN_UNUSED_VARIABLE = YES; 309 | IPHONEOS_DEPLOYMENT_TARGET = 13.6; 310 | MTL_ENABLE_DEBUG_INFO = NO; 311 | MTL_FAST_MATH = YES; 312 | SDKROOT = iphoneos; 313 | SWIFT_COMPILATION_MODE = wholemodule; 314 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 315 | VALIDATE_PRODUCT = YES; 316 | }; 317 | name = Release; 318 | }; 319 | F241F8ED24DB790F006582BA /* Debug */ = { 320 | isa = XCBuildConfiguration; 321 | buildSettings = { 322 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 323 | CODE_SIGN_STYLE = Automatic; 324 | DEVELOPMENT_ASSET_PATHS = "\"Windows 98/Preview Content\""; 325 | DEVELOPMENT_TEAM = 54272CAZ82; 326 | ENABLE_PREVIEWS = YES; 327 | INFOPLIST_FILE = "Windows 98/Info.plist"; 328 | LD_RUNPATH_SEARCH_PATHS = ( 329 | "$(inherited)", 330 | "@executable_path/Frameworks", 331 | ); 332 | PRODUCT_BUNDLE_IDENTIFIER = "com.joselson.Windows-98"; 333 | PRODUCT_NAME = "$(TARGET_NAME)"; 334 | SWIFT_VERSION = 5.0; 335 | TARGETED_DEVICE_FAMILY = 2; 336 | }; 337 | name = Debug; 338 | }; 339 | F241F8EE24DB790F006582BA /* Release */ = { 340 | isa = XCBuildConfiguration; 341 | buildSettings = { 342 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 343 | CODE_SIGN_STYLE = Automatic; 344 | DEVELOPMENT_ASSET_PATHS = "\"Windows 98/Preview Content\""; 345 | DEVELOPMENT_TEAM = 54272CAZ82; 346 | ENABLE_PREVIEWS = YES; 347 | INFOPLIST_FILE = "Windows 98/Info.plist"; 348 | LD_RUNPATH_SEARCH_PATHS = ( 349 | "$(inherited)", 350 | "@executable_path/Frameworks", 351 | ); 352 | PRODUCT_BUNDLE_IDENTIFIER = "com.joselson.Windows-98"; 353 | PRODUCT_NAME = "$(TARGET_NAME)"; 354 | SWIFT_VERSION = 5.0; 355 | TARGETED_DEVICE_FAMILY = 2; 356 | }; 357 | name = Release; 358 | }; 359 | /* End XCBuildConfiguration section */ 360 | 361 | /* Begin XCConfigurationList section */ 362 | F241F8D324DB7909006582BA /* Build configuration list for PBXProject "Windows 98" */ = { 363 | isa = XCConfigurationList; 364 | buildConfigurations = ( 365 | F241F8EA24DB790F006582BA /* Debug */, 366 | F241F8EB24DB790F006582BA /* Release */, 367 | ); 368 | defaultConfigurationIsVisible = 0; 369 | defaultConfigurationName = Release; 370 | }; 371 | F241F8EC24DB790F006582BA /* Build configuration list for PBXNativeTarget "Windows 98" */ = { 372 | isa = XCConfigurationList; 373 | buildConfigurations = ( 374 | F241F8ED24DB790F006582BA /* Debug */, 375 | F241F8EE24DB790F006582BA /* Release */, 376 | ); 377 | defaultConfigurationIsVisible = 0; 378 | defaultConfigurationName = Release; 379 | }; 380 | /* End XCConfigurationList section */ 381 | }; 382 | rootObject = F241F8D024DB7909006582BA /* Project object */; 383 | } 384 | -------------------------------------------------------------------------------- /Windows 98.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Windows 98.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Windows 98.xcodeproj/xcuserdata/JCassio.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Windows 98.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Windows 98/App-assets/ezgif-5-5398063dcce3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/App-assets/ezgif-5-5398063dcce3.gif -------------------------------------------------------------------------------- /Windows 98/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Windows 98 4 | // 5 | // Created by MR.Robot 💀 on 06/08/2020. 6 | // Copyright © 2020 Joselson Dias. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /Windows 98/ApplicationWindow.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ApplicationWindow.swift 3 | // Windows 98 4 | // 5 | // Created by MR.Robot 💀 on 11/08/2020. 6 | // Copyright © 2020 Joselson Dias. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import PencilKit 11 | 12 | struct ApplicationWindow: View { 13 | @EnvironmentObject var router: ViewRouter 14 | @State var CloseButtonPressed: Bool = false 15 | @State var questionButtonPressed: Bool = false 16 | @State var viewState = CGSize.zero 17 | @Environment(\.undoManager) var undoManager 18 | @State private var canvasView = PKCanvasView() 19 | 20 | var body: some View { 21 | ZStack { 22 | VStack { 23 | HStack{ 24 | Text("MS Paint") 25 | .font(.system(size: 22)) 26 | .bold() 27 | .foregroundColor(Color.white) 28 | .padding(.horizontal) 29 | 30 | Spacer() 31 | Button(action: { 32 | self.questionButtonPressed.toggle() 33 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { 34 | self.questionButtonPressed = false 35 | } 36 | }) { 37 | Image(systemName: "questionmark") 38 | .renderingMode(.original) 39 | } 40 | .border(width: 5, edge: .top, color: questionButtonPressed ? .black : .white) 41 | .border(width: 5, edge: .trailing, color: questionButtonPressed ? .white : .black) 42 | .border(width: 5, edge: .bottom, color: questionButtonPressed ? .white : .black) 43 | .border(width: 5, edge: .leading, color: questionButtonPressed ? .black : .white) 44 | .frame(width:40, height: 40) 45 | .background(Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1))) 46 | 47 | 48 | 49 | Button(action: { 50 | self.CloseButtonPressed.toggle() 51 | if self.CloseButtonPressed == true { 52 | self.router.openPaint = false 53 | } 54 | }) { 55 | Image(systemName: "xmark") 56 | .renderingMode(.original) 57 | } 58 | .border(width: 5, edge: .top, color: CloseButtonPressed ? .black : .white) 59 | .border(width: 5, edge: .trailing, color: CloseButtonPressed ? .white : .black) 60 | .border(width: 5, edge: .bottom, color: CloseButtonPressed ? .white : .black) 61 | .border(width: 5, edge: .leading, color: CloseButtonPressed ? .black : .white) 62 | .frame(width:40, height: 40) 63 | .background(Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1))) 64 | } 65 | .frame(width: 790, height: 30) 66 | .padding(.vertical, 9) 67 | .background(Color(#colorLiteral(red: 0, green: 0.1781602864, blue: 0.6943502454, alpha: 1))) 68 | .gesture(DragGesture() 69 | .onChanged{ value in 70 | self.viewState = value.translation 71 | } 72 | ) 73 | Spacer() 74 | 75 | VStack { 76 | HStack(spacing: 35) { 77 | Button("Clear") { 78 | self.canvasView.drawing = PKDrawing() 79 | } 80 | .foregroundColor(.black) 81 | Button("Undo") { 82 | self.undoManager?.undo() 83 | } 84 | .foregroundColor(.black) 85 | Button("Redo") { 86 | self.undoManager?.redo() 87 | } 88 | .foregroundColor(.black) 89 | } 90 | .padding() 91 | 92 | MyCanvas(canvasView: $canvasView) 93 | } 94 | .frame(width: 750 , height: 500) 95 | .background(Color.white) 96 | .padding() 97 | } 98 | .padding(.top, 3) 99 | .padding(.horizontal, 8) 100 | } 101 | .border(width: 5, edge: .top, color: .white) 102 | .border(width: 3, edge: .trailing, color: .black) 103 | .border(width: 3, edge: .bottom, color: .black) 104 | .border(width: 5, edge: .leading, color: .white) 105 | .frame(width: 800, height: 600) 106 | .background(Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1))) 107 | .offset(x: viewState.width, y: viewState.height) 108 | 109 | } 110 | } 111 | 112 | struct ApplicationWindow_Previews: PreviewProvider { 113 | static var previews: some View { 114 | ApplicationWindow() 115 | } 116 | } 117 | 118 | struct MyCanvas: UIViewRepresentable { 119 | @Binding var canvasView: PKCanvasView 120 | 121 | func makeUIView(context: Context) -> PKCanvasView { 122 | self.canvasView.tool = PKInkingTool(.pen, color: .black, width: 15) 123 | return canvasView 124 | } 125 | 126 | func updateUIView(_ uiView: PKCanvasView, context: Context) { } 127 | } 128 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/battery_alt-0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "battery_alt-0.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/battery_alt-0.imageset/battery_alt-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/battery_alt-0.imageset/battery_alt-0.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/computer_explorer-5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "computer_explorer-5.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/computer_explorer-5.imageset/computer_explorer-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/computer_explorer-5.imageset/computer_explorer-5.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iu-1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-1.imageset/iu-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/iu-1.imageset/iu-1.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-10.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iu-10.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-10.imageset/iu-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/iu-10.imageset/iu-10.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-11.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iu-11.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-11.imageset/iu-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/iu-11.imageset/iu-11.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iu-3.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-3.imageset/iu-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/iu-3.imageset/iu-3.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iu-4.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-4.imageset/iu-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/iu-4.imageset/iu-4.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iu-5.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-5.imageset/iu-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/iu-5.imageset/iu-5.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iu-6.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-6.imageset/iu-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/iu-6.imageset/iu-6.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-7.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iu-7.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-7.imageset/iu-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/iu-7.imageset/iu-7.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-8.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iu-8.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-8.imageset/iu-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/iu-8.imageset/iu-8.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-9.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iu-9.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/iu-9.imageset/iu-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/iu-9.imageset/iu-9.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/joystick-5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "joystick-5.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/joystick-5.imageset/joystick-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/joystick-5.imageset/joystick-5.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/keys-5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "keys-5.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/keys-5.imageset/keys-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/keys-5.imageset/keys-5.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/launch-screen.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "daobodr-7dc4c4b1-7bd3-4b50-87bb-c987e2c4dfb7.jpg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/launch-screen.imageset/daobodr-7dc4c4b1-7bd3-4b50-87bb-c987e2c4dfb7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/launch-screen.imageset/daobodr-7dc4c4b1-7bd3-4b50-87bb-c987e2c4dfb7.jpg -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/msn3-5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "msn3-5.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/msn3-5.imageset/msn3-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/msn3-5.imageset/msn3-5.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/network_drive-0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "network_drive-0.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/network_drive-0.imageset/network_drive-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/network_drive-0.imageset/network_drive-0.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/network_normal_two_pcs-2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "network_normal_two_pcs-2.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/network_normal_two_pcs-2.imageset/network_normal_two_pcs-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/network_normal_two_pcs-2.imageset/network_normal_two_pcs-2.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/paint.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "display_properties-4.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/paint.imageset/display_properties-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/paint.imageset/display_properties-4.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/scanner_alt_network-4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "scanner_alt_network-4.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/scanner_alt_network-4.imageset/scanner_alt_network-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/scanner_alt_network-4.imageset/scanner_alt_network-4.png -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/windows-logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iu-1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Windows 98/Assets.xcassets/windows-logo.imageset/iu-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JCassio1/SwiftUI-windows98/7ad9991f52fcca159c9d51addd44d5c48ea668bc/Windows 98/Assets.xcassets/windows-logo.imageset/iu-1.png -------------------------------------------------------------------------------- /Windows 98/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Windows 98/BorderModifier.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BorderModifier.swift 3 | // Windows 98 4 | // 5 | // Created by MR.Robot 💀 on 11/08/2020. 6 | // Copyright © 2020 Joselson Dias. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct EdgeBorder: Shape { 12 | 13 | var width: CGFloat 14 | var edge: Edge 15 | 16 | func path(in rect: CGRect) -> Path { 17 | var x: CGFloat { 18 | switch edge { 19 | case .top, .bottom, .leading: return rect.minX 20 | case .trailing: return rect.maxX - width 21 | } 22 | } 23 | 24 | var y: CGFloat { 25 | switch edge { 26 | case .top, .leading, .trailing: return rect.minY 27 | case .bottom: return rect.maxY - width 28 | } 29 | } 30 | 31 | var w: CGFloat { 32 | switch edge { 33 | case .top, .bottom: return rect.width 34 | case .leading, .trailing: return self.width 35 | } 36 | } 37 | 38 | var h: CGFloat { 39 | switch edge { 40 | case .top, .bottom: return self.width 41 | case .leading, .trailing: return rect.height 42 | } 43 | } 44 | 45 | return Path( CGRect(x: x, y: y, width: w, height: h) ) 46 | } 47 | } 48 | 49 | extension View { 50 | func border(width: CGFloat, edge: Edge, color: Color) -> some View { 51 | ZStack { 52 | self 53 | EdgeBorder(width: width, edge: edge).foregroundColor(color) 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Windows 98/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Windows 98 4 | // 5 | // Created by MR.Robot 💀 on 06/08/2020. 6 | // Copyright © 2020 Joselson Dias. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct ContentView: View { 12 | @State var showLaunch: Bool = false 13 | @State var viewState = CGSize.zero 14 | @State var startPressed: Bool = false 15 | // @State var showStartPopup: Bool = false 16 | @EnvironmentObject var router: ViewRouter 17 | 18 | var body: some View { 19 | 20 | ZStack { 21 | Color(#colorLiteral(red: 0.04960969836, green: 0.439883709, blue: 0.4495689273, alpha: 1)) 22 | 23 | Image("windows-logo") 24 | .resizable() 25 | .frame(width: 200, height: 200) 26 | 27 | //Yes! This part looks ugly and it can be easily cleaned with an array 28 | HStack { 29 | VStack(spacing: 90) { 30 | VStack { 31 | Image("computer_explorer-5") 32 | .resizable() 33 | .aspectRatio(contentMode: .fit) 34 | .frame(width: 80, height: 80) 35 | Text("My Computer") 36 | .underline() 37 | } 38 | VStack { 39 | Image("iu-3") 40 | .resizable() 41 | .aspectRatio(contentMode: .fit) 42 | .frame(width: 80, height: 80) 43 | Text("My Documents") 44 | .underline() 45 | } 46 | VStack { 47 | Image("iu-9") 48 | .resizable() 49 | .aspectRatio(contentMode: .fit) 50 | .frame(width: 80, height: 80) 51 | Text("Internet Explorer") 52 | .underline() 53 | } 54 | VStack { 55 | Image("msn3-5") 56 | .resizable() 57 | .aspectRatio(contentMode: .fit) 58 | .frame(width: 80, height: 80) 59 | Text("MSN") 60 | .underline() 61 | } 62 | VStack { 63 | Image("iu-4") 64 | .resizable() 65 | .aspectRatio(contentMode: .fit) 66 | .frame(width: 80, height: 80) 67 | Text("Recycle Bin") 68 | .underline() 69 | } 70 | Spacer() 71 | } 72 | .padding(.horizontal, 30) 73 | .padding(.vertical, 30) 74 | .foregroundColor(Color.white) 75 | Spacer() 76 | } 77 | 78 | VStack { 79 | Text("Hello") 80 | Spacer() 81 | HStack(spacing: 5) { 82 | Button(action: { 83 | self.startPressed.toggle() 84 | self.router.startPopup.toggle() 85 | }) { 86 | Image("windows-logo") 87 | .resizable() 88 | .renderingMode(.original) 89 | .aspectRatio(contentMode: .fit) 90 | .frame(width: 70, height: 48) 91 | 92 | Text("Start") 93 | .bold() 94 | .font(.system(size: 38)) 95 | .foregroundColor(Color.black) 96 | } 97 | .border(width: 5, edge: .top, color: self.router.startPopup ? .black : .white) 98 | .border(width: 5, edge: .trailing, color: self.router.startPopup ? .white : .black) 99 | .border(width: 5, edge: .bottom, color: self.router.startPopup ? .white : .black) 100 | .border(width: 5, edge: .leading, color: self.router.startPopup ? .black : .white) 101 | .frame(width: 220, height: 65) 102 | .padding(20) 103 | .animation(.default) 104 | 105 | Rectangle() 106 | .foregroundColor(Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1))) 107 | .border(width: 5, edge: .top, color: .white) 108 | .border(width: 5, edge: .trailing, color: .black) 109 | .border(width: 5, edge: .bottom, color: .black) 110 | .border(width: 5, edge: .leading, color:.white) 111 | .frame(width: 12, height: 65) 112 | 113 | Spacer() 114 | 115 | VStack { 116 | Text("Made by Joselson Dias") 117 | } 118 | .border(width: 5, edge: .top, color: .black) 119 | .border(width: 5, edge: .trailing, color: .white) 120 | .border(width: 5, edge: .bottom, color: .white) 121 | .border(width: 5, edge: .leading, color:.black) 122 | .frame(width: 195, height: 65) 123 | .padding() 124 | } 125 | .padding(.vertical, -10) 126 | .border(width: 5, edge: .top, color: Color(#colorLiteral(red: 0.9999960065, green: 1, blue: 1, alpha: 1))) 127 | .frame(maxWidth: .infinity) 128 | .frame(height: 80) 129 | .background(Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1))) 130 | } 131 | 132 | if showLaunch { 133 | afterLaunchScreen() 134 | } 135 | 136 | if self.router.startPopup { 137 | VStack { 138 | Spacer() 139 | HStack { 140 | StartPopUp() 141 | Spacer() 142 | } 143 | } 144 | .offset(y: -80) 145 | } 146 | 147 | if router.openPaint == true { 148 | VStack { 149 | ApplicationWindow() 150 | } 151 | } 152 | 153 | if router.turnComputerOff == true { 154 | TurnedOffState() 155 | } 156 | } 157 | .onAppear { 158 | DispatchQueue.main.asyncAfter(deadline: .now() + 3) { 159 | self.showLaunch = false 160 | } 161 | } 162 | .edgesIgnoringSafeArea(.all) 163 | } 164 | } 165 | 166 | 167 | struct ContentView_Previews: PreviewProvider { 168 | static var previews: some View { 169 | ContentView() 170 | .environmentObject(ViewRouter()) 171 | // .previewLayout(PreviewLayout.fixed(width: 2388, height: 1668)) 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /Windows 98/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | 37 | 38 | 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationLandscapeLeft 49 | 50 | UISupportedInterfaceOrientations~ipad 51 | 52 | UIInterfaceOrientationPortrait 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Windows 98/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Windows 98/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // Windows 98 4 | // 5 | // Created by MR.Robot 💀 on 06/08/2020. 6 | // Copyright © 2020 Joselson Dias. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | var router = ViewRouter() 17 | 18 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 19 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 20 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 21 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 22 | 23 | // Create the SwiftUI view that provides the window contents. 24 | let contentView = 25 | ContentView() 26 | 27 | 28 | // Use a UIHostingController as window root view controller. 29 | if let windowScene = scene as? UIWindowScene { 30 | let window = UIWindow(windowScene: windowScene) 31 | window.rootViewController = UIHostingController(rootView: contentView.environmentObject(ViewRouter())) 32 | self.window = window 33 | window.makeKeyAndVisible() 34 | } 35 | } 36 | 37 | func sceneDidDisconnect(_ scene: UIScene) { 38 | // Called as the scene is being released by the system. 39 | // This occurs shortly after the scene enters the background, or when its session is discarded. 40 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 41 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 42 | } 43 | 44 | func sceneDidBecomeActive(_ scene: UIScene) { 45 | // Called when the scene has moved from an inactive state to an active state. 46 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 47 | } 48 | 49 | func sceneWillResignActive(_ scene: UIScene) { 50 | // Called when the scene will move from an active state to an inactive state. 51 | // This may occur due to temporary interruptions (ex. an incoming phone call). 52 | } 53 | 54 | func sceneWillEnterForeground(_ scene: UIScene) { 55 | // Called as the scene transitions from the background to the foreground. 56 | // Use this method to undo the changes made on entering the background. 57 | } 58 | 59 | func sceneDidEnterBackground(_ scene: UIScene) { 60 | // Called as the scene transitions from the foreground to the background. 61 | // Use this method to save data, release shared resources, and store enough scene-specific state information 62 | // to restore the scene back to its current state. 63 | } 64 | 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /Windows 98/StartPopUp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StartPopUp.swift 3 | // Windows 98 4 | // 5 | // Created by MR.Robot 💀 on 10/08/2020. 6 | // Copyright © 2020 Joselson Dias. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct StartPopUp: View { 12 | var body: some View { 13 | VStack { 14 | ForEach(menuSection) { item in 15 | MenuList(section: item) 16 | } 17 | } 18 | .background(Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1))) 19 | } 20 | } 21 | 22 | struct StartPopUp_Previews: PreviewProvider { 23 | static var previews: some View { 24 | StartPopUp() 25 | .environmentObject(ViewRouter()) 26 | } 27 | } 28 | 29 | 30 | struct MenuList: View { 31 | @State var buttonPressed = false 32 | @EnvironmentObject var router: ViewRouter 33 | 34 | var section: Section 35 | var body: some View { 36 | Button(action: { 37 | self.buttonPressed = true 38 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.8) { 39 | self.buttonPressed = false 40 | } 41 | 42 | switch self.section.menuText { 43 | case "Paint": 44 | self.router.openPaint = true 45 | self.router.startPopup.toggle() 46 | case "Shut Down": 47 | self.router.turnComputerOff = true 48 | self.router.startPopup.toggle() 49 | default: 50 | self.router.openPaint = self.router.openPaint 51 | } 52 | 53 | // if self.section.menuText == "Paint" { 54 | //// HERE !!!!!!!!!!!!!!!!!!!!!!!!! 55 | // self.router.openPaint = true 56 | // } 57 | }) { 58 | HStack { 59 | HStack() { 60 | Image(section.menuIcon) 61 | .resizable() 62 | .renderingMode(.original) 63 | .aspectRatio(contentMode: .fit) 64 | .frame(width: 80, height: 80) 65 | Text(section.menuText) 66 | .font(.system(size: 29)) 67 | .foregroundColor(Color.black) 68 | } 69 | } 70 | .frame(width: 500, height: 90, alignment: .leading) 71 | .padding(.horizontal, 10) 72 | } 73 | .background(buttonPressed ? Color(#colorLiteral(red: 0.5746028938, green: 0.5746028938, blue: 0.5746028938, alpha: 1)) : Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 0))) 74 | } 75 | } 76 | 77 | struct Section: Identifiable { 78 | var id = UUID() 79 | var menuIcon: String 80 | var menuText: String 81 | } 82 | 83 | 84 | let menuSection = [ 85 | Section(menuIcon: "iu-3", menuText: "New Office Document"), 86 | Section(menuIcon: "iu-4", menuText: "Trash"), 87 | Section(menuIcon: "joystick-5", menuText: "Games"), 88 | Section(menuIcon: "paint", menuText: "Paint"), 89 | Section(menuIcon: "iu-8", menuText: "Documents"), 90 | Section(menuIcon: "iu-9", menuText: "Internet Explorer"), 91 | Section(menuIcon: "keys-5", menuText: "Password Manager"), 92 | Section(menuIcon: "network_drive-0", menuText: "Network Drives"), 93 | Section(menuIcon: "battery_alt-0", menuText: "Shut Down") 94 | ] 95 | -------------------------------------------------------------------------------- /Windows 98/TurnedOffState.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TurnedOffState.swift 3 | // Windows 98 4 | // 5 | // Created by MR.Robot 💀 on 11/08/2020. 6 | // Copyright © 2020 Joselson Dias. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct TurnedOffState: View { 12 | @EnvironmentObject var router: ViewRouter 13 | var body: some View { 14 | VStack { 15 | Button(action: { 16 | self.router.turnComputerOff = false 17 | }) { 18 | Text("Turn On") 19 | .bold() 20 | .font(.system(size: 30)) 21 | .foregroundColor(Color.black) 22 | } 23 | .frame(width: 300, height: 90) 24 | .background(Color.white) 25 | .cornerRadius(15) 26 | .shadow(color: Color.white, radius: 16) 27 | } 28 | .frame(maxWidth: .infinity) 29 | .frame(maxHeight: .infinity) 30 | .background(Color.black) 31 | } 32 | } 33 | 34 | struct TurnedOffState_Previews: PreviewProvider { 35 | static var previews: some View { 36 | TurnedOffState() 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Windows 98/ViewRouter.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewRouter.swift 3 | // Windows 98 4 | // 5 | // Created by MR.Robot 💀 on 11/08/2020. 6 | // Copyright © 2020 Joselson Dias. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import Combine 11 | import SwiftUI 12 | 13 | class ViewRouter: ObservableObject { 14 | 15 | @Published var openPaint = false 16 | @Published var turnComputerOff = false 17 | @Published var startPopup = false 18 | } 19 | -------------------------------------------------------------------------------- /Windows 98/afterLaunchScreen.swift: -------------------------------------------------------------------------------- 1 | // 2 | // afterLaunchScreen.swift 3 | // Windows 98 4 | // 5 | // Created by MR.Robot 💀 on 06/08/2020. 6 | // Copyright © 2020 Joselson Dias. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct afterLaunchScreen: View { 12 | var body: some View { 13 | Image("launch-screen") 14 | .resizable() 15 | .aspectRatio(contentMode: .fill) 16 | .edgesIgnoringSafeArea(.all) 17 | } 18 | } 19 | 20 | struct afterLaunchScreen_Previews: PreviewProvider { 21 | static var previews: some View { 22 | afterLaunchScreen() 23 | .previewLayout(PreviewLayout.fixed(width: 2388, height: 1668)) 24 | } 25 | } 26 | --------------------------------------------------------------------------------