Skip to content

Commit

Permalink
Made custom UI graphics
Browse files Browse the repository at this point in the history
  • Loading branch information
Ohmnivore committed Jun 11, 2014
1 parent 19a915e commit 1b10e60
Show file tree
Hide file tree
Showing 65 changed files with 1,320 additions and 351 deletions.
Binary file modified Client/assets/gfx/ui/palma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Client/assets/gfx/ui/palma.psd
Binary file not shown.
Binary file added Client/assets/gfx/ui/palma3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Client/assets/gfx/ui/title_back.png
Binary file not shown.
Binary file added Client/assets/images_ui/button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Client/assets/images_ui/button_thin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Client/assets/images_ui/chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Client/assets/images_ui/tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Client/assets/images_ui/tab_back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Client/assets/xml/message_popup.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8" ?>
<data>
</data>
Binary file modified Client/export/windows/cpp/bin/SkullRush.exe
Binary file not shown.
Binary file modified Client/export/windows/cpp/bin/assets/gfx/ui/palma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Client/export/windows/cpp/bin/assets/gfx/ui/palma.psd
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Client/export/windows/cpp/bin/assets/xml/message_popup.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8" ?>
<data>
</data>
2 changes: 1 addition & 1 deletion Client/export/windows/cpp/bin/config.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.2.3
version=0.3.2
name=Ohmnivore
team=1
ip=
Expand Down
2 changes: 1 addition & 1 deletion Client/export/windows/cpp/bin/manifest
Original file line number Diff line number Diff line change
@@ -1 +1 @@
aoy4:pathy34:assets%2Fdata%2Fdata-goes-here.txty4:typey4:TEXTy2:idR1goR0y29:assets%2Fgfx%2Fui%2Fpalma.pngR2y5:IMAGER4R5goR0y29:assets%2Fgfx%2Fui%2Fpalma.psdR2y6:BINARYR4R7goR0y34:assets%2Fgfx%2Fui%2Ftitle_back.pngR2R6R4R9goR0y36:assets%2Fimages%2Fimages-go-here.txtR2R3R4R10goR0y17:assets%2Flogo.psdR2R8R4R11goR0y36:assets%2Fmusic%2Fmusic-goes-here.txtR2R3R4R12goR0y36:assets%2Fsounds%2Fsounds-go-here.txtR2R3R4R13goR0y30:assets%2Fxml%2Fempty_popup.xmlR2R3R4R14goR0y23:assets%2Fxml%2Fhome.xmlR2R3R4R15goR0y30:assets%2Fxml%2F_ui_globals.xmlR2R3R4R16goR0y32:shared%2Fimages%2Fbackground.pngR2R6R4R17goR0y34:shared%2Fimages%2Fbackground_s.pngR2R6R4R18goR0y27:shared%2Fimages%2Fblank.pngR2R6R4R19goR0y27:shared%2Fimages%2Fcrate.pngR2R6R4R20goR0y32:shared%2Fimages%2Fcrosshairs.pngR2R6R4R21goR0y33:shared%2Fimages%2Fcrosshairs2.pngR2R6R4R22goR0y39:shared%2Fimages%2Fexplosionparticle.pngR2R6R4R23goR0y28:shared%2Fimages%2Fflag_b.pngR2R6R4R24goR0y29:shared%2Fimages%2Fflag_bh.pngR2R6R4R25goR0y28:shared%2Fimages%2Fflag_g.pngR2R6R4R26goR0y29:shared%2Fimages%2Fflag_gh.pngR2R6R4R27goR0y28:shared%2Fimages%2Fflag_n.pngR2R6R4R28goR0y28:shared%2Fimages%2Fflag_r.pngR2R6R4R29goR0y29:shared%2Fimages%2Fflag_rh.pngR2R6R4R30goR0y28:shared%2Fimages%2Fflag_y.pngR2R6R4R31goR0y29:shared%2Fimages%2Fflag_yh.pngR2R6R4R32goR0y32:shared%2Fimages%2Fgridtiles2.pngR2R6R4R33goR0y32:shared%2Fimages%2Fgridtiles3.pngR2R6R4R34goR0y32:shared%2Fimages%2Fgridtiles4.pngR2R6R4R35goR0y25:shared%2Fimages%2Fgun.pngR2R6R4R36goR0y37:shared%2Fimages%2Fgun_eviscerator.pngR2R6R4R37goR0y44:shared%2Fimages%2Fgun_eviscerator_bullet.pngR2R6R4R38goR0y42:shared%2Fimages%2Fgun_eviscerator_icon.pngR2R6R4R39goR0y41:shared%2Fimages%2Fgun_launcher_bullet.pngR2R6R4R40goR0y39:shared%2Fimages%2Fgun_launcher_icon.pngR2R6R4R41goR0y37:shared%2Fimages%2Fgun_peacekeeper.pngR2R6R4R42goR0y44:shared%2Fimages%2Fgun_peacekeeper_bullet.pngR2R6R4R43goR0y42:shared%2Fimages%2Fgun_peacekeeper_icon.pngR2R6R4R44goR0y34:shared%2Fimages%2Fgun_splasher.pngR2R6R4R45goR0y41:shared%2Fimages%2Fgun_splasher_bullet.pngR2R6R4R46goR0y39:shared%2Fimages%2Fgun_splasher_icon.pngR2R6R4R47goR0y32:shared%2Fimages%2Fplayerblue.pngR2R6R4R48goR0y33:shared%2Fimages%2Fplayergreen.pngR2R6R4R49goR0y31:shared%2Fimages%2Fplayerred.pngR2R6R4R50goR0y34:shared%2Fimages%2Fplayeryellow.pngR2R6R4R51goR0y36:shared%2Fimages%2Fpowerup_health.pngR2R6R4R52goR0y32:shared%2Fimages%2Fscifitiles.pngR2R6R4R53goR0y37:shared%2Fimages%2Fscifitiles_copy.pngR2R6R4R54goR0y27:shared%2Fimages%2Ftrail.pngR2R6R4R55goR0y35:shared%2Ftiledefs%2Fscifitiles.jsonR2R3R4R56goR0y35:shared%2Ftiledefs%2FSkullSolid.tsetR2R3R4R57goR0y24:crashdumper%2F%2Fcpu.batR2R3R4R58goR0y24:crashdumper%2F%2Fgpu.batR2R3R4R59goR0y27:crashdumper%2F%2Fmemory.batR2R3R4R60goR0y23:crashdumper%2F%2Fos.batR2R3R4R61goR0y26:assets%2Fsounds%2Fbeep.oggR2y5:SOUNDR4R62goR0y28:assets%2Fsounds%2Fflixel.oggR2R63R4R64goR0y34:flixel%2Fflixel-ui%2Fimg%2Fbox.pngR2R6R4R65goR0y37:flixel%2Fflixel-ui%2Fimg%2Fbutton.pngR2R6R4R66goR0y48:flixel%2Fflixel-ui%2Fimg%2Fbutton_arrow_down.pngR2R6R4R67goR0y48:flixel%2Fflixel-ui%2Fimg%2Fbutton_arrow_left.pngR2R6R4R68goR0y49:flixel%2Fflixel-ui%2Fimg%2Fbutton_arrow_right.pngR2R6R4R69goR0y46:flixel%2Fflixel-ui%2Fimg%2Fbutton_arrow_up.pngR2R6R4R70goR0y42:flixel%2Fflixel-ui%2Fimg%2Fbutton_thin.pngR2R6R4R71goR0y44:flixel%2Fflixel-ui%2Fimg%2Fbutton_toggle.pngR2R6R4R72goR0y40:flixel%2Fflixel-ui%2Fimg%2Fcheck_box.pngR2R6R4R73goR0y41:flixel%2Fflixel-ui%2Fimg%2Fcheck_mark.pngR2R6R4R74goR0y37:flixel%2Fflixel-ui%2Fimg%2Fchrome.pngR2R6R4R75goR0y42:flixel%2Fflixel-ui%2Fimg%2Fchrome_flat.pngR2R6R4R76goR0y43:flixel%2Fflixel-ui%2Fimg%2Fchrome_inset.pngR2R6R4R77goR0y43:flixel%2Fflixel-ui%2Fimg%2Fchrome_light.pngR2R6R4R78goR0y44:flixel%2Fflixel-ui%2Fimg%2Fdropdown_mark.pngR2R6R4R79goR0y41:flixel%2Fflixel-ui%2Fimg%2Ffinger_big.pngR2R6R4R80goR0y43:flixel%2Fflixel-ui%2Fimg%2Ffinger_small.pngR2R6R4R81goR0y38:flixel%2Fflixel-ui%2Fimg%2Fhilight.pngR2R6R4R82goR0y36:flixel%2Fflixel-ui%2Fimg%2Finvis.pngR2R6R4R83goR0y41:flixel%2Fflixel-ui%2Fimg%2Fminus_mark.pngR2R6R4R84goR0y40:flixel%2Fflixel-ui%2Fimg%2Fplus_mark.pngR2R6R4R85goR0y36:flixel%2Fflixel-ui%2Fimg%2Fradio.pngR2R6R4R86goR0y40:flixel%2Fflixel-ui%2Fimg%2Fradio_dot.pngR2R6R4R87goR0y37:flixel%2Fflixel-ui%2Fimg%2Fswatch.pngR2R6R4R88goR0y34:flixel%2Fflixel-ui%2Fimg%2Ftab.pngR2R6R4R89goR0y39:flixel%2Fflixel-ui%2Fimg%2Ftab_back.pngR2R6R4R90goR0y39:flixel%2Fflixel-ui%2Fxml%2Fdefaults.xmlR2R3R4R91goR0y53:flixel%2Fflixel-ui%2Fxml%2Fdefault_loading_screen.xmlR2R3R4R92goR0y44:flixel%2Fflixel-ui%2Fxml%2Fdefault_popup.xmlR2R3R4R93gh
aoy4:pathy34:assets%2Fdata%2Fdata-goes-here.txty4:typey4:TEXTy2:idR1goR0y29:assets%2Fgfx%2Fui%2Fpalma.pngR2y5:IMAGER4R5goR0y29:assets%2Fgfx%2Fui%2Fpalma.psdR2y6:BINARYR4R7goR0y30:assets%2Fgfx%2Fui%2Fpalma3.pngR2R6R4R9goR0y36:assets%2Fimages%2Fimages-go-here.txtR2R3R4R10goR0y31:assets%2Fimages_ui%2Fbutton.pngR2R6R4R11goR0y36:assets%2Fimages_ui%2Fbutton_thin.pngR2R6R4R12goR0y31:assets%2Fimages_ui%2Fchrome.pngR2R6R4R13goR0y28:assets%2Fimages_ui%2Ftab.pngR2R6R4R14goR0y33:assets%2Fimages_ui%2Ftab_back.pngR2R6R4R15goR0y17:assets%2Flogo.psdR2R8R4R16goR0y36:assets%2Fmusic%2Fmusic-goes-here.txtR2R3R4R17goR0y36:assets%2Fsounds%2Fsounds-go-here.txtR2R3R4R18goR0y30:assets%2Fxml%2Fempty_popup.xmlR2R3R4R19goR0y23:assets%2Fxml%2Fhome.xmlR2R3R4R20goR0y32:assets%2Fxml%2Fmessage_popup.xmlR2R3R4R21goR0y30:assets%2Fxml%2F_ui_globals.xmlR2R3R4R22goR0y32:shared%2Fimages%2Fbackground.pngR2R6R4R23goR0y34:shared%2Fimages%2Fbackground_s.pngR2R6R4R24goR0y27:shared%2Fimages%2Fblank.pngR2R6R4R25goR0y27:shared%2Fimages%2Fcrate.pngR2R6R4R26goR0y32:shared%2Fimages%2Fcrosshairs.pngR2R6R4R27goR0y33:shared%2Fimages%2Fcrosshairs2.pngR2R6R4R28goR0y39:shared%2Fimages%2Fexplosionparticle.pngR2R6R4R29goR0y28:shared%2Fimages%2Fflag_b.pngR2R6R4R30goR0y29:shared%2Fimages%2Fflag_bh.pngR2R6R4R31goR0y28:shared%2Fimages%2Fflag_g.pngR2R6R4R32goR0y29:shared%2Fimages%2Fflag_gh.pngR2R6R4R33goR0y28:shared%2Fimages%2Fflag_n.pngR2R6R4R34goR0y28:shared%2Fimages%2Fflag_r.pngR2R6R4R35goR0y29:shared%2Fimages%2Fflag_rh.pngR2R6R4R36goR0y28:shared%2Fimages%2Fflag_y.pngR2R6R4R37goR0y29:shared%2Fimages%2Fflag_yh.pngR2R6R4R38goR0y32:shared%2Fimages%2Fgridtiles2.pngR2R6R4R39goR0y32:shared%2Fimages%2Fgridtiles3.pngR2R6R4R40goR0y32:shared%2Fimages%2Fgridtiles4.pngR2R6R4R41goR0y25:shared%2Fimages%2Fgun.pngR2R6R4R42goR0y37:shared%2Fimages%2Fgun_eviscerator.pngR2R6R4R43goR0y44:shared%2Fimages%2Fgun_eviscerator_bullet.pngR2R6R4R44goR0y42:shared%2Fimages%2Fgun_eviscerator_icon.pngR2R6R4R45goR0y41:shared%2Fimages%2Fgun_launcher_bullet.pngR2R6R4R46goR0y39:shared%2Fimages%2Fgun_launcher_icon.pngR2R6R4R47goR0y37:shared%2Fimages%2Fgun_peacekeeper.pngR2R6R4R48goR0y44:shared%2Fimages%2Fgun_peacekeeper_bullet.pngR2R6R4R49goR0y42:shared%2Fimages%2Fgun_peacekeeper_icon.pngR2R6R4R50goR0y34:shared%2Fimages%2Fgun_splasher.pngR2R6R4R51goR0y41:shared%2Fimages%2Fgun_splasher_bullet.pngR2R6R4R52goR0y39:shared%2Fimages%2Fgun_splasher_icon.pngR2R6R4R53goR0y36:shared%2Fimages%2Findoor_tileset.pngR2R6R4R54goR0y37:shared%2Fimages%2Foutdoor_tileset.pngR2R6R4R55goR0y32:shared%2Fimages%2Fplayerblue.pngR2R6R4R56goR0y33:shared%2Fimages%2Fplayergreen.pngR2R6R4R57goR0y31:shared%2Fimages%2Fplayerred.pngR2R6R4R58goR0y34:shared%2Fimages%2Fplayeryellow.pngR2R6R4R59goR0y36:shared%2Fimages%2Fpowerup_health.pngR2R6R4R60goR0y32:shared%2Fimages%2Fscifitiles.pngR2R6R4R61goR0y37:shared%2Fimages%2Fscifitiles_copy.pngR2R6R4R62goR0y27:shared%2Fimages%2Ftrail.pngR2R6R4R63goR0y39:shared%2Ftiledefs%2Findoor_tileset.jsonR2R3R4R64goR0y35:shared%2Ftiledefs%2FSkullSolid.tsetR2R3R4R65goR0y24:crashdumper%2F%2Fcpu.batR2R3R4R66goR0y24:crashdumper%2F%2Fgpu.batR2R3R4R67goR0y27:crashdumper%2F%2Fmemory.batR2R3R4R68goR0y23:crashdumper%2F%2Fos.batR2R3R4R69goR0y26:assets%2Fsounds%2Fbeep.oggR2y5:SOUNDR4R70goR0y28:assets%2Fsounds%2Fflixel.oggR2R71R4R72goR0y34:flixel%2Fflixel-ui%2Fimg%2Fbox.pngR2R6R4R73goR0y37:flixel%2Fflixel-ui%2Fimg%2Fbutton.pngR2R6R4R74goR0y48:flixel%2Fflixel-ui%2Fimg%2Fbutton_arrow_down.pngR2R6R4R75goR0y48:flixel%2Fflixel-ui%2Fimg%2Fbutton_arrow_left.pngR2R6R4R76goR0y49:flixel%2Fflixel-ui%2Fimg%2Fbutton_arrow_right.pngR2R6R4R77goR0y46:flixel%2Fflixel-ui%2Fimg%2Fbutton_arrow_up.pngR2R6R4R78goR0y42:flixel%2Fflixel-ui%2Fimg%2Fbutton_thin.pngR2R6R4R79goR0y44:flixel%2Fflixel-ui%2Fimg%2Fbutton_toggle.pngR2R6R4R80goR0y40:flixel%2Fflixel-ui%2Fimg%2Fcheck_box.pngR2R6R4R81goR0y41:flixel%2Fflixel-ui%2Fimg%2Fcheck_mark.pngR2R6R4R82goR0y37:flixel%2Fflixel-ui%2Fimg%2Fchrome.pngR2R6R4R83goR0y42:flixel%2Fflixel-ui%2Fimg%2Fchrome_flat.pngR2R6R4R84goR0y43:flixel%2Fflixel-ui%2Fimg%2Fchrome_inset.pngR2R6R4R85goR0y43:flixel%2Fflixel-ui%2Fimg%2Fchrome_light.pngR2R6R4R86goR0y44:flixel%2Fflixel-ui%2Fimg%2Fdropdown_mark.pngR2R6R4R87goR0y41:flixel%2Fflixel-ui%2Fimg%2Ffinger_big.pngR2R6R4R88goR0y43:flixel%2Fflixel-ui%2Fimg%2Ffinger_small.pngR2R6R4R89goR0y38:flixel%2Fflixel-ui%2Fimg%2Fhilight.pngR2R6R4R90goR0y36:flixel%2Fflixel-ui%2Fimg%2Finvis.pngR2R6R4R91goR0y41:flixel%2Fflixel-ui%2Fimg%2Fminus_mark.pngR2R6R4R92goR0y40:flixel%2Fflixel-ui%2Fimg%2Fplus_mark.pngR2R6R4R93goR0y36:flixel%2Fflixel-ui%2Fimg%2Fradio.pngR2R6R4R94goR0y40:flixel%2Fflixel-ui%2Fimg%2Fradio_dot.pngR2R6R4R95goR0y37:flixel%2Fflixel-ui%2Fimg%2Fswatch.pngR2R6R4R96goR0y34:flixel%2Fflixel-ui%2Fimg%2Ftab.pngR2R6R4R97goR0y39:flixel%2Fflixel-ui%2Fimg%2Ftab_back.pngR2R6R4R98goR0y39:flixel%2Fflixel-ui%2Fxml%2Fdefaults.xmlR2R3R4R99goR0y53:flixel%2Fflixel-ui%2Fxml%2Fdefault_loading_screen.xmlR2R3R4R100goR0y44:flixel%2Fflixel-ui%2Fxml%2Fdefault_popup.xmlR2R3R4R101gh
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[["indoor_tileset",16,16,2],["Solid"],[0,2],[[[true],88],[[false],0]],[335,770,771,772,773,774,775,776,777,778,779,140,141,142,783,784,145,146,659,780,781,782,785,660,661,298,299,300,175,176,177,178,691,180,181,694,695,696,697,690,699,692,693,578,579,580,581,70,71,456,457,458,459,460,461,462,455,464,465,210,211,212,213,214,215,216,217,218,219,468,469,589,590,463,582,466,467,333,105,106,698,624,625,626,334,591,368,369,370],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]
5 changes: 5 additions & 0 deletions Client/source/Downloader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ class Downloader
fo.close();
}

if (event.target.info[0] == "json")
{
//var key:String = event.target.data;
}

if (event.target.progress >= 1)
{
subm_loaded++;
Expand Down
27 changes: 21 additions & 6 deletions Client/source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class PlayState extends FlxState
public var wepBar:WeaponBar;
public var mouseSprite:FlxCrosshairs;

public var trailArea:FlxTrailArea;
public var cross:FlxCrosshairs;

/**
* Function that is called up when to state is created to set it up.
Expand Down Expand Up @@ -247,11 +247,23 @@ class PlayState extends FlxState
//under_players.add(trailArea);
hud.clear();
//hud.add(new FlxCrosshairs());
new FlxCrosshairs().addToGroup(hud);
cross = new FlxCrosshairs();
cross.addToGroup(hud);

trailArea.x = collidemap.x - FlxG.width / 2;
trailArea.y = collidemap.y - FlxG.height / 2;
trailArea.setSize(collidemap.width + FlxG.width, collidemap.height + FlxG.height);
ping_text = new FlxText(0, 0, 70, "0");
ping_text.scrollFactor.set();
hud.add(ping_text);
switch (Assets.config.get("showping"))
{
case "true":
ping_text.visible = true;
case "false":
ping_text.visible = false;
}

//trailArea.x = collidemap.x - FlxG.width / 2;
//trailArea.y = collidemap.y - FlxG.height / 2;
//trailArea.setSize(collidemap.width + FlxG.width, collidemap.height + FlxG.height);

for (p in playermap.iterator())
{
Expand Down Expand Up @@ -479,7 +491,10 @@ class PlayState extends FlxState
player.isRight = false;
}

player.a = FlxAngle.angleBetweenMouse(player, true);
//player.a = FlxAngle.angleBetweenMouse(player, true);
var pos:FlxPoint = new FlxPoint(FlxG.mouse.x - cross.width/2, FlxG.mouse.y - cross.height/2);
player.a = FlxAngle.angleBetweenPoint(player, pos, true);
//player.a = FlxAngle.angleBetween(player, cross, true);

//if (framebuffer > 0.03)
//{
Expand Down
1 change: 1 addition & 0 deletions Client/source/ui/DirectConnect.hx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class DirectConnect extends FlxUIState
add(inp);

var go:FlxUIButton = new FlxUIButton(240, 10, "Connect", connect);
UIAssets.setBtnGraphic(go);
add(go);
}

Expand Down
16 changes: 15 additions & 1 deletion Client/source/ui/Home.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Home extends FlxUIState
Util.initXML(this);
super.create();

var chrome = new FlxUI9SliceSprite(5, 5, null, new Rectangle(0, 0, 140, 470));
var chrome = new FlxUI9SliceSprite(5, 5, UIAssets.CHROME, new Rectangle(0, 0, 140, 470));
chrome.scrollFactor.set();
add(chrome);

Expand All @@ -47,6 +47,20 @@ class Home extends FlxUIState
auto_launch.loadGraphicSlice9(null, 120, 30, null);
open_update.loadGraphicSlice9(null, 120, 30, null);

UIAssets.setBtnGraphic(browse_p);
UIAssets.setBtnGraphic(browse_l);
UIAssets.setBtnGraphic(connect);
UIAssets.setBtnGraphic(settings);
UIAssets.setBtnGraphic(auto_launch);
UIAssets.setBtnGraphic(open_update);

browse_p.resize(120, 30);
browse_l.resize(120, 30);
connect.resize(120, 30);
settings.resize(120, 30);
auto_launch.resize(120, 30);
open_update.resize(120, 30);

add(browse_p);
add(browse_l);
add(connect);
Expand Down
14 changes: 4 additions & 10 deletions Client/source/ui/NoServerAlert.hx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ class NoServerAlert extends FlxUIPopup

override public function create():Void
{
_xml_id = "empty_popup";
_xml_id = "message_popup";
super.create();

var x:Float = 150;
var y:Float = 150;
var width:Float = FlxG.width - 2 * x;
var height:Float = FlxG.height - 2 * y;
var chrome = new FlxUI9SliceSprite(x, y, null, new Rectangle(0, 0, width, height));
var chrome = new FlxUI9SliceSprite(x, y, UIAssets.CHROME, new Rectangle(0, 0, width, height));
chrome.scrollFactor.set();
add(chrome);

Expand All @@ -35,16 +35,10 @@ class NoServerAlert extends FlxUIPopup
t.y = y + 5;
add(t);

var b:FlxUIButton = new FlxUIButton(0, 0, "Back", exitPopup);
var b:FlxUIButton = new FlxUIButton(0, 0, "Back", Util.goBack);
UIAssets.setBtnGraphic(b);
b.x = x + width - 5 - b.width;
b.y = y + height - 5 - b.height;
add(b);
}

public function exitPopup():Void
{
//_parentState.closeSubState();
//FlxG.switchState(new Home());
close();
}
}
2 changes: 2 additions & 0 deletions Client/source/ui/Public.hx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class Public extends FlxUIState
var t:FlxUIButton = new FlxUIButton(10, 10, server.getString());
t.params = [server.ip];
t.loadGraphicSlice9(null, FlxG.width - 60, 30, null);
UIAssets.setBtnGraphic(t);
t.resize(FlxG.width - 60, 30);
t.setCenterLabelOffset(0, 15);
l.add(cast t);
l.refreshList();
Expand Down
3 changes: 2 additions & 1 deletion Client/source/ui/Settings.hx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Settings extends FlxUIState

var save:FlxUIButton = new FlxUIButton(10, 0, "Save", saveSettings);
save.y = FlxG.height - save.height - 5;
UIAssets.setBtnGraphic(save);
add(save);

var t:FlxUIText = new FlxUIText();
Expand All @@ -64,7 +65,7 @@ class Settings extends FlxUIState
new StrIdLabel("b", "Blue"),
new StrIdLabel("r", "Red"),
new StrIdLabel("y", "Yellow")];
color = new FlxUIDropDownMenu(90, 50, data);
color = new FlxUIDropDownMenu(90, 50, data, UIAssets.createHeader());
switch (Assets.config.get("team"))
{
case "0":
Expand Down
3 changes: 2 additions & 1 deletion Client/source/ui/Spawn.hx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Spawn extends FlxUISubState
group.scrollFactor.set();
add(group);

var chrome = new FlxUI9SliceSprite(X_BORDER / 2, Y_BORDER / 2, null, new Rectangle(0, 0, 140, 5));
var chrome = new FlxUI9SliceSprite(X_BORDER / 2, Y_BORDER / 2, UIAssets.CHROME, new Rectangle(0, 0, 140, 5));
chrome.scrollFactor.set();
group.add(chrome);

Expand All @@ -70,6 +70,7 @@ class Spawn extends FlxUISubState

spawnBtn = new FlxUIButton(X_BORDER, Y_BORDER + radio_g.height, "Spawn", spawn);
spawnBtn.scrollFactor.set();
UIAssets.setBtnGraphic(spawnBtn);
group.add(spawnBtn);

timerLabel = new FlxText(X_BORDER + radio_g.width, Y_BORDER, 100);
Expand Down
98 changes: 98 additions & 0 deletions Client/source/ui/UIAssets.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
package ui;

import flash.geom.Rectangle;
import flixel.addons.ui.FlxUI9SliceSprite;
import flixel.addons.ui.FlxUIAssets;
import flixel.addons.ui.FlxUIButton;
import flixel.addons.ui.FlxUIDropDownMenu.FlxUIDropDownHeader;
import flixel.addons.ui.FlxUISpriteButton;
import flixel.addons.ui.FlxUIText;
import flixel.addons.ui.FlxUITypedButton.FlxUITypedButton;
import flixel.FlxSprite;
import flixel.text.FlxText;
import flixel.util.FlxStringUtil;

/**
* ...
* @author Ohmnivore
*/

class UIAssets
{
static public var CHROME:String = "assets/images_ui/chrome.png";
static public var BUTTON:String = "assets/images_ui/button.png";
static public var BUTTON_THIN:String = "assets/images_ui/button_thin.png";
static public var TAB:String = "assets/images_ui/tab.png";
static public var TAB_BACK:String = "assets/images_ui/tab_back.png";

static public function setBtnGraphic(Btn:FlxUIButton):Void
{
Btn.loadGraphicSlice9([UIAssets.BUTTON], 80, 20, []);
Btn.resize(80, 20);
Btn.label.color = 0xffffffff;
Btn.over_color = 0xffffffff;
Btn.down_color = 0xffffffff;
Btn.up_color = 0xffffffff;
Btn.label.setBorderStyle(FlxText.BORDER_OUTLINE);
Btn.label.borderColor = 0xff000000;
}

static public function createHeader(Width:Int = 120):FlxUIDropDownHeader
{
var btn:FlxUISpriteButton;
btn = new FlxUISpriteButton(0, 0, new FlxSprite(0, 0, FlxUIAssets.IMG_DROPDOWN));
btn.loadGraphicSlice9([UIAssets.BUTTON_THIN], 80, 20,
[FlxStringUtil.toIntArray(FlxUIAssets.SLICE9_BUTTON)],
FlxUI9SliceSprite.TILE_NONE, -1, false, FlxUIAssets.IMG_BUTTON_SIZE, FlxUIAssets.IMG_BUTTON_SIZE);
return new FlxUIDropDownHeader(Width, null, null, btn);
}

static public function getStepperPlus():FlxUITypedButton<FlxSprite>
{
var ButtonPlus:FlxUITypedButton<FlxSprite> = new FlxUITypedButton<FlxSprite>(0, 0);
ButtonPlus.loadGraphicSlice9([UIAssets.BUTTON_THIN], 21, 21, [FlxStringUtil.toIntArray(FlxUIAssets.SLICE9_BUTTON_THIN)], FlxUI9SliceSprite.TILE_NONE, -1, false, FlxUIAssets.IMG_BUTTON_SIZE, FlxUIAssets.IMG_BUTTON_SIZE);
ButtonPlus.label = new FlxSprite(0, 0, FlxUIAssets.IMG_PLUS);

return ButtonPlus;
}

static public function getStepperMinus():FlxUITypedButton<FlxSprite>
{
var ButtonPlus:FlxUITypedButton<FlxSprite> = new FlxUITypedButton<FlxSprite>(0, 0);
ButtonPlus.loadGraphicSlice9([UIAssets.BUTTON_THIN], 21, 21, [FlxStringUtil.toIntArray(FlxUIAssets.SLICE9_BUTTON_THIN)], FlxUI9SliceSprite.TILE_NONE, -1, false, FlxUIAssets.IMG_BUTTON_SIZE, FlxUIAssets.IMG_BUTTON_SIZE);
ButtonPlus.label = new FlxSprite(0, 0, FlxUIAssets.IMG_MINUS);

return ButtonPlus;
}

static public function getTabBackground():FlxUI9SliceSprite
{
return new FlxUI9SliceSprite(0, 0, UIAssets.CHROME, new Rectangle(0, 0, 200, 200));
}

static public function getTab(Name:String):FlxUIButton
{
var fb:FlxUIButton = new FlxUIButton(0, 0, Name);

//default style:
fb.up_color = 0xffffff;
fb.down_color = 0xffffff;
fb.over_color = 0xffffff;
fb.up_toggle_color = 0xffffff;
fb.down_toggle_color = 0xffffff;
fb.over_toggle_color = 0xffffff;

fb.label.color = 0xFFFFFF;
fb.label.setBorderStyle(FlxText.BORDER_OUTLINE);

fb.id = Name;

//load default graphics
var graphic_ids:Array<String> = [UIAssets.TAB_BACK, UIAssets.TAB_BACK, UIAssets.TAB_BACK, UIAssets.TAB, UIAssets.TAB, UIAssets.TAB];
var slice9tab:Array<Int> = FlxStringUtil.toIntArray(FlxUIAssets.SLICE9_TAB);
var slice9_ids:Array<Array<Int>> = [slice9tab, slice9tab, slice9tab, slice9tab, slice9tab, slice9tab];
fb.loadGraphicSlice9(graphic_ids, 0, 0, slice9_ids, FlxUI9SliceSprite.TILE_NONE, -1, true);

return fb;
}
}
1 change: 1 addition & 0 deletions Client/source/ui/Update.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Update extends FlxUIState
add(texts);

var go:FlxUIButton = new FlxUIButton(10, 10, "Update", fetchUpdate);
UIAssets.setBtnGraphic(go);
add(go);

texts.y += 10 + go.height;
Expand Down
Loading

0 comments on commit 1b10e60

Please sign in to comment.