@@ -30,23 +30,27 @@ public class DataSql {
3030 " \" info_dir\" integer(6),\n " +
3131 " \" info_shadow\" integer(1),\n " +
3232 " \" info_enable\" integer(1),\n " +
33+ " \" info_alpha\" float,\n " +
3334 " \" lyric_x\" integer(6),\n " +
3435 " \" lyric_y\" integer(6),\n " +
3536 " \" lyric_color\" integer(20),\n " +
3637 " \" lyric_dir\" integer(6),\n " +
3738 " \" lyric_shadow\" integer(1),\n " +
3839 " \" lyric_enable\" integer(1),\n " +
40+ " \" lyric_alpha\" float,\n " +
3941 " \" list_x\" integer(6),\n " +
4042 " \" list_y\" integer(6),\n " +
4143 " \" list_color\" integer(20),\n " +
4244 " \" list_dir\" integer(6),\n " +
4345 " \" list_shadow\" integer(1),\n " +
4446 " \" list_enable\" integer(1),\n " +
47+ " \" list_alpha\" float,\n " +
4548 " \" pic_x\" integer(6),\n " +
4649 " \" pic_y\" integer(6),\n " +
4750 " \" pic_dir\" integer(6),\n " +
4851 " \" pic_size\" integer(6),\n " +
4952 " \" pic_enable\" integer(1),\n " +
53+ " \" pic_alpha\" float,\n " +
5054 " \" pic_rotate\" integer(1),\n " +
5155 " \" pic_rotate_speed\" integer(6)\n " +
5256 ");" ;
@@ -161,22 +165,26 @@ private static void update(String name, HudPosObj hud) {
161165 "info_dir=" + hud .info .dir .ordinal () + "," +
162166 "info_shadow=" + (hud .info .shadow ? 1 : 0 ) + "," +
163167 "info_enable=" + (hud .info .enable ? 1 : 0 ) + "," +
168+ "info_alpha=" + hud .info .alpha + "," +
164169 "lyric_x=" + hud .lyric .x + "," +
165170 "lyric_y=" + hud .lyric .y + "," +
166171 "lyric_color=" + hud .lyric .color + "," +
167172 "lyric_dir=" + hud .lyric .dir .ordinal () + "," +
168173 "lyric_shadow=" + (hud .lyric .shadow ? 1 : 0 ) + "," +
169174 "lyric_enable=" + (hud .lyric .enable ? 1 : 0 ) + "," +
175+ "lyric_alpha=" + hud .lyric .alpha + "," +
170176 "list_x=" + hud .list .x + "," +
171177 "list_y=" + hud .list .y + "," +
172178 "list_color=" + hud .list .color + "," +
173179 "list_dir=" + hud .list .dir .ordinal () + "," +
174180 "list_shadow=" + (hud .list .shadow ? 1 : 0 ) + "," +
175181 "list_enable=" + (hud .list .enable ? 1 : 0 ) + "," +
182+ "list_alpha=" + hud .list .alpha + "," +
176183 "pic_x=" + hud .pic .x + "," +
177184 "pic_y=" + hud .pic .y + "," +
178185 "pic_dir=" + hud .pic .dir .ordinal () + "," +
179186 "pic_enable=" + (hud .pic .enable ? 1 : 0 ) + "," +
187+ "pic_alpha=" + hud .pic .alpha + "," +
180188 "pic_size=" + hud .pic .color + "," +
181189 "pic_rotate=" + (hud .pic .shadow ? 1 : 0 ) + "," +
182190 "pic_rotate_speed=" + hud .picRotateSpeed + " WHERE name='" + name + "'" ;
@@ -205,11 +213,13 @@ public static void addUser(String name, HudPosObj hud) {
205213 update (name , hud );
206214 } else {
207215 Statement stat = connection .createStatement ();
208- sql = "INSERT INTO allmusic (name,info_x,info_y," +
209- "info_enable,lyric_x,lyric_y,lyric_enable,list_x,list_y,list_enable," +
216+ sql = "INSERT INTO allmusic (name," +
217+ "info_x,info_y,info_enable,lyric_x,lyric_y,lyric_enable," +
218+ "list_x,list_y,list_enable," +
210219 "pic_x,pic_y,pic_enable,pic_size,pic_rotate,pic_rotate_speed," +
211220 "info_color,info_dir,info_shadow,lyric_color,lyric_dir," +
212- "lyric_shadow,list_color,list_dir,list_shadow,pic_dir)" +
221+ "lyric_shadow,list_color,list_dir,list_shadow,pic_dir," +
222+ "info_alpha,lyric_alpha,list_alpha,pic_alpha)" +
213223 "VALUES ('" + name + "'," +
214224 hud .info .x + "," +
215225 hud .info .y + "," +
@@ -235,7 +245,11 @@ public static void addUser(String name, HudPosObj hud) {
235245 hud .list .color + "," +
236246 hud .list .dir .ordinal () + "," +
237247 (hud .list .shadow ? 1 : 0 ) + "," +
238- hud .pic .dir .ordinal () +
248+ hud .pic .dir .ordinal () + "," +
249+ hud .info .alpha + "," +
250+ hud .lyric .alpha + "," +
251+ hud .list .alpha + "," +
252+ hud .pic .alpha +
239253 ")" ;
240254 stat .execute (sql );
241255 stat .close ();
@@ -258,7 +272,8 @@ public static HudPosObj readHud(String name) {
258272 ResultSet set = stat .executeQuery ("SELECT info_x,info_y,info_enable,lyric_x," +
259273 "lyric_y,lyric_enable,list_x,list_y,list_enable,pic_x,pic_y,pic_enable,pic_size," +
260274 "pic_rotate,pic_rotate_speed,info_color,info_dir,info_shadow,lyric_color," +
261- "lyric_dir,lyric_shadow,list_color,list_dir,list_shadow,pic_dir FROM allmusic WHERE name='" + name + "'" );
275+ "lyric_dir,lyric_shadow,list_color,list_dir,list_shadow,pic_dir," +
276+ "info_alpha,lyric_alpha,list_alpha,pic_alpha FROM allmusic WHERE name='" + name + "'" );
262277 HudDirType [] vas = HudDirType .values ();
263278 HudPosObj obj = null ;
264279 if (set .next ()) {
@@ -296,6 +311,10 @@ public static HudPosObj readHud(String name) {
296311 obj .list .dir = vas [set .getInt (23 )];
297312 obj .list .shadow = set .getInt (24 ) == 1 ;
298313 obj .pic .dir = vas [set .getInt (25 )];
314+ obj .info .alpha = set .getFloat (26 );
315+ obj .lyric .alpha = set .getFloat (27 );
316+ obj .list .alpha = set .getFloat (28 );
317+ obj .pic .alpha = set .getFloat (29 );
299318 }
300319 stat .close ();
301320
0 commit comments