Some things for effects support

This commit is contained in:
Dmitry Isaenko 2019-10-14 02:44:43 +03:00
parent 092616039e
commit f20ac83c37
14 changed files with 363 additions and 46 deletions

6
.idea/vcs.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View file

@ -46,7 +46,7 @@ public class AboutController implements Initializable {
}); });
gitHubHLink.setOnAction(ActionEvent-> { gitHubHLink.setOnAction(ActionEvent-> {
try { try {
hs.showDocument("https://github.com/developersu/LoLed"); hs.showDocument("https://github.com/developersu/LogiLed");
} catch (Exception ignored){} // No luck for linux =( } catch (Exception ignored){} // No luck for linux =(
}); });
blogspotHLink.setOnAction(ActionEvent-> { blogspotHLink.setOnAction(ActionEvent-> {

View file

@ -0,0 +1,20 @@
package logiled.Controllers;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ToggleGroup;
import java.net.URL;
import java.util.ResourceBundle;
public class EffectsController implements Initializable {
@FXML
private ToggleGroup effectsToggleGrp;
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
}
}

View file

@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.ResourceBundle; import java.util.ResourceBundle;
public class KbrdController implements Initializable { public class KeysLedsController implements Initializable {
@FXML @FXML
private Button private Button
@ -36,9 +36,7 @@ public class KbrdController implements Initializable {
@Override @Override
public void initialize(URL url, ResourceBundle resourceBundle) { public void initialize(URL url, ResourceBundle resourceBundle) {
rulesVBox.getChildren().addListener(new ListChangeListener<Node>() { rulesVBox.getChildren().addListener((ListChangeListener<Node>) change -> {
@Override
public void onChanged(Change<? extends Node> change) {
change.next(); // Get changes change.next(); // Get changes
if (change.wasAdded()){ // If something added, turn on ability to remove such rule if (change.wasAdded()){ // If something added, turn on ability to remove such rule
remRuleBtn.setDisable(false); remRuleBtn.setDisable(false);
@ -48,7 +46,6 @@ public class KbrdController implements Initializable {
remRuleBtn.setDisable(true); remRuleBtn.setDisable(true);
else // If the pane is empty, disable 'Remove' button. else // If the pane is empty, disable 'Remove' button.
RuleBox.select((RuleBox) rulesVBox.getChildren().get(rulesVBox.getChildren().size()-1)); RuleBox.select((RuleBox) rulesVBox.getChildren().get(rulesVBox.getChildren().size()-1));
}
}); });
addRuleBtn.setOnAction(ActionEvent -> rulesVBox.getChildren().add(new RuleBox())); addRuleBtn.setOnAction(ActionEvent -> rulesVBox.getChildren().add(new RuleBox()));
@ -89,6 +86,8 @@ public class KbrdController implements Initializable {
if (ledSingleRuleSet != null) if (ledSingleRuleSet != null)
ledSet.add(ledSingleRuleSet); ledSet.add(ledSingleRuleSet);
} }
if (keySet.size() == 0 && ledSet.size() == 0)
return null;
set.put("Key", keySet); set.put("Key", keySet);
set.put("Led", ledSet); set.put("Led", ledSet);
return set; return set;

View file

@ -2,20 +2,29 @@ package logiled.Controllers;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.Button; import javafx.scene.control.*;
import javafx.scene.control.Label;
import javafx.scene.control.MenuItem;
import logiled.About.AboutWindow; import logiled.About.AboutWindow;
import logiled.MessagesConsumer; import logiled.MessagesConsumer;
import logiled.USB.Communications; import logiled.USB.Communications;
import java.net.URL; import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.ResourceBundle; import java.util.ResourceBundle;
public class MainController implements Initializable { public class MainController implements Initializable {
@FXML @FXML
private KbrdController KbrdPaneController; private KeysLedsController KeysLedsController;
@FXML
private EffectsController EffectsController;
@FXML
private TabPane MainTabPane;
/*
@FXML
private Tab KeyLedTab, EffectsTab;
*/
@FXML @FXML
private Button applyBtn; private Button applyBtn;
@ -24,6 +33,8 @@ public class MainController implements Initializable {
@FXML @FXML
private MenuItem aboutMenuItem; private MenuItem aboutMenuItem;
@Override @Override
public void initialize(URL url, ResourceBundle resourceBundle) { public void initialize(URL url, ResourceBundle resourceBundle) {
aboutMenuItem.setOnAction(actionEvent -> new AboutWindow()); aboutMenuItem.setOnAction(actionEvent -> new AboutWindow());
@ -31,10 +42,16 @@ public class MainController implements Initializable {
MessagesConsumer.getInstance().start(); MessagesConsumer.getInstance().start();
applyBtn.setOnAction(actionEvent -> { applyBtn.setOnAction(actionEvent -> {
Communications communications = new Communications(KbrdPaneController.getRules()); if (MainTabPane.getSelectionModel().getSelectedItem().getId().equals("KeyLedTab")) {
HashMap<String, List<byte[][]>> rules = KeysLedsController.getRules();
if (rules == null)
return;
Communications communications = new Communications(rules);
Thread commThread = new Thread(communications); Thread commThread = new Thread(communications);
commThread.setDaemon(true); commThread.setDaemon(true);
commThread.start(); commThread.start();
}
//else if (MainTabPane.getSelectionModel().getSelectedItem().getId().equals("EffectsTab")) { // todo }
}); });
} }
} }

View file

@ -36,9 +36,9 @@ public class MainFx extends Application {
); );
primaryStage.setTitle("LogiLed "+appVersion); primaryStage.setTitle("LogiLed "+appVersion);
primaryStage.setMinWidth(1160); primaryStage.setMinWidth(1215);
primaryStage.setMinHeight(550); primaryStage.setMinHeight(550);
Scene mainScene = new Scene(root, 1160, 525); Scene mainScene = new Scene(root, 1215, 525);
mainScene.getStylesheets().add("/light.css"); mainScene.getStylesheets().add("/light.css");
primaryStage.setScene(mainScene); primaryStage.setScene(mainScene);
primaryStage.show(); primaryStage.show();

View file

@ -12,30 +12,98 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
public class Communications implements Runnable{ public class Communications implements Runnable{
// Keys and indicators individual settings
private static final byte[] commit = { private static final byte[] commit = {
0x11, (byte) 0xff, 0x0c, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, (byte) 0xff, 0x0c, 0x5a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00
}; };
private static final byte[] indicators = { // we have 2 leds on G513 private static final byte[] indicators = { // we have 2 leds on G513
// KEY RED GRN BLU -//-
0x12, (byte) 0xff, 0x0c, 0x3a, 0x00, 0x40, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, (byte) 0xff, 0x0c, 0x3a, 0x00, 0x40, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}; };
private static final byte[] keys = { // Can store 14 rules private static final byte[] keys = { // Can store 14 rules
// LED RED GRN BLU -//-
0x12, (byte) 0xff, 0x0c, 0x3a, 0x00, 0x01, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, (byte) 0xff, 0x0c, 0x3a, 0x00, 0x01, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}; };
// -========= Effects =========-
private static final byte[] disable_colors = {
0x11, (byte) 0xff, 0x0d, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
private static final byte[] constant_color = {
// RED GRN BLU
0x11, (byte) 0xff, 0x0d, 0x3c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
private static final byte[] wave_horizontal = {
// !! !!
0x11, (byte) 0xff, 0x0d, 0x3c, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x64, 0x00,
0x00, 0x00, 0x00, 0x00
};
private static final byte[] wave_vertical = {
// !! !!
0x11, (byte) 0xff, 0x0d, 0x3c, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x64, 0x00,
0x00, 0x00, 0x00, 0x00
};
private static final byte[] wave_center_to_edge = {
// !! !!
0x11, (byte) 0xff, 0x0d, 0x3c, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x64, 0x00,
0x00, 0x00, 0x00, 0x00
};
private static final byte[] wave_horizontal_reverse = {
// !! !!
0x11, (byte) 0xff, 0x0d, 0x3c, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x64, 0x00,
0x00, 0x00, 0x00, 0x00
};
private static final byte[] wave_vertical_reverse = {
// !! !!
0x11, (byte) 0xff, 0x0d, 0x3c, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x64, 0x00,
0x00, 0x00, 0x00, 0x00
};
private static final byte[] wave_edge_to_center = {
// !! !!
0x11, (byte) 0xff, 0x0d, 0x3c, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x64, 0x00,
0x00, 0x00, 0x00, 0x00
};
private static final byte[] cycle = {
// !! !!
0x11, (byte) 0xff, 0x0d, 0x3c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
private static final byte[] breathe = {
// RED GRN BLU !! !!
0x11, (byte) 0xff, 0x0d, 0x3c, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
private static final byte[] cirles_on_press = {
// RED GRN BLU ms
0x11, (byte) 0xff, 0x0d, 0x3c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
// Game-key settings
//private static final byte[] game_key_rule
private static final byte[] game_key_set_default = {
0x11, (byte) 0xff, 0x03, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
private DeviceHandle handler; private DeviceHandle handler;
// What would be sent to keyboard // What would be sent to keyboard
private List<byte[]> keyLedCommands; private List<byte[]> keyLedCommands;
/**
* Used to set keys & leds
* @param keyLedSet : set of rules, always not empty and not null
* */
public Communications(HashMap<String, List<byte[][]>> keyLedSet){ public Communications(HashMap<String, List<byte[][]>> keyLedSet){
keyLedCommands = new ArrayList<>(); keyLedCommands = new ArrayList<>();
@ -71,8 +139,7 @@ public class Communications implements Runnable{
if (appendTo > 8) if (appendTo > 8)
keyLedCommands.add(Arrays.copyOfRange(command, 0, command.length)); keyLedCommands.add(Arrays.copyOfRange(command, 0, command.length));
// If any command has been added to chain, add commit command to the end // Add commit command to the end
if (keyLedCommands.size() > 0)
keyLedCommands.add(commit); keyLedCommands.add(commit);
} }
@ -128,3 +195,31 @@ public class Communications implements Runnable{
return false; return false;
} }
} }
/*
ANY
0x11, 0xff, ???, 0x3c
waves
cwave
!! !!
0x11, 0xff, 0x0d, 0x3c, 0x00, 0x04, 0x56, 0x00 0x00, ----, ----, ----, ----, ====, 0x64, ????, ?!!?, 0x00, 0x00, 0x00
hwave
vwave
!! !!
0x11, 0xff, 0x0d, 0x3c, 0x00, 0x04, 0x55, 0x00 0x00, ----, ----, ----, ----, ====, 0x64, ????, ?!!?, 0x00, 0x00, 0x00
cycle
!! !!
0x11, 0xff, 0x0d, 0x3c, 0x00, 0x03, 0x55, 0x00 0x00, ----, ----, ----, ----, 0x00, 0x64, ????, ?!!?, 0x00, 0x00, 0x00
breathing
0x11, 0xff, 0x0d, 0x3c, 0x00, 0x02, RED_, GRN_, BLU_ ----, ----, ----, ----, 0x00, 0x64, ????, ?!!?, 0x00, 0x00, 0x00
----------------------
hwave - new
11 ff 0d 3c 00 04 00 00 00 00 00 00 e8 06 64 03 00 00 00 00
* */

View file

@ -34,7 +34,7 @@
</VBox> </VBox>
</children> </children>
</HBox> </HBox>
<Hyperlink fx:id="gitHubHLink" text="https://github.com/developersu/LoLed" underline="true" wrapText="true"> <Hyperlink fx:id="gitHubHLink" text="https://github.com/developersu/LogiLed" underline="true" wrapText="true">
<graphic> <graphic>
<SVGPath content="m 16.516036,0.10629161 c -8.996094,0 -16.28906297,7.29296899 -16.28906297,16.28906239 0,7.195312 4.66796897,13.300781 11.14062597,15.457031 0.8125,0.148438 1.113281,-0.355469 1.113281,-0.785156 0,-0.386719 -0.01563,-1.410156 -0.02344,-2.769532 C 7.92619,29.282073 6.969159,26.114104 6.969159,26.114104 6.23088,24.231291 5.160567,23.731291 5.160567,23.731291 3.680099,22.719573 5.273849,22.739104 5.273849,22.739104 c 1.632812,0.117187 2.492187,1.679687 2.492187,1.679687 1.453125,2.488282 3.816406,1.769532 4.742187,1.355469 0.148438,-1.054687 0.570313,-1.773437 1.035157,-2.179687 -3.617188,-0.410157 -7.421875,-1.808594 -7.421875,-8.050782 0,-1.777344 0.636718,-3.230468 1.679687,-4.371094 -0.167969,-0.414062 -0.726562,-2.0664056 0.15625,-4.3124994 0,0 1.371094,-0.4375 4.480469,1.6718758 1.300781,-0.3632818 2.695312,-0.5429688 4.078125,-0.5468758 1.382813,0.00391 2.777344,0.183594 4.078125,0.5468758 3.109375,-2.1093758 4.476562,-1.6718758 4.476562,-1.6718758 0.886719,2.2460938 0.328126,3.8984374 0.160157,4.3124994 1.046875,1.140626 1.675781,2.59375 1.675781,4.371094 0,6.257813 -3.808594,7.632813 -7.4375,8.039063 0.585938,0.5 1.105469,1.496093 1.105469,3.015625 0,2.175781 -0.01953,3.933594 -0.01953,4.46875 0,0.433594 0.292968,0.941406 1.121093,0.785156 C 28.141037,29.692229 32.8051,23.590666 32.8051,16.395354 32.8051,7.3992606 25.512131,0.10629161 16.516037,0.10629161" fill="#171515" /> <SVGPath content="m 16.516036,0.10629161 c -8.996094,0 -16.28906297,7.29296899 -16.28906297,16.28906239 0,7.195312 4.66796897,13.300781 11.14062597,15.457031 0.8125,0.148438 1.113281,-0.355469 1.113281,-0.785156 0,-0.386719 -0.01563,-1.410156 -0.02344,-2.769532 C 7.92619,29.282073 6.969159,26.114104 6.969159,26.114104 6.23088,24.231291 5.160567,23.731291 5.160567,23.731291 3.680099,22.719573 5.273849,22.739104 5.273849,22.739104 c 1.632812,0.117187 2.492187,1.679687 2.492187,1.679687 1.453125,2.488282 3.816406,1.769532 4.742187,1.355469 0.148438,-1.054687 0.570313,-1.773437 1.035157,-2.179687 -3.617188,-0.410157 -7.421875,-1.808594 -7.421875,-8.050782 0,-1.777344 0.636718,-3.230468 1.679687,-4.371094 -0.167969,-0.414062 -0.726562,-2.0664056 0.15625,-4.3124994 0,0 1.371094,-0.4375 4.480469,1.6718758 1.300781,-0.3632818 2.695312,-0.5429688 4.078125,-0.5468758 1.382813,0.00391 2.777344,0.183594 4.078125,0.5468758 3.109375,-2.1093758 4.476562,-1.6718758 4.476562,-1.6718758 0.886719,2.2460938 0.328126,3.8984374 0.160157,4.3124994 1.046875,1.140626 1.675781,2.59375 1.675781,4.371094 0,6.257813 -3.808594,7.632813 -7.4375,8.039063 0.585938,0.5 1.105469,1.496093 1.105469,3.015625 0,2.175781 -0.01953,3.933594 -0.01953,4.46875 0,0.433594 0.292968,0.941406 1.121093,0.785156 C 28.141037,29.692229 32.8051,23.590666 32.8051,16.395354 32.8051,7.3992606 25.512131,0.10629161 16.516037,0.10629161" fill="#171515" />
</graphic> </graphic>

View file

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.ColorPicker?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.control.Slider?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<VBox spacing="5.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="logiled.Controllers.EffectsController">
<padding>
<Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
</padding>
<children>
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<RadioButton mnemonicParsing="false" prefWidth="210.0" text="%effect_disable">
<toggleGroup>
<ToggleGroup fx:id="effectsToggleGrp" />
</toggleGroup></RadioButton>
</children>
</HBox>
<Separator prefWidth="200.0" />
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<RadioButton mnemonicParsing="false" prefWidth="210.0" selected="true" text="%effect_constant" toggleGroup="$effectsToggleGrp" />
<ColorPicker />
</children>
</HBox>
<Separator prefWidth="200.0" />
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<RadioButton mnemonicParsing="false" prefWidth="210.0" text="%effect_breath" toggleGroup="$effectsToggleGrp" />
<ColorPicker />
</children>
</HBox>
<Separator prefWidth="200.0" />
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<RadioButton mnemonicParsing="false" prefWidth="210.0" text="%effect_cirles_on_press" toggleGroup="$effectsToggleGrp" />
<Slider blockIncrement="100.0" majorTickUnit="5000.0" max="5000.0" min="1000.0" minorTickCount="1000" prefWidth="300.0" value="1000.0" />
<ColorPicker />
</children>
</HBox>
<Separator prefWidth="200.0" />
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<RadioButton mnemonicParsing="false" prefWidth="210.0" text="%effect_cycle" toggleGroup="$effectsToggleGrp" />
<Slider majorTickUnit="200.0" max="200.0" min="20.0" minorTickCount="20" prefWidth="300.0" value="20.0" />
</children>
</HBox>
<Separator prefWidth="200.0" />
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<RadioButton mnemonicParsing="false" prefWidth="210.0" text="%effect_wave_horizontal" toggleGroup="$effectsToggleGrp" />
<Slider blockIncrement="100.0" majorTickUnit="5000.0" max="5000.0" min="1000.0" minorTickCount="1000" prefWidth="300.0" value="1000.0" />
</children>
</HBox>
<Separator prefWidth="200.0" />
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<RadioButton mnemonicParsing="false" prefWidth="210.0" text="%effect_wave_vertical" toggleGroup="$effectsToggleGrp" />
<Slider blockIncrement="100.0" majorTickUnit="5000.0" max="5000.0" min="1000.0" minorTickCount="1000" prefWidth="300.0" value="1000.0" />
</children>
</HBox>
<Separator prefWidth="200.0" />
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<RadioButton mnemonicParsing="false" prefWidth="210.0" text="%effect_wave_center_to_edge" toggleGroup="$effectsToggleGrp" />
<Slider blockIncrement="100.0" majorTickUnit="5000.0" max="5000.0" min="1000.0" minorTickCount="1000" prefWidth="300.0" value="1000.0" />
</children>
</HBox>
<Separator prefWidth="200.0" />
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<RadioButton mnemonicParsing="false" prefWidth="210.0" text="%effect_wave_horizontal_reverse" toggleGroup="$effectsToggleGrp" />
<Slider blockIncrement="100.0" majorTickUnit="5000.0" max="5000.0" min="1000.0" minorTickCount="1000" prefWidth="300.0" value="1000.0" />
</children>
</HBox>
<Separator prefWidth="200.0" />
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<RadioButton mnemonicParsing="false" prefWidth="210.0" text="%effect_wave_vertical_reverse" toggleGroup="$effectsToggleGrp" />
<Slider blockIncrement="100.0" majorTickUnit="5000.0" max="5000.0" min="1000.0" minorTickCount="1000" prefWidth="300.0" value="1000.0" />
</children>
</HBox>
<Separator prefWidth="200.0" />
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<RadioButton mnemonicParsing="false" prefWidth="210.0" text="%effect_wave_edge_to_center" toggleGroup="$effectsToggleGrp" />
<Slider blockIncrement="100.0" majorTickUnit="5000.0" max="5000.0" min="1000.0" minorTickCount="1000" prefWidth="300.0" value="1000.0" />
</children>
</HBox>
</children>
</VBox>

View file

@ -13,7 +13,7 @@
<?import javafx.scene.shape.SVGPath?> <?import javafx.scene.shape.SVGPath?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<VBox spacing="5.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="logiled.Controllers.KbrdController"> <VBox spacing="5.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="logiled.Controllers.KeysLedsController">
<children> <children>
<ToolBar> <ToolBar>
<items> <items>

View file

@ -7,8 +7,12 @@
<?import javafx.scene.control.MenuBar?> <?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?> <?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.ScrollPane?> <?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.SeparatorMenuItem?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.control.ToolBar?>
<?import javafx.scene.control.Tooltip?>
<?import javafx.scene.layout.BorderPane?> <?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.SVGPath?> <?import javafx.scene.shape.SVGPath?>
@ -19,12 +23,44 @@
<menus> <menus>
<Menu mnemonicParsing="false" text="%menu_File"> <Menu mnemonicParsing="false" text="%menu_File">
<items> <items>
<MenuItem mnemonicParsing="false" text="Close" /> <MenuItem mnemonicParsing="false" text="todo">
<graphic>
<SVGPath content="M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z" />
</graphic>
</MenuItem>
<Menu mnemonicParsing="false" text="Unspecified Menu">
<items>
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem mnemonicParsing="false" text="Action 1" />
</items>
<graphic>
<SVGPath content="M13.5,8H12V13L16.28,15.54L17,14.33L13.5,12.25V8M13,3A9,9 0 0,0 4,12H1L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3" />
</graphic>
</Menu>
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem mnemonicParsing="false" text="todo">
<graphic>
<SVGPath content="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z" />
</graphic>
</MenuItem>
<MenuItem mnemonicParsing="false" text="todo">
<graphic>
<SVGPath content="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z" />
</graphic>
</MenuItem>
<SeparatorMenuItem mnemonicParsing="false" />
<MenuItem mnemonicParsing="false" text="todo">
<graphic>
<SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" />
</graphic></MenuItem>
</items> </items>
</Menu> </Menu>
<Menu mnemonicParsing="false" text="%menu_Edit"> <Menu mnemonicParsing="false" text="%menu_Edit">
<items> <items>
<MenuItem mnemonicParsing="false" text="Delete" /> <MenuItem mnemonicParsing="false" text="todo">
<graphic>
<SVGPath content="M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z" />
</graphic></MenuItem>
</items> </items>
</Menu> </Menu>
<Menu mnemonicParsing="false" text="%menu_Help"> <Menu mnemonicParsing="false" text="%menu_Help">
@ -55,17 +91,42 @@
<center> <center>
<VBox BorderPane.alignment="CENTER"> <VBox BorderPane.alignment="CENTER">
<children> <children>
<HBox spacing="5.0"> <ToolBar>
<children> <items>
<Button fx:id="applyBtn" mnemonicParsing="false" text="%btn_apply" /> <Button fx:id="applyBtn" mnemonicParsing="false">
</children> <tooltip>
<padding> <Tooltip text="%btn_apply" />
<Insets bottom="3.0" left="3.0" right="3.0" top="3.0" /> </tooltip>
</padding> <graphic>
</HBox> <SVGPath content="M14,10H2V12H14V10M14,6H2V8H14V6M2,16H10V14H2V16M21.5,11.5L23,13L16,20L11.5,15.5L13,14L16,17L21.5,11.5Z" />
</graphic>
</Button>
</items>
</ToolBar>
<TabPane fx:id="MainTabPane" side="LEFT" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS">
<tabs>
<Tab fx:id="KeyLedTab">
<content>
<ScrollPane fitToWidth="true"> <ScrollPane fitToWidth="true">
<fx:include fx:id="KbrdPane" source="KbrdPane.fxml" VBox.vgrow="ALWAYS" /> <fx:include fx:id="KeysLeds" source="KeysLedsPane.fxml" VBox.vgrow="ALWAYS" />
</ScrollPane> </ScrollPane>
</content>
<graphic>
<SVGPath content="M12,6A6,6 0 0,1 18,12C18,14.22 16.79,16.16 15,17.2V19A1,1 0 0,1 14,20H10A1,1 0 0,1 9,19V17.2C7.21,16.16 6,14.22 6,12A6,6 0 0,1 12,6M14,21V22A1,1 0 0,1 13,23H11A1,1 0 0,1 10,22V21H14M20,11H23V13H20V11M1,11H4V13H1V11M13,1V4H11V1H13M4.92,3.5L7.05,5.64L5.63,7.05L3.5,4.93L4.92,3.5M16.95,5.63L19.07,3.5L20.5,4.93L18.37,7.05L16.95,5.63Z" />
</graphic>
</Tab>
<Tab fx:id="EffectsTab">
<content>
<ScrollPane fitToWidth="true">
<fx:include fx:id="Effects" source="EffectsPane.fxml" VBox.vgrow="ALWAYS" />
</ScrollPane>
</content>
<graphic>
<SVGPath content="M7.5,5.6L5,7L6.4,4.5L5,2L7.5,3.4L10,2L8.6,4.5L10,7L7.5,5.6M19.5,15.4L22,14L20.6,16.5L22,19L19.5,17.6L17,19L18.4,16.5L17,14L19.5,15.4M22,2L20.6,4.5L22,7L19.5,5.6L17,7L18.4,4.5L17,2L19.5,3.4L22,2M13.34,12.78L15.78,10.34L13.66,8.22L11.22,10.66L13.34,12.78M14.37,7.29L16.71,9.63C17.1,10 17.1,10.65 16.71,11.04L5.04,22.71C4.65,23.1 4,23.1 3.63,22.71L1.29,20.37C0.9,20 0.9,19.35 1.29,18.96L12.96,7.29C13.35,6.9 14,6.9 14.37,7.29Z" />
</graphic>
</Tab>
</tabs>
</TabPane>
</children> </children>
</VBox> </VBox>
</center> </center>

View file

@ -116,10 +116,10 @@
-fx-fill: #2c2c2c; -fx-fill: #2c2c2c;
} }
.tab-pane .tab:selected SVGPath, .tab-pane .tab:selected:hover SVGPath{ .tab-pane .tab:selected SVGPath, .tab-pane .tab:selected:hover SVGPath{
-fx-fill: #289de8; -fx-fill: #141414;
} }
.tab-pane .tab:hover SVGPath{ .tab-pane .tab:hover SVGPath{
-fx-fill: #1c6fa2; -fx-fill: #2b2b2b;
} }
.tab-pane .tab{ .tab-pane .tab{
-fx-background-color: #fefefe; -fx-background-color: #fefefe;

View file

@ -680,5 +680,16 @@ into proprietary programs. If your program is a subroutine library, you\n\
may consider it more useful to permit linking proprietary applications with\n\ may consider it more useful to permit linking proprietary applications with\n\
the library. If this is what you want to do, use the GNU Lesser General\n\ the library. If this is what you want to do, use the GNU Lesser General\n\
Public License instead of this License. But first, please read\n\ Public License instead of this License. But first, please read\n\
<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n <http://www.gnu.org/philosophy/why-not-lgpl.html>.
menu_item_about=About menu_item_about=About
effect_disable=Disable backlight
effect_constant=Constant color
effect_breath=Breath
effect_cirles_on_press=Circles on press
effect_cycle=Cycle
effect_wave_horizontal=Wave horizontal
effect_wave_vertical=Wave vertical
effect_wave_center_to_edge=Wave from center to edges
effect_wave_horizontal_reverse=Wave horizontal (reverse)
effect_wave_vertical_reverse=Wave vertical (reverse)
effect_wave_edge_to_center=Wave from edges to center

View file

@ -8,3 +8,14 @@ about_LicenseLbl=Лицензионное соглашение
about_Lbl_3=Разработано и поддерживается Дмитрием Исаенко. about_Lbl_3=Разработано и поддерживается Дмитрием Исаенко.
menu_item_about=О приложении menu_item_about=О приложении
about_Lbl_1=LoLed распространяется по условиям лицензии GNU GPLv3. about_Lbl_1=LoLed распространяется по условиям лицензии GNU GPLv3.
effect_disable=Отключить подсветку
effect_constant=Постоянный цвет
effect_breath=Дыхание
effect_cirles_on_press=Круги при нажатии
effect_cycle=Цикл
effect_wave_horizontal=Волна по-горизонтали
effect_wave_horizontal_reverse=Волна по-горизонтали (обратная)
effect_wave_vertical=Волна вертикальная
effect_wave_vertical_reverse=Волна вертикальная (обратная)
effect_wave_center_to_edge=Волна от центра к краям
effect_wave_edge_to_center=Волна от краёв к центру