mirror of
				https://github.com/klmp200/sarl-fireworks.git
				synced 2025-10-31 00:53:12 +00:00 
			
		
		
		
	Nice UI
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							| @@ -4,11 +4,13 @@ import io.janusproject.Boot; | ||||
| import io.janusproject.kernel.Kernel; | ||||
| import io.sarl.demos.fireworks.agents.LaunchingArea; | ||||
| import io.sarl.demos.fireworks.gui.FXMLViewerController; | ||||
| import io.sarl.lang.annotation.SarlElementType; | ||||
| import io.sarl.lang.annotation.SarlSpecification; | ||||
| import io.sarl.lang.annotation.SyntheticMember; | ||||
| import org.eclipse.xtext.xbase.lib.Exceptions; | ||||
|  | ||||
| @SarlSpecification("0.6") | ||||
| @SarlSpecification("0.5") | ||||
| @SarlElementType(8) | ||||
| @SuppressWarnings("all") | ||||
| public class Firework { | ||||
|   public static Kernel main(final FXMLViewerController controller) { | ||||
| @@ -16,6 +18,7 @@ public class Firework { | ||||
|       Kernel _xblockexpression = null; | ||||
|       { | ||||
|         Boot.setOffline(true); | ||||
|         Boot.setVerboseLevel(7); | ||||
|         _xblockexpression = Boot.startJanus(LaunchingArea.class, controller); | ||||
|       } | ||||
|       return _xblockexpression; | ||||
|   | ||||
| @@ -1,14 +1,13 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
|  | ||||
| <?import javafx.geometry.*?> | ||||
| <?import javafx.scene.effect.*?> | ||||
| <?import javafx.scene.*?> | ||||
| <?import javafx.scene.control.*?> | ||||
| <?import javafx.scene.canvas.*?> | ||||
| <?import java.lang.*?> | ||||
| <?import javafx.scene.layout.*?> | ||||
| <?import javafx.scene.canvas.Canvas?> | ||||
| <?import javafx.scene.control.Button?> | ||||
| <?import javafx.scene.control.Label?> | ||||
| <?import javafx.scene.control.ScrollBar?> | ||||
| <?import javafx.scene.layout.AnchorPane?> | ||||
| <?import javafx.scene.layout.Pane?> | ||||
|  | ||||
| <Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="608.0" prefWidth="933.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.sarl.demos.fireworks.gui.FXMLViewerController"> | ||||
| <Pane fx:id="main_pane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="608.0" prefWidth="933.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="io.sarl.demos.fireworks.gui.FXMLViewerController"> | ||||
|    <children> | ||||
|       <Canvas fx:id="draw_zone" height="583.0" layoutX="199.0" layoutY="13.0" rotate="180.0" width="715.0" /> | ||||
|       <Button fx:id="setup_button" layoutX="26.0" layoutY="45.0" mnemonicParsing="false" onAction="#actionSetup" text="Setup" /> | ||||
|   | ||||
| @@ -21,6 +21,7 @@ class FireworksFXApplication extends Application { | ||||
| 		loader.setBuilderFactory(new JavaFXBuilderFactory()); | ||||
| 		var root : Parent = loader.load(location.openStream()) as Parent; | ||||
| 		var scene : Scene = new Scene(root); | ||||
| 		scene.getStylesheets().add(getClass().getResource("ViewerController.css").toExternalForm); | ||||
| 		stage.setTitle("SARL Demo: Fireworks Animation"); | ||||
| 		stage.setScene(scene); | ||||
| 		stage.show(); | ||||
|   | ||||
							
								
								
									
										46
									
								
								src/main/sarl/io/sarl/demos/fireworks/ViewerController.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								src/main/sarl/io/sarl/demos/fireworks/ViewerController.css
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| /* | ||||
| * @Author: Bartuccio Antoine | ||||
| * @Date:   2017-05-26 16:41:58 | ||||
| * @Last Modified by:   klmp200 | ||||
| * @Last Modified time: 2017-05-26 17:29:05 | ||||
| */ | ||||
|  | ||||
| // Nice white #F9FAFB | ||||
| // Nice black #2B2B2B | ||||
|  | ||||
| #main_pane { | ||||
| 	-fx-background-color: #2B2B2B; | ||||
| } | ||||
|  | ||||
| .scroll-bar { | ||||
| 	-fx-background-color: rgb(57, 57, 57); | ||||
| } | ||||
|  | ||||
| .scroll-bar .thumb { | ||||
| 	-fx-background-color: rgb(169, 169, 169); | ||||
| 	-fx-background-radius: 0em; | ||||
| 	-fx-background-inserts: 0, 0, 0; | ||||
| } | ||||
|  | ||||
| .scroll-bar .increment-arrow, | ||||
| .scroll-bar .decrement-arrow { | ||||
| 	-fx-color: rgb(169, 169, 169); | ||||
| } | ||||
|  | ||||
| .scroll-bar:hover .increment-arrow, | ||||
| .scroll-bar:hover .decrement-arrow { | ||||
| 	-fx-color: #2B2B2B; | ||||
| 	-fx-background-color: rgb(169, 169, 169); | ||||
| } | ||||
|  | ||||
| .label { | ||||
| 	-fx-text-fill: #F9FAFB; | ||||
| } | ||||
|  | ||||
| .button { | ||||
| 	-fx-background-radius: 0em; | ||||
| 	-fx-background-inserts: 0, 0, 0; | ||||
| 	-fx-focus-color: transparent; | ||||
| 	-fx-text-fill: #2B2B2B; | ||||
| 	-fx-background-color: rgb(169, 169, 169); | ||||
| } | ||||
		Reference in New Issue
	
	Block a user