mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
New splashscreen and about images
This commit is contained in:
@ -1516,7 +1516,7 @@ public class Base {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public void handleAbout() {
|
public void handleAbout() {
|
||||||
final Image image = getLibImage("about.jpg", activeEditor);
|
final Image image = getLibImage("about.png", activeEditor);
|
||||||
final Window window = new Window(activeEditor) {
|
final Window window = new Window(activeEditor) {
|
||||||
public void paint(Graphics g) {
|
public void paint(Graphics g) {
|
||||||
g.drawImage(image, 0, 0, null);
|
g.drawImage(image, 0, 0, null);
|
||||||
@ -1527,7 +1527,7 @@ public class Base {
|
|||||||
|
|
||||||
g.setFont(new Font("SansSerif", Font.PLAIN, 11));
|
g.setFont(new Font("SansSerif", Font.PLAIN, 11));
|
||||||
g.setColor(Color.white);
|
g.setColor(Color.white);
|
||||||
g.drawString(BaseNoGui.VERSION_NAME, 50, 30);
|
g.drawString(BaseNoGui.VERSION_NAME, 33, 20);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
window.addMouseListener(new MouseAdapter() {
|
window.addMouseListener(new MouseAdapter() {
|
||||||
@ -1539,6 +1539,7 @@ public class Base {
|
|||||||
int h = image.getHeight(activeEditor);
|
int h = image.getHeight(activeEditor);
|
||||||
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
|
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
|
||||||
window.setBounds((screen.width - w) / 2, (screen.height - h) / 2, w, h);
|
window.setBounds((screen.width - w) / 2, (screen.height - h) / 2, w, h);
|
||||||
|
window.setLocationRelativeTo(activeEditor);
|
||||||
window.setVisible(true);
|
window.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2173,11 +2174,10 @@ public class Base {
|
|||||||
* Return an Image object from inside the Processing lib folder.
|
* Return an Image object from inside the Processing lib folder.
|
||||||
*/
|
*/
|
||||||
static public Image getLibImage(String name, Component who) {
|
static public Image getLibImage(String name, Component who) {
|
||||||
Image image = null;
|
|
||||||
Toolkit tk = Toolkit.getDefaultToolkit();
|
Toolkit tk = Toolkit.getDefaultToolkit();
|
||||||
|
|
||||||
File imageLocation = new File(getContentFile("lib"), name);
|
File imageLocation = new File(getContentFile("lib"), name);
|
||||||
image = tk.getImage(imageLocation.getAbsolutePath());
|
Image image = tk.getImage(imageLocation.getAbsolutePath());
|
||||||
MediaTracker tracker = new MediaTracker(who);
|
MediaTracker tracker = new MediaTracker(who);
|
||||||
tracker.addImage(image, 0);
|
tracker.addImage(image, 0);
|
||||||
try {
|
try {
|
||||||
|
@ -853,11 +853,11 @@
|
|||||||
|
|
||||||
<copy todir="windows/work">
|
<copy todir="windows/work">
|
||||||
<fileset dir="windows/launcher"
|
<fileset dir="windows/launcher"
|
||||||
includes="about.bmp, application.ico, config.xml, config_debug.xml, arduino.l4j.ini"/>
|
includes="application.ico, config.xml, config_debug.xml, arduino.l4j.ini"/>
|
||||||
</copy>
|
</copy>
|
||||||
<launch4j configFile="windows/work/config.xml" />
|
<launch4j configFile="windows/work/config.xml" />
|
||||||
<launch4j configFile="windows/work/config_debug.xml" />
|
<launch4j configFile="windows/work/config_debug.xml" />
|
||||||
<delete dir="windows/work" includes="about.bmp, application.ico, config.xml, config_debug.xml" />
|
<delete dir="windows/work" includes="application.ico, config.xml, config_debug.xml" />
|
||||||
<copy file="windows/work/arduino.l4j.ini" tofile="windows/work/arduino_debug.l4j.ini" />
|
<copy file="windows/work/arduino.l4j.ini" tofile="windows/work/arduino_debug.l4j.ini" />
|
||||||
|
|
||||||
<!-- cygwin requires html, dll, and exe to have the +x flag -->
|
<!-- cygwin requires html, dll, and exe to have the +x flag -->
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 104 KiB |
BIN
build/shared/lib/about.png
Normal file
BIN
build/shared/lib/about.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 26 KiB |
Binary file not shown.
Before Width: | Height: | Size: 457 KiB |
Reference in New Issue
Block a user