Compare commits
177 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dbed09cb55 | ||
![]() |
9f3ebb0036 | ||
![]() |
ddb5e58057 | ||
![]() |
4e5707720b | ||
![]() |
e9628187f2 | ||
![]() |
c8f9cdd6fa | ||
![]() |
7cfa9c38e0 | ||
![]() |
7cc368305f | ||
![]() |
682694cc07 | ||
![]() |
12c4677912 | ||
![]() |
0e0ae6c083 | ||
![]() |
49d62b8225 | ||
![]() |
0909e186a1 | ||
![]() |
3557879361 | ||
![]() |
fa317c534d | ||
![]() |
119abec1cf | ||
![]() |
92beee10d3 | ||
![]() |
c110f32993 | ||
![]() |
a18970dceb | ||
![]() |
d3d3294277 | ||
![]() |
ef7f94ac76 | ||
![]() |
9fcc4c7355 | ||
![]() |
751cb0ca8b | ||
![]() |
3343919c92 | ||
![]() |
4eb7668922 | ||
![]() |
c706dc12fe | ||
![]() |
1f272b7aba | ||
![]() |
09d830d02e | ||
![]() |
d7429c201c | ||
![]() |
939e16c59a | ||
![]() |
fe585d27d8 | ||
![]() |
e9352fe811 | ||
![]() |
a52c938fef | ||
![]() |
153cf3e859 | ||
![]() |
6b46370d1a | ||
![]() |
c2ff89b2cf | ||
![]() |
2a57a5f7d0 | ||
![]() |
32d1ed5c6a | ||
![]() |
6d8d319557 | ||
![]() |
9e0ddb08e3 | ||
![]() |
74979ca16a | ||
![]() |
0c77179c46 | ||
![]() |
935b9e4cd6 | ||
![]() |
0f362f80e3 | ||
![]() |
0b5654f870 | ||
![]() |
4ec5048730 | ||
![]() |
6b8e810466 | ||
![]() |
9b3e0a324c | ||
![]() |
f7531383f3 | ||
![]() |
7724b8059d | ||
![]() |
2ada93db9c | ||
![]() |
d070711409 | ||
![]() |
5909634837 | ||
![]() |
07ac5c27ca | ||
![]() |
9f7aafac0b | ||
![]() |
12b3bd4ee0 | ||
![]() |
9e30c39035 | ||
![]() |
3dbcb1daee | ||
![]() |
a9d4fd5e1e | ||
![]() |
07f8e6fca9 | ||
![]() |
f0ed0bad13 | ||
![]() |
8fccc1eb63 | ||
![]() |
62d2a22ab8 | ||
![]() |
10438c21ff | ||
![]() |
ec99d35cee | ||
![]() |
85fe5867f3 | ||
![]() |
1a77473e13 | ||
![]() |
cc483fba5a | ||
![]() |
94686d3fe8 | ||
![]() |
468ac9cbd2 | ||
![]() |
9f8293a5a0 | ||
![]() |
ce9e443c60 | ||
![]() |
99b1ddf44c | ||
![]() |
c083d02bef | ||
![]() |
00253e46b3 | ||
![]() |
d2b7de3801 | ||
![]() |
adcf258551 | ||
![]() |
2df51622ba | ||
![]() |
a7d7667491 | ||
![]() |
0ad45d6826 | ||
![]() |
f23e70ff08 | ||
![]() |
b96be291bb | ||
![]() |
72b3403728 | ||
![]() |
b1964a1c10 | ||
![]() |
25fb3113fa | ||
![]() |
24acf8855f | ||
![]() |
06855dd1de | ||
![]() |
65d556ef4e | ||
![]() |
54b8e362d5 | ||
![]() |
45b41b88bd | ||
![]() |
1baad726ae | ||
![]() |
b19fb22146 | ||
![]() |
8dec9cd835 | ||
![]() |
50d3f83fce | ||
![]() |
41b2f9b911 | ||
![]() |
a02c091376 | ||
![]() |
01e6169cfb | ||
![]() |
1074b6b787 | ||
![]() |
d45fbcb10f | ||
![]() |
f334a03397 | ||
![]() |
3ce37dacbd | ||
![]() |
166eb7614f | ||
![]() |
8b3f3b11f0 | ||
![]() |
2d84fae2c8 | ||
![]() |
5204e3ac03 | ||
![]() |
547b18db9a | ||
![]() |
37f9d3e200 | ||
![]() |
4b24c78f0f | ||
![]() |
994f49b3c1 | ||
![]() |
79ee0e34ea | ||
![]() |
b295053662 | ||
![]() |
61059e66ec | ||
![]() |
f4de000646 | ||
![]() |
d20c263912 | ||
![]() |
07e40afa3d | ||
![]() |
8179915e06 | ||
![]() |
4f79a30689 | ||
![]() |
a58a3e90c8 | ||
![]() |
8d8f32b081 | ||
![]() |
9d866a3616 | ||
![]() |
0fbba70003 | ||
![]() |
598a7edf6b | ||
![]() |
b415b73b4a | ||
![]() |
b6d8ede854 | ||
![]() |
d64a682e74 | ||
![]() |
d080432e14 | ||
![]() |
8bd1293be7 | ||
![]() |
ce411ec871 | ||
![]() |
82a5989f5c | ||
![]() |
bb514d3acb | ||
![]() |
c96b717273 | ||
![]() |
d245b7fb29 | ||
![]() |
edde71fc09 | ||
![]() |
b7b8fdfd0c | ||
![]() |
8dc831088e | ||
![]() |
c07d448aac | ||
![]() |
57a330e589 | ||
![]() |
64437e4e1a | ||
![]() |
96f3bcb42b | ||
![]() |
c8b4566194 | ||
![]() |
d30ff220f6 | ||
![]() |
f0fbd4790f | ||
![]() |
cb1f28a3a3 | ||
![]() |
cc1e3c534e | ||
![]() |
f4f79f47bd | ||
![]() |
ff617c3fab | ||
![]() |
43524a9127 | ||
![]() |
48ff67dc06 | ||
![]() |
8bd154b604 | ||
![]() |
9da018fdff | ||
![]() |
4f4788c1c3 | ||
![]() |
d0d8c9a081 | ||
![]() |
f3b5adbf40 | ||
![]() |
38c9b6b0b2 | ||
![]() |
79be0eca73 | ||
![]() |
9bd02ca8ba | ||
![]() |
f12ecd8404 | ||
![]() |
53803b2218 | ||
![]() |
67c2453c82 | ||
![]() |
455000c02d | ||
![]() |
a2684cce7c | ||
![]() |
27ae54d7d6 | ||
![]() |
aec577a4b4 | ||
![]() |
6f467d5a1b | ||
![]() |
e6c9e78935 | ||
![]() |
3750a85c5f | ||
![]() |
03de13d618 | ||
![]() |
1588bc4cae | ||
![]() |
b718ae0423 | ||
![]() |
a8f540cf29 | ||
![]() |
e6a1fabdd3 | ||
![]() |
291960d159 | ||
![]() |
20b68c6a42 | ||
![]() |
e4ba805e00 | ||
![]() |
93be0f975f | ||
![]() |
cbfeef39bc | ||
![]() |
d7dfa2220e |
@@ -1,7 +1,8 @@
|
|||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
project(otclient)
|
project(otclient)
|
||||||
|
|
||||||
set(VERSION "0.6.5")
|
set(VERSION "0.6.6")
|
||||||
|
set(LIB_NAME "otc_framework")
|
||||||
|
|
||||||
option(FRAMEWORK_SOUND "Use SOUND " ON)
|
option(FRAMEWORK_SOUND "Use SOUND " ON)
|
||||||
option(FRAMEWORK_GRAPHICS "Use GRAPHICS " ON)
|
option(FRAMEWORK_GRAPHICS "Use GRAPHICS " ON)
|
||||||
@@ -35,11 +36,20 @@ endif()
|
|||||||
|
|
||||||
add_definitions(-D"VERSION=\\"${VERSION}\\"")
|
add_definitions(-D"VERSION=\\"${VERSION}\\"")
|
||||||
|
|
||||||
|
# we want framework to be a library for faster compilation/linking
|
||||||
|
if(USE_STATIC_LIBS)
|
||||||
|
add_library(${LIB_NAME} ${framework_SOURCES})
|
||||||
|
else()
|
||||||
|
add_library(${LIB_NAME} SHARED ${framework_SOURCES})
|
||||||
|
message(STATUS "Linking to shared ${LIB_NAME}, make sure you copy the DLL/SO/dylib with the executable!")
|
||||||
|
endif()
|
||||||
|
target_link_libraries(${LIB_NAME} ${framework_LIBRARIES})
|
||||||
|
|
||||||
# add client executable
|
# add client executable
|
||||||
add_executable(${PROJECT_NAME} ${framework_SOURCES} ${client_SOURCES} ${executable_SOURCES})
|
add_executable(${PROJECT_NAME} ${client_SOURCES} ${executable_SOURCES})
|
||||||
|
|
||||||
# target link libraries
|
# target link libraries
|
||||||
target_link_libraries(${PROJECT_NAME} ${framework_LIBRARIES})
|
target_link_libraries(${PROJECT_NAME} ${LIB_NAME})
|
||||||
|
|
||||||
if(USE_PCH)
|
if(USE_PCH)
|
||||||
include(cotire)
|
include(cotire)
|
||||||
@@ -51,7 +61,10 @@ endif()
|
|||||||
|
|
||||||
# installation
|
# installation
|
||||||
set(DATA_INSTALL_DIR share/${PROJECT_NAME})
|
set(DATA_INSTALL_DIR share/${PROJECT_NAME})
|
||||||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
install(TARGETS ${PROJECT_NAME} ${LIB_NAME}
|
||||||
|
RUNTIME DESTINATION bin
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib)
|
||||||
install(FILES README.md BUGS LICENSE AUTHORS init.lua ${PROJECT_NAME}rc.lua DESTINATION ${DATA_INSTALL_DIR})
|
install(FILES README.md BUGS LICENSE AUTHORS init.lua ${PROJECT_NAME}rc.lua DESTINATION ${DATA_INSTALL_DIR})
|
||||||
install(DIRECTORY data modules DESTINATION ${DATA_INSTALL_DIR} PATTERN ".git" EXCLUDE)
|
install(DIRECTORY data modules DESTINATION ${DATA_INSTALL_DIR} PATTERN ".git" EXCLUDE)
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
[](http://travis-ci.org/edubart/otclient)
|
[](http://travis-ci.org/edubart/otclient)
|
||||||
### What is otclient?
|
### What is otclient?
|
||||||
|
|
||||||
Otclient is an alternative Tibia client for usage with otserv. It aims to be complete and flexible,
|
Otclient is an alternative Tibia client for usage with otserv. It aims to be complete and flexible,
|
||||||
@@ -10,13 +10,15 @@ Otclient is written in C++2011, the upcoming C++ standard and heavily scripted i
|
|||||||
|
|
||||||
### Where do I download?
|
### Where do I download?
|
||||||
|
|
||||||
|
The latest commits compiled for Windows can be found here.
|
||||||
|
* [Windows Builds](http://otland.net/threads/otclient-builds-windows.217977/)
|
||||||
|
|
||||||
Here is the latest v0.6.5 release compiled for both i686(32 bit) and x86_64(64 bit) machines, with OpenGL renderer.
|
Here is the latest v0.6.5 release compiled for both i686(32 bit) and x86_64(64 bit) machines, with OpenGL renderer.
|
||||||
This release is compatible with protocols ranges from 7.60 up to 10.31.
|
This release is compatible with protocols ranges from 7.60 up to 10.31.
|
||||||
|
|
||||||
* [For Windows](https://www.dropbox.com/sh/se1okacemoqzjve/XFqFoSKLCg/otclient-win-0.6.5.zip)
|
* [For Windows](https://www.dropbox.com/sh/se1okacemoqzjve/XFqFoSKLCg/otclient-win-0.6.5.zip)
|
||||||
* [For Linux](https://www.dropbox.com/sh/se1okacemoqzjve/xKJL7j6vEo/otclient-linux-0.6.5.tar.gz)
|
* [For Linux](https://www.dropbox.com/sh/se1okacemoqzjve/xKJL7j6vEo/otclient-linux-0.6.5.tar.gz)
|
||||||
|
|
||||||
**NOTE:** You will need to download spr/dat files on your own and place them in `data/things/VER/` (i.e: `data/things/1031/Tibia.spr`)
|
**NOTE:** You will need to download spr/dat files on your own and place them in `data/things/VERSION/` (i.e: `data/things/1041/Tibia.spr`)
|
||||||
|
|
||||||
Older releases can be downloaded from [here](https://www.dropbox.com/sh/se1okacemoqzjve/-oWK4YFm03)
|
Older releases can be downloaded from [here](https://www.dropbox.com/sh/se1okacemoqzjve/-oWK4YFm03)
|
||||||
|
|
||||||
|
BIN
data/images/game/npcicons/icon_chat.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
data/images/game/npcicons/icon_quest.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
data/images/game/npcicons/icon_trade.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
data/images/game/npcicons/icon_tradequest.png
Normal file
After Width: | Height: | Size: 795 B |
BIN
data/images/game/slots/purse.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
data/images/game/viplist/icons.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
data/images/game/viplist/vipcheckbox.png
Normal file
After Width: | Height: | Size: 349 B |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 409 B After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 409 B After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 281 B After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 470 B After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 548 B After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 457 B After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 646 B After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 18 KiB |
@@ -6,7 +6,7 @@ locale = {
|
|||||||
name = "es",
|
name = "es",
|
||||||
charset = "cp1252",
|
charset = "cp1252",
|
||||||
languageName = "Espa<EFBFBD>ol",
|
languageName = "Espa<EFBFBD>ol",
|
||||||
|
|
||||||
translation = {
|
translation = {
|
||||||
["1a) Offensive Name"] = "1a) Nombre ofensivo",
|
["1a) Offensive Name"] = "1a) Nombre ofensivo",
|
||||||
["1b) Invalid Name Format"] = "1b) Formato invalido para nombre",
|
["1b) Invalid Name Format"] = "1b) Formato invalido para nombre",
|
||||||
@@ -34,8 +34,8 @@ locale = {
|
|||||||
["Add"] = "A<EFBFBD>adir",
|
["Add"] = "A<EFBFBD>adir",
|
||||||
["Add new VIP"] = "A<EFBFBD>adir nuevo VIP",
|
["Add new VIP"] = "A<EFBFBD>adir nuevo VIP",
|
||||||
["Addon 1"] = "Addon 1",
|
["Addon 1"] = "Addon 1",
|
||||||
["Addon 2"] = "Addon 1",
|
["Addon 2"] = "Addon 2",
|
||||||
["Addon 3"] = "Addon 1",
|
["Addon 3"] = "Addon 3",
|
||||||
["Add to VIP list"] = "A<EFBFBD>adir a lista VIP",
|
["Add to VIP list"] = "A<EFBFBD>adir a lista VIP",
|
||||||
["Adjust volume"] = "Ajustar volumen",
|
["Adjust volume"] = "Ajustar volumen",
|
||||||
["Alas! Brave adventurer, you have met a sad fate.\nBut do not despair, for the gods will bring you back\ninto this world in exchange for a small sacrifice\n\nSimply click on Ok to resume your journeys!"] = "<EFBFBD>Ay! Aventurero valiente, has conocido un triste destino. \nPero no se desespere, porque los dioses te llevar<61>n de vuelta \na este mundo a cambio de un peque<75>o sacrificio \n\nSimplemente haga clic en Aceptar para continuar con sus viajes!",
|
["Alas! Brave adventurer, you have met a sad fate.\nBut do not despair, for the gods will bring you back\ninto this world in exchange for a small sacrifice\n\nSimply click on Ok to resume your journeys!"] = "<EFBFBD>Ay! Aventurero valiente, has conocido un triste destino. \nPero no se desespere, porque los dioses te llevar<61>n de vuelta \na este mundo a cambio de un peque<75>o sacrificio \n\nSimplemente haga clic en Aceptar para continuar con sus viajes!",
|
||||||
@@ -154,7 +154,7 @@ locale = {
|
|||||||
["Hide spells for higher exp. levels"] = "Ocultar hechizos para niveles mas altos que tu experiencia.",
|
["Hide spells for higher exp. levels"] = "Ocultar hechizos para niveles mas altos que tu experiencia.",
|
||||||
["Hide spells for other vocations"] = "Ocultar hechizos que sean para otra vocaci<63>n",
|
["Hide spells for other vocations"] = "Ocultar hechizos que sean para otra vocaci<63>n",
|
||||||
["Hit Points"] = "Puntos de vida",
|
["Hit Points"] = "Puntos de vida",
|
||||||
["Hold left mouse button to navigate\nScroll mouse middle button to zoom\nRight mouse button to create map marks"] = "Mantenga presionado el bot<6F>n derecho del rat<61>n para navegar\nDezplaze la rueda central del rat<61>n para ampliar\nbot<EFBFBD>n derecho del mouse para crear marcas del mapa",
|
["Hold left mouse button to navigate\nScroll mouse middle button to zoom\nRight mouse button to create map marks"] = "Mantenga presionado el bot<6F>n derecho del rat<61>n para navegar\nDezplaze la rueda central del rat<61>n para ampliar\nbot<EFBFBD>n derecho del mouse para crear marcas del mapa",
|
||||||
["Hotkeys"] = "Hotkeys",
|
["Hotkeys"] = "Hotkeys",
|
||||||
["If you shut down the program, your character might stay in the game.\nClick on 'Logout' to ensure that you character leaves the game properly.\nClick on 'Exit' if you want to exit the program without logging out your character."] = "Si se cierra el programa, tu personaje puede permanecer en el juego.\nHaga clic en 'Salir' para asegurarse de que personaje deja el juego correctamente.\nHaga click en 'Salir' si desea salir del programa sin tener que salir de tu personaje.",
|
["If you shut down the program, your character might stay in the game.\nClick on 'Logout' to ensure that you character leaves the game properly.\nClick on 'Exit' if you want to exit the program without logging out your character."] = "Si se cierra el programa, tu personaje puede permanecer en el juego.\nHaga clic en 'Salir' para asegurarse de que personaje deja el juego correctamente.\nHaga click en 'Salir' si desea salir del programa sin tener que salir de tu personaje.",
|
||||||
["Ignore"] = "Ignorar",
|
["Ignore"] = "Ignorar",
|
||||||
@@ -374,5 +374,5 @@ locale = {
|
|||||||
["Don't stretch or shrink Game Window"] = "No estirar o encoger Ventana de Juego"
|
["Don't stretch or shrink Game Window"] = "No estirar o encoger Ventana de Juego"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
modules.client_locales.installLocale(locale)
|
modules.client_locales.installLocale(locale)
|
@@ -63,16 +63,16 @@ locale = {
|
|||||||
["Buy with backpack"] = "Kupuj z plecakami",
|
["Buy with backpack"] = "Kupuj z plecakami",
|
||||||
["Cancel"] = "Anuluj",
|
["Cancel"] = "Anuluj",
|
||||||
["Cannot login while already in game."] = "Nie mozna zalogowac gdy juz w grze",
|
["Cannot login while already in game."] = "Nie mozna zalogowac gdy juz w grze",
|
||||||
["Cap"] = false,
|
["Cap"] = "Ladownosc",
|
||||||
["Capacity"] = "Ladownosc",
|
["Capacity"] = "Ladownosc",
|
||||||
["Center"] = false,
|
["Center"] = "Wysrodkuj",
|
||||||
["Channels"] = "Kanaly",
|
["Channels"] = "Kanaly",
|
||||||
["Character List"] = "Lista postaci",
|
["Character List"] = "Lista postaci",
|
||||||
["Classic control"] = "Klasyczne sterowaie",
|
["Classic control"] = "Klasyczne sterowaie",
|
||||||
["Clear current message window"] = false,
|
["Clear current message window"] = "Wyczysc bierzace okno",
|
||||||
["Clear Messages"] = false,
|
["Clear Messages"] = "Wyczysc wiadomosci",
|
||||||
["Clear object"] = "Wyczysc obiekt",
|
["Clear object"] = "Wyczysc obiekt",
|
||||||
["Client needs update."] = false,
|
["Client needs update."] = "Klient wymaga aktalizacji",
|
||||||
["Close"] = "Zamknij",
|
["Close"] = "Zamknij",
|
||||||
["Close this channel"] = "Zamknij kanal",
|
["Close this channel"] = "Zamknij kanal",
|
||||||
["Club Fighting"] = "Walka obuchem",
|
["Club Fighting"] = "Walka obuchem",
|
||||||
@@ -81,7 +81,7 @@ locale = {
|
|||||||
["Connecting to game server..."] = "Laczenie z serwerem gry...",
|
["Connecting to game server..."] = "Laczenie z serwerem gry...",
|
||||||
["Connecting to login server..."] = "Laczenie z serwerem logowania...",
|
["Connecting to login server..."] = "Laczenie z serwerem logowania...",
|
||||||
["Console"] = "Konsola",
|
["Console"] = "Konsola",
|
||||||
["Cooldowns"] = false,
|
["Cooldowns"] = "Czasy odnowienia",
|
||||||
["Copy message"] = "Kopiuj wiadomosc",
|
["Copy message"] = "Kopiuj wiadomosc",
|
||||||
["Copy name"] = "Kopiuj imie",
|
["Copy name"] = "Kopiuj imie",
|
||||||
["Copy Name"] = "Kopiuj Imie",
|
["Copy Name"] = "Kopiuj Imie",
|
||||||
@@ -100,7 +100,7 @@ locale = {
|
|||||||
["Detail"] = "Szczegoly",
|
["Detail"] = "Szczegoly",
|
||||||
["Details"] = "Szczegoly",
|
["Details"] = "Szczegoly",
|
||||||
["Disable Shared Experience"] = "Wylacz Dzielenie Doswiadczenia",
|
["Disable Shared Experience"] = "Wylacz Dzielenie Doswiadczenia",
|
||||||
["Dismount"] = false,
|
["Dismount"] = "Zejdz z wierzchowca",
|
||||||
["Display connection speed to the server (milliseconds)"] = "Wyswietl ping do serwera (ms)",
|
["Display connection speed to the server (milliseconds)"] = "Wyswietl ping do serwera (ms)",
|
||||||
["Distance Fighting"] = "Walka na odleglosc",
|
["Distance Fighting"] = "Walka na odleglosc",
|
||||||
["Don't stretch/shrink Game Window"] = "Nie rozszerzaj/zwezaj Okna Gry",
|
["Don't stretch/shrink Game Window"] = "Nie rozszerzaj/zwezaj Okna Gry",
|
||||||
@@ -109,7 +109,7 @@ locale = {
|
|||||||
["Edit Text"] = "Edytuj tekst",
|
["Edit Text"] = "Edytuj tekst",
|
||||||
["Enable music"] = "Odtwarzaj muzyke",
|
["Enable music"] = "Odtwarzaj muzyke",
|
||||||
["Enable Shared Experience"] = "Wlacz dzielenie doswiadczenia",
|
["Enable Shared Experience"] = "Wlacz dzielenie doswiadczenia",
|
||||||
["Enable smart walking"] = false,
|
["Enable smart walking"] = "Wlacz inteligentne chodzenie",
|
||||||
["Enable vertical synchronization"] = "Wlacz synchronizacje pionowa",
|
["Enable vertical synchronization"] = "Wlacz synchronizacje pionowa",
|
||||||
["Enable walk booster"] = false,
|
["Enable walk booster"] = false,
|
||||||
["Enter Game"] = "Wejdz do gry",
|
["Enter Game"] = "Wejdz do gry",
|
||||||
@@ -118,7 +118,7 @@ locale = {
|
|||||||
["Error"] = "Blad",
|
["Error"] = "Blad",
|
||||||
["Excessive Unjustified Player Killing"] = "Nadmierne Nieusprawiedliwione Zabijanie Graczy",
|
["Excessive Unjustified Player Killing"] = "Nadmierne Nieusprawiedliwione Zabijanie Graczy",
|
||||||
["Exclude from private chat"] = "Wyrzuc w prywatnej konwersacji",
|
["Exclude from private chat"] = "Wyrzuc w prywatnej konwersacji",
|
||||||
["Exit"] = false,
|
["Exit"] = "Wyjdz",
|
||||||
["Experience"] = "Doswiadczenie",
|
["Experience"] = "Doswiadczenie",
|
||||||
["Filter list to match your level"] = "Wyswietl tylko odpowiednie dla mojego poziomu",
|
["Filter list to match your level"] = "Wyswietl tylko odpowiednie dla mojego poziomu",
|
||||||
["Filter list to match your vocation"] = "Wyswietl tylko odpowiednie dla mojej klasy",
|
["Filter list to match your vocation"] = "Wyswietl tylko odpowiednie dla mojej klasy",
|
||||||
@@ -127,7 +127,7 @@ locale = {
|
|||||||
["Fist Fighting"] = "Walka wrecz",
|
["Fist Fighting"] = "Walka wrecz",
|
||||||
["Follow"] = "Podazaj",
|
["Follow"] = "Podazaj",
|
||||||
["Force Exit"] = "Wymus Zamkniecie",
|
["Force Exit"] = "Wymus Zamkniecie",
|
||||||
["For Your Information"] = false,
|
["For Your Information"] = "Dla twojej informacji",
|
||||||
["Free Account"] = "Darmowe Konto",
|
["Free Account"] = "Darmowe Konto",
|
||||||
["Fullscreen"] = "Pelen ekran",
|
["Fullscreen"] = "Pelen ekran",
|
||||||
["Game"] = "Gra",
|
["Game"] = "Gra",
|
||||||
@@ -136,9 +136,9 @@ locale = {
|
|||||||
["Graphics card driver not detected"] = "Nie wykryto karty graficznej",
|
["Graphics card driver not detected"] = "Nie wykryto karty graficznej",
|
||||||
["Graphics Engine:"] = "Silnik graficzny:",
|
["Graphics Engine:"] = "Silnik graficzny:",
|
||||||
["Head"] = "Glowa",
|
["Head"] = "Glowa",
|
||||||
["Healing"] = false,
|
["Healing"] = "Leczenie",
|
||||||
["Health Info"] = false,
|
["Health Info"] = "Info o zyciu",
|
||||||
["Health Information"] = false,
|
["Health Information"] = "Informacje o zyciu",
|
||||||
["Hide monsters"] = "Ukryj potwory",
|
["Hide monsters"] = "Ukryj potwory",
|
||||||
["Hide non-skull players"] = "Ukryj graczy bez skulla",
|
["Hide non-skull players"] = "Ukryj graczy bez skulla",
|
||||||
["Hide Npcs"] = "Ukryj NPCe",
|
["Hide Npcs"] = "Ukryj NPCe",
|
||||||
@@ -183,16 +183,16 @@ locale = {
|
|||||||
["Magic Level"] = "Poziom Magiczny",
|
["Magic Level"] = "Poziom Magiczny",
|
||||||
["Make sure that your client uses\nthe correct game protocol version"] = "Upewnij sie, ze twoj klient\nuzywa wlasciwego protokolu gry.",
|
["Make sure that your client uses\nthe correct game protocol version"] = "Upewnij sie, ze twoj klient\nuzywa wlasciwego protokolu gry.",
|
||||||
["Mana"] = "Mana",
|
["Mana"] = "Mana",
|
||||||
["Manage hotkeys:"] = "Skonfiguruj hotkeye:",
|
["Manage hotkeys:"] = "Zarzadzaj hotkeyami:",
|
||||||
["Market"] = false,
|
["Market"] = false,
|
||||||
["Market Offers"] = false,
|
["Market Offers"] = "Oferty",
|
||||||
["Message of the day"] = "Wiadomosc dnia",
|
["Message of the day"] = "Wiadomosc dnia",
|
||||||
["Message to "] = "Wiadomosc do ",
|
["Message to "] = "Wiadomosc do ",
|
||||||
["Message to %s"] = "Wiadomosc do %s",
|
["Message to %s"] = "Wiadomosc do %s",
|
||||||
["Minimap"] = "Minimapa",
|
["Minimap"] = "Minimapa",
|
||||||
["Module Manager"] = "Menedzer modulow",
|
["Module Manager"] = "Menedzer modulow",
|
||||||
["Module name"] = "Nazwa modulu",
|
["Module name"] = "Nazwa modulu",
|
||||||
["Mount"] = false,
|
["Mount"] = "Wierzchowiec",
|
||||||
["Move Stackable Item"] = "Przenies przedmiot",
|
["Move Stackable Item"] = "Przenies przedmiot",
|
||||||
["Move up"] = "Przenies wyzej",
|
["Move up"] = "Przenies wyzej",
|
||||||
["My Offers"] = "Moje Oferty",
|
["My Offers"] = "Moje Oferty",
|
||||||
@@ -221,13 +221,13 @@ locale = {
|
|||||||
["Open new channel"] = "Otworz nowy kanal",
|
["Open new channel"] = "Otworz nowy kanal",
|
||||||
["Options"] = "Opcje",
|
["Options"] = "Opcje",
|
||||||
["Overview"] = "Podsumowanie",
|
["Overview"] = "Podsumowanie",
|
||||||
["Pass Leadership to %s"] = "Przekaz przywodztwo %s",
|
["Pass Leadership to %s"] = "Oddaj przywodztwo %s",
|
||||||
["Password"] = "Haslo",
|
["Password"] = "Haslo",
|
||||||
["Piece Price:"] = false,
|
["Piece Price:"] = "Cena jednego przedmiotu",
|
||||||
["Please enter a character name:"] = "Podaj nazwe postaci:",
|
["Please enter a character name:"] = "Podaj nazwe postaci:",
|
||||||
["Please, press the key you wish to add onto your hotkeys manager"] = "Nacisnij klawisz, ktory chcesz dodac do menedzera skrotow klawiszowych",
|
["Please, press the key you wish to add onto your hotkeys manager"] = "Nacisnij klawisz, ktory chcesz dodac do menedzera skrotow klawiszowych",
|
||||||
["Please Select"] = false,
|
["Please Select"] = "Prosze wybrac",
|
||||||
["Please use this dialog to only report bugs. Do not report rule violations here!"] = false,
|
["Please use this dialog to only report bugs. Do not report rule violations here!"] = "Zglaszaj tylko bledy gry, nie lamanie zasad",
|
||||||
["Please wait"] = "Prosze czekac",
|
["Please wait"] = "Prosze czekac",
|
||||||
["Port"] = "Port",
|
["Port"] = "Port",
|
||||||
["Position:"] = "Pozycja:",
|
["Position:"] = "Pozycja:",
|
||||||
@@ -237,21 +237,21 @@ locale = {
|
|||||||
["Primary"] = "Podstawowy",
|
["Primary"] = "Podstawowy",
|
||||||
["Protocol"] = "Protokol",
|
["Protocol"] = "Protokol",
|
||||||
["Quest Log"] = "Dziennik Misji",
|
["Quest Log"] = "Dziennik Misji",
|
||||||
["Randomize"] = false,
|
["Randomize"] = "Losuj",
|
||||||
["Randomize characters outfit"] = false,
|
["Randomize characters outfit"] = "Ustaw losowy wyglad",
|
||||||
["Reason:"] = "Powod:",
|
["Reason:"] = "Powod:",
|
||||||
["Refresh"] = "Odswiez",
|
["Refresh"] = "Odswiez",
|
||||||
["Refresh Offers"] = "Odswiez Oferty",
|
["Refresh Offers"] = "Odswiez Oferty",
|
||||||
["Regeneration Time"] = "Czas Regeneracji",
|
["Regeneration Time"] = "Czas Regeneracji",
|
||||||
["Reject"] = "Odrzuc",
|
["Reject"] = "Odrzuc",
|
||||||
["Reload All"] = "Przeladuj Wszystko",
|
["Reload All"] = "Zaladuj ponownie wszystko",
|
||||||
["Remember account and password when starts client"] = "Zapamietaj identyfikator konta oraz haslo",
|
["Remember account and password when starts client"] = "Zapamietaj identyfikator konta oraz haslo",
|
||||||
["Remember password"] = "Zapamietaj haslo",
|
["Remember password"] = "Zapamietaj haslo",
|
||||||
["Remove"] = "Usun",
|
["Remove"] = "Usun",
|
||||||
["Remove %s"] = "Usun %s",
|
["Remove %s"] = "Usun %s",
|
||||||
["Report Bug"] = "Zglos Blad",
|
["Report Bug"] = "Zglos Blad",
|
||||||
["Reserved for more functionality later."] = "Zarezerowane dla przyszlych funkcjonalnosci.",
|
["Reserved for more functionality later."] = "Zarezerowane dla przyszlych funkcjonalnosci.",
|
||||||
["Reset Market"] = false,
|
["Reset Market"] = "Zaladuj market ponownie",
|
||||||
["Revoke %s's Invitation"] = "Odmow na zaproszenie gracza %s",
|
["Revoke %s's Invitation"] = "Odmow na zaproszenie gracza %s",
|
||||||
["Rotate"] = "Obroc",
|
["Rotate"] = "Obroc",
|
||||||
["Rule Violation"] = "Zlamanie Regul",
|
["Rule Violation"] = "Zlamanie Regul",
|
||||||
@@ -275,7 +275,7 @@ locale = {
|
|||||||
["Shielding"] = "Obrona tarcza",
|
["Shielding"] = "Obrona tarcza",
|
||||||
["Show all items"] = "Pokaz wszystkie przedmioty",
|
["Show all items"] = "Pokaz wszystkie przedmioty",
|
||||||
["Show connection ping"] = "Wyswietl ping",
|
["Show connection ping"] = "Wyswietl ping",
|
||||||
["Show Depot Only"] = false,
|
["Show Depot Only"] = "Pokaz tylko przedmioty z depozytu",
|
||||||
["Show event messages in console"] = "Pokaz wydarzenia w konsoli",
|
["Show event messages in console"] = "Pokaz wydarzenia w konsoli",
|
||||||
["Show frame rate"] = "Pokaz FPS",
|
["Show frame rate"] = "Pokaz FPS",
|
||||||
["Show info messages in console"] = "Pokaz informacje w konsoli",
|
["Show info messages in console"] = "Pokaz informacje w konsoli",
|
||||||
@@ -288,17 +288,17 @@ locale = {
|
|||||||
["Show status messages in console"] = "Pokaz status w konsoli",
|
["Show status messages in console"] = "Pokaz status w konsoli",
|
||||||
["Show Text"] = "Pokaz Tekst",
|
["Show Text"] = "Pokaz Tekst",
|
||||||
["Show timestamps in console"] = "Pokaz znaczniki czasu w konsoli",
|
["Show timestamps in console"] = "Pokaz znaczniki czasu w konsoli",
|
||||||
["Show your depot items only"] = false,
|
["Show your depot items only"] = "Pokaz tylko przedmioty z depozytu",
|
||||||
["Skills"] = "Umiejetnosci",
|
["Skills"] = "Umiejetnosci",
|
||||||
["Soul"] = "Dusze",
|
["Soul"] = "Dusze",
|
||||||
["Soul Points"] = "Punkty Duszy",
|
["Soul Points"] = "Punktey Duszy",
|
||||||
["Special"] = false,
|
["Special"] = "Specialne",
|
||||||
["Speed"] = "Predkosc",
|
["Speed"] = "Predkosc",
|
||||||
["Spell Cooldowns"] = false,
|
["Spell Cooldowns"] = "Czas odnowienia czaru",
|
||||||
["Spell List"] = "Lista Zaklec",
|
["Spell List"] = "Lista Zaklec",
|
||||||
["Stamina"] = "Wytrzymalosc",
|
["Stamina"] = "Wytrzymalosc",
|
||||||
["Statement:"] = false,
|
["Statement:"] = "Wyrazenie",
|
||||||
["Statement Report"] = false,
|
["Statement Report"] = "Reportuj wyrazenie",
|
||||||
["Statistics"] = "Statystki",
|
["Statistics"] = "Statystki",
|
||||||
["Stop Attack"] = "Anuluj atak",
|
["Stop Attack"] = "Anuluj atak",
|
||||||
["Stop Follow"] = "Przestan podazac",
|
["Stop Follow"] = "Przestan podazac",
|
||||||
@@ -311,7 +311,7 @@ locale = {
|
|||||||
["Terminal"] = "Terminal",
|
["Terminal"] = "Terminal",
|
||||||
["There is no way."] = "Nie ma drogi.",
|
["There is no way."] = "Nie ma drogi.",
|
||||||
["Title"] = "Tytul",
|
["Title"] = "Tytul",
|
||||||
["Total Price"] = "Cena sumaryczna",
|
["Total Price"] = "Cena calosci",
|
||||||
["Trade"] = "Handel",
|
["Trade"] = "Handel",
|
||||||
["Trade with ..."] = "Handluj z ...",
|
["Trade with ..."] = "Handluj z ...",
|
||||||
["Trying to reconnect in %s seconds."] = "Ponowna proba laczenia za %s sekund.",
|
["Trying to reconnect in %s seconds."] = "Ponowna proba laczenia za %s sekund.",
|
||||||
@@ -320,15 +320,15 @@ locale = {
|
|||||||
["Unable to logout."] = "Nie mozna sie wylogowac.",
|
["Unable to logout."] = "Nie mozna sie wylogowac.",
|
||||||
["Unignore"] = "Anuluj Ignorowanie",
|
["Unignore"] = "Anuluj Ignorowanie",
|
||||||
["Unload"] = "Wylacz",
|
["Unload"] = "Wylacz",
|
||||||
["Update needed"] = false,
|
["Update needed"] = "Wymagana aktualizacja",
|
||||||
["Use"] = "Uzyj",
|
["Use"] = "Uzyj",
|
||||||
["Use on target"] = "Uzyj na celu",
|
["Use on target"] = "Uzyj na celu",
|
||||||
["Use on yourself"] = "Uzyj na sobie",
|
["Use on yourself"] = "Uzyj na sobie",
|
||||||
["Use with ..."] = "Uzyj z ...",
|
["Use with ..."] = "Uzyj z ...",
|
||||||
["Version"] = "Wersja",
|
["Version"] = "Wersja",
|
||||||
["VIP List"] = "Lista VIP",
|
["VIP List"] = "Lista VIP",
|
||||||
["Voc."] = false,
|
["Voc."] = "Profesja",
|
||||||
["Vocation"] = "Klasa",
|
["Vocation"] = "Profesja",
|
||||||
["Waiting List"] = "Lista Oczekujacych",
|
["Waiting List"] = "Lista Oczekujacych",
|
||||||
["Website"] = "Strona:",
|
["Website"] = "Strona:",
|
||||||
["Weight:"] = "Waga:",
|
["Weight:"] = "Waga:",
|
||||||
@@ -339,14 +339,14 @@ locale = {
|
|||||||
["You are burning"] = "Palisz sie",
|
["You are burning"] = "Palisz sie",
|
||||||
["You are cursed"] = "Jestes przeklety",
|
["You are cursed"] = "Jestes przeklety",
|
||||||
["You are dazzled"] = "Jestes oslepiony",
|
["You are dazzled"] = "Jestes oslepiony",
|
||||||
["You are dead."] = "Zginales marnie.",
|
["You are dead."] = "Jestes martwy.",
|
||||||
["You are dead"] = "Jestes martwy",
|
["You are dead"] = "Jestes martwy",
|
||||||
["You are drowning"] = "Topisz sie",
|
["You are drowning"] = "Topisz sie",
|
||||||
["You are drunk"] = "Caly swiat wiruje",
|
["You are drunk"] = "Jestes pijany",
|
||||||
["You are electrified"] = "Jestes porazony pradem",
|
["You are electrified"] = "Jestes porazony pradem",
|
||||||
["You are freezing"] = "Marzniesz",
|
["You are freezing"] = "Zamarzasz",
|
||||||
["You are hasted"] = "Zapieprzasz",
|
["You are hasted"] = "Masz zwiekszona predkosc ruchu",
|
||||||
["You are hungry"] = "Burczy ci w brzuchu",
|
["You are hungry"] = "Jestes glodny",
|
||||||
["You are paralysed"] = "Jestes sparalizowany",
|
["You are paralysed"] = "Jestes sparalizowany",
|
||||||
["You are poisoned"] = "Jestes zatruty",
|
["You are poisoned"] = "Jestes zatruty",
|
||||||
["You are protected by a magic shield"] = "Jestes chroniony magiczna tarcza",
|
["You are protected by a magic shield"] = "Jestes chroniony magiczna tarcza",
|
||||||
@@ -363,52 +363,52 @@ locale = {
|
|||||||
["Your Capacity:"] = "Twoja Ladownosc:",
|
["Your Capacity:"] = "Twoja Ladownosc:",
|
||||||
["You read the following, written by \n%s\n"] = false,
|
["You read the following, written by \n%s\n"] = false,
|
||||||
["You read the following, written on \n%s.\n"] = false,
|
["You read the following, written on \n%s.\n"] = false,
|
||||||
["Your Money:"] = false,
|
["Your Money:"] = "Twoje pieniadze",
|
||||||
["Enable dash walking"] = false,
|
["Enable dash walking"] = "Wlacz szybsze chodzenie (dash walking)",
|
||||||
["Will boost your walk on high speed characters"] = "Przyspieszy poruszanie sie postaci o wysokiej predkosci",
|
["Will boost your walk on high speed characters"] = "Przyspieszy poruszanie sie postaci o wysokiej predkosci",
|
||||||
["Display creature names"] = "Wyswietlaj nazwy potworow",
|
["Display creature names"] = "Wyswietlaj nazwy potworow",
|
||||||
["Display creature health bars"] = "Wyswietlaj paski zycia potworow",
|
["Display creature health bars"] = "Wyswietlaj paski zycia potworow",
|
||||||
["Display text messages"] = "Wyswietlaj wiadomosci tekstowe",
|
["Display text messages"] = "Wyswietlaj wiadomosci tekstowe",
|
||||||
["Change language"] = "Zmien jezyk",
|
["Change language"] = "Zmien jezyk",
|
||||||
["Enable lights"] = "Odblokuj oswietlenie",
|
["Enable lights"] = "Wlacz oswietlenie",
|
||||||
["Enable audio"] = "Odblokuj dzwiek",
|
["Enable audio"] = "Wlacz dzwiek",
|
||||||
["Enable music sound"] = "Odblokuj muzyke",
|
["Enable music sound"] = "Wlacz muzyke",
|
||||||
["Music volume: %d"] = "Glosnosc muzyki: %d",
|
["Music volume: %d"] = "Glosnosc muzyki: %d",
|
||||||
["Audio"] = "Dzwiek",
|
["Audio"] = "Dzwiek",
|
||||||
["Server List"] = "Lista serwerow",
|
["Server List"] = "Lista serwerow",
|
||||||
["Server list"] = "Lista serwerow",
|
["Server list"] = "Lista serwerow",
|
||||||
["Client Version"] = "Wersja klienta",
|
["Client Version"] = "Wersja klienta",
|
||||||
["Add new server"] = "Dodaj nowy serwer",
|
["Add new server"] = "Dodaj nowy serwer",
|
||||||
["Select"] = "Wybierz",
|
["Select"] = "Wybierz",
|
||||||
["New Server"] = "Nowy serwer",
|
["New Server"] = "Nowy serwer",
|
||||||
["Host"] = false,
|
["Host"] = false,
|
||||||
["Reset All"] = "Ustaw domyslne",
|
["Reset All"] = "Ustaw domyslne",
|
||||||
["Disable chat mode, allow to walk using ASDW"] = "Zablokuj tryb rozmow, zezwol na poruszanie sie za pomoca klawiszy ADSW",
|
["Disable chat mode, allow to walk using ASDW"] = "Zablokuj tryb rozmow, zezwol na poruszanie sie za pomoca klawiszy ADSW",
|
||||||
["Name"] = "Imie",
|
["Name"] = "Imie",
|
||||||
["Price"] = "Cena",
|
["Price"] = "Cena",
|
||||||
["Your Money"] = "Twoje fundusze",
|
["Your Money"] = "Twoje fundusze",
|
||||||
["Weight"] = "Waga",
|
["Weight"] = "Waga",
|
||||||
["Your Capacity"] = "Twoj udzwig",
|
["Your Capacity"] = "Twoj udzwig",
|
||||||
["Search"] = "Szukaj",
|
["Search"] = "Szukaj",
|
||||||
["Sell All"] = "Sprzedaj wszystko",
|
["Sell All"] = "Sprzedaj wszystko",
|
||||||
["Statement"] = false,
|
["Statement"] = "Stanowisko",
|
||||||
["Reason"] = "Powod",
|
["Reason"] = "Powod",
|
||||||
["Action"] = "Akcja",
|
["Action"] = "Akcja",
|
||||||
["Comment"] = "Komentarz",
|
["Comment"] = "Komentarz",
|
||||||
["Balance"] = false,
|
["Balance"] = "Stan konta",
|
||||||
["Offer Type"] = "Typ oferty",
|
["Offer Type"] = "Typ oferty",
|
||||||
["Piece Price"] = false,
|
["Piece Price"] = "Cena jednego",
|
||||||
["Find"] = "Szukaj",
|
["Find"] = "Szukaj",
|
||||||
["Formula"] = "Formula",
|
["Formula"] = "Formula",
|
||||||
["Group"] = "Groupa",
|
["Group"] = "Groupa",
|
||||||
["Type"] = "Typ",
|
["Type"] = "Typ",
|
||||||
["Cooldown"] = false,
|
["Cooldown"] = "Czas odnowienia",
|
||||||
["Premium"] = false,
|
["Premium"] = false,
|
||||||
["Any"] = "Dowolny",
|
["Any"] = "Dowolny",
|
||||||
["Sorcerer"] = "Czarodziej",
|
["Sorcerer"] = "Czarodziej",
|
||||||
["Druid"] = false,
|
["Druid"] = false,
|
||||||
["Paladin"] = "Paladyn",
|
["Paladin"] = "Paladyn",
|
||||||
["Knight"] = "Rycerz"
|
["Knight"] = "Rycerz"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,44 +1,45 @@
|
|||||||
Button < UIButton
|
Button < UIButton
|
||||||
font: verdana-11px-antialised
|
font: verdana-11px-antialised
|
||||||
color: #f0ad4dff
|
color: #dfdfdfff
|
||||||
size: 106 22
|
size: 106 23
|
||||||
text-offset: 0 0
|
text-offset: 0 0
|
||||||
image-source: /images/ui/button_rounded
|
image-source: /images/ui/button
|
||||||
image-color: white
|
image-color: #dfdfdf
|
||||||
image-clip: 0 0 20 20
|
image-clip: 0 0 22 23
|
||||||
image-border: 3
|
image-border: 3
|
||||||
padding: 5 10 5 10
|
padding: 5 10 5 10
|
||||||
|
|
||||||
$hover !disabled:
|
$hover !disabled:
|
||||||
image-clip: 0 20 20 20
|
image-clip: 0 23 22 23
|
||||||
|
|
||||||
$pressed:
|
$pressed:
|
||||||
image-clip: 0 40 20 20
|
image-clip: 0 46 22 23
|
||||||
text-offset: 1 1
|
text-offset: 1 1
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
color: #f0ad4d88
|
color: #dfdfdf88
|
||||||
|
opacity: 0.8
|
||||||
|
|
||||||
TabButton < UIButton
|
TabButton < UIButton
|
||||||
size: 20 20
|
size: 22 23
|
||||||
image-source: /images/ui/tabbutton_rounded
|
image-source: /images/ui/tabbutton_rounded
|
||||||
image-color: white
|
image-color: #dfdfdf
|
||||||
image-clip: 0 0 20 20
|
image-clip: 0 0 22 23
|
||||||
image-border: 3
|
image-border: 3
|
||||||
icon-color: white
|
icon-color: #dfdfdf
|
||||||
color: #aaaaaa
|
color: #dfdfdf
|
||||||
|
|
||||||
$hover !on:
|
$hover !on:
|
||||||
image-clip: 0 20 20 20
|
image-clip: 0 23 22 23
|
||||||
color: white
|
color: #dfdfdf
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
image-color: #ffffff66
|
image-color: #dfdfdf66
|
||||||
icon-color: #888888
|
icon-color: #dfdfdf
|
||||||
|
|
||||||
$on:
|
$on:
|
||||||
image-clip: 0 40 20 20
|
image-clip: 0 46 22 23
|
||||||
color: #80c7f8
|
color: #dfdfdf
|
||||||
|
|
||||||
NextButton < UIButton
|
NextButton < UIButton
|
||||||
size: 12 21
|
size: 12 21
|
||||||
@@ -52,7 +53,7 @@ NextButton < UIButton
|
|||||||
image-clip: 12 21 12 21
|
image-clip: 12 21 12 21
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
image-color: #ffffff55
|
image-color: #dfdfdf55
|
||||||
|
|
||||||
PreviousButton < UIButton
|
PreviousButton < UIButton
|
||||||
size: 12 21
|
size: 12 21
|
||||||
@@ -66,18 +67,18 @@ PreviousButton < UIButton
|
|||||||
image-clip: 0 21 12 21
|
image-clip: 0 21 12 21
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
image-color: #ffffff55
|
image-color: #dfdfdf55
|
||||||
|
|
||||||
AddButton < UIButton
|
AddButton < UIButton
|
||||||
size: 20 20
|
size: 20 20
|
||||||
image-source: /images/ui/icon_add
|
image-source: /images/ui/icon_add
|
||||||
image-color: #ffffffff
|
image-color: #dfdfdfff
|
||||||
|
|
||||||
$hover !disabled:
|
$hover !disabled:
|
||||||
image-color: #ffffff99
|
image-color: #dfdfdf99
|
||||||
|
|
||||||
$pressed:
|
$pressed:
|
||||||
image-color: #ffffff44
|
image-color: #dfdfdf44
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
image-color: #ffffff55
|
image-color: #dfdfdf55
|
||||||
|
@@ -1,35 +1,35 @@
|
|||||||
CheckBox < UICheckBox
|
CheckBox < UICheckBox
|
||||||
size: 16 16
|
size: 16 16
|
||||||
text-align: left
|
text-align: left
|
||||||
text-offset: 16 0
|
text-offset: 18 1
|
||||||
color: #aaaaaa
|
color: #dfdfdf
|
||||||
image-color: #ffffffff
|
image-color: #dfdfdfff
|
||||||
image-rect: 0 0 12 12
|
image-rect: 0 0 15 15
|
||||||
image-offset: 0 2
|
|
||||||
image-source: /images/ui/checkbox
|
image-source: /images/ui/checkbox
|
||||||
|
|
||||||
$hover !disabled:
|
$hover !disabled:
|
||||||
color: #cccccc
|
color: #ffffff
|
||||||
|
|
||||||
$!checked:
|
$!checked:
|
||||||
image-clip: 0 0 12 12
|
image-clip: 0 0 15 15
|
||||||
|
|
||||||
$hover !checked:
|
$hover !checked:
|
||||||
image-clip: 0 12 12 12
|
image-clip: 0 15 15 15
|
||||||
|
|
||||||
$checked:
|
$checked:
|
||||||
image-clip: 0 24 12 12
|
image-clip: 0 30 15 15
|
||||||
|
|
||||||
$hover checked:
|
$hover checked:
|
||||||
image-clip: 0 36 12 12
|
image-clip: 0 45 15 15
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
image-color: #ffffff88
|
image-color: #dfdfdf88
|
||||||
color: #aaaaaa88
|
color: #dfdfdf88
|
||||||
|
opacity: 0.8
|
||||||
|
|
||||||
ColorBox < UICheckBox
|
ColorBox < UICheckBox
|
||||||
size: 16 16
|
size: 16 16
|
||||||
image-color: #ffffffff
|
image-color: #dfdfdfff
|
||||||
image-source: /images/ui/colorbox
|
image-source: /images/ui/colorbox
|
||||||
|
|
||||||
$checked:
|
$checked:
|
||||||
@@ -40,26 +40,25 @@ ColorBox < UICheckBox
|
|||||||
|
|
||||||
ButtonBox < UICheckBox
|
ButtonBox < UICheckBox
|
||||||
font: verdana-11px-antialised
|
font: verdana-11px-antialised
|
||||||
color: #ffffffff
|
color: #dfdfdfff
|
||||||
size: 106 22
|
size: 106 23
|
||||||
text-offset: 0 0
|
text-offset: 0 0
|
||||||
text-align: center
|
text-align: center
|
||||||
image-source: /images/ui/tabbutton_rounded
|
image-source: /images/ui/button
|
||||||
image-color: white
|
image-color: #dfdfdf
|
||||||
image-clip: 0 0 20 20
|
image-clip: 0 0 22 23
|
||||||
image-border: 3
|
image-border: 3
|
||||||
|
|
||||||
$hover !disabled:
|
$hover !disabled:
|
||||||
image-clip: 0 20 20 20
|
image-clip: 0 23 22 23
|
||||||
|
|
||||||
$checked:
|
$checked:
|
||||||
image-clip: 0 40 20 20
|
image-clip: 0 46 22 23
|
||||||
color: #80c7f8
|
color: #dfdfdf
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
color: #666666ff
|
color: #dfdfdf88
|
||||||
image-color: #ffffff88
|
image-color: #dfdfdf88
|
||||||
|
|
||||||
ButtonBoxRounded < ButtonBox
|
ButtonBoxRounded < ButtonBox
|
||||||
image-source: /images/ui/tabbutton_rounded
|
image-source: /images/ui/button_rounded
|
||||||
image-border: 2
|
|
@@ -1,62 +1,106 @@
|
|||||||
ComboBoxPopupMenuButton < UIButton
|
ComboBoxPopupScrollMenuButton < UIButton
|
||||||
height: 20
|
height: 23
|
||||||
font: verdana-11px-antialised
|
font: verdana-11px-antialised
|
||||||
text-align: left
|
text-align: left
|
||||||
text-offset: 4 0
|
text-offset: 4 0
|
||||||
color: #aaaaaa
|
color: #dfdfdf
|
||||||
background-color: alpha
|
background-color: alpha
|
||||||
|
margin: 1
|
||||||
|
|
||||||
$hover !disabled:
|
$hover !disabled:
|
||||||
color: #ffffff
|
color: #dfdfdf
|
||||||
background-color: #ffffff44
|
background-color: #355d89
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
color: #555555
|
color: #dfdfdf88
|
||||||
|
|
||||||
|
ComboBoxPopupScrollMenu < UIPopupScrollMenu
|
||||||
|
image-source: /images/ui/combobox_square
|
||||||
|
image-clip: 0 69 91 23
|
||||||
|
image-border: 1
|
||||||
|
|
||||||
|
ComboBoxPopupMenuButton < UIButton
|
||||||
|
height: 23
|
||||||
|
font: verdana-11px-antialised
|
||||||
|
text-align: left
|
||||||
|
text-offset: 4 0
|
||||||
|
color: #dfdfdf
|
||||||
|
background-color: alpha
|
||||||
|
margin: 1
|
||||||
|
|
||||||
|
$hover !disabled:
|
||||||
|
color: #dfdfdf
|
||||||
|
background-color: #355d89
|
||||||
|
|
||||||
|
$disabled:
|
||||||
|
color: #dfdfdf88
|
||||||
|
|
||||||
ComboBoxPopupMenu < UIPopupMenu
|
ComboBoxPopupMenu < UIPopupMenu
|
||||||
image-source: /images/ui/combobox_square
|
image-source: /images/ui/combobox_square
|
||||||
image-clip: 0 60 89 20
|
image-clip: 0 69 91 23
|
||||||
image-border-left: 1
|
image-border: 1
|
||||||
image-border-right: 1
|
|
||||||
|
|
||||||
ComboBox < UIComboBox
|
ComboBox < UIComboBox
|
||||||
font: verdana-11px-antialised
|
font: verdana-11px-antialised
|
||||||
color: #aaaaaa
|
color: #dfdfdf
|
||||||
size: 89 20
|
size: 91 23
|
||||||
text-offset: 3 0
|
text-offset: 3 0
|
||||||
text-align: left
|
text-align: left
|
||||||
image-source: /images/ui/combobox_square
|
image-source: /images/ui/combobox_square
|
||||||
image-border: 1
|
image-border: 3
|
||||||
image-border-right: 17
|
image-border-right: 19
|
||||||
image-clip: 0 0 89 20
|
image-clip: 0 0 91 23
|
||||||
|
|
||||||
$hover !disabled:
|
$hover !disabled:
|
||||||
image-clip: 0 20 89 20
|
image-clip: 0 23 91 23
|
||||||
|
|
||||||
$on:
|
$on:
|
||||||
image-clip: 0 40 89 20
|
image-clip: 0 46 91 23
|
||||||
|
|
||||||
ComboBoxRoundedPopupMenuButton < UIButton
|
$disabled:
|
||||||
height: 20
|
color: #dfdfdf88
|
||||||
|
opacity: 0.8
|
||||||
|
|
||||||
|
ComboBoxRoundedPopupScrollMenuButton < UIButton
|
||||||
|
height: 23
|
||||||
font: verdana-11px-antialised
|
font: verdana-11px-antialised
|
||||||
text-align: left
|
text-align: left
|
||||||
text-offset: 4 0
|
text-offset: 4 0
|
||||||
color: #aaaaaa
|
color: #dfdfdf
|
||||||
background-color: alpha
|
background-color: alpha
|
||||||
|
|
||||||
$hover !disabled:
|
$hover !disabled:
|
||||||
color: #ffffff
|
color: #ffffff
|
||||||
background-color: #ffffff44
|
background-color: #355d89
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
color: #555555
|
color: #dfdfdf88
|
||||||
|
|
||||||
|
ComboBoxRoundedPopupScrollMenu < UIPopupScrollMenu
|
||||||
|
image-source: /images/ui/combobox_rounded
|
||||||
|
image-clip: 0 69 91 23
|
||||||
|
image-border: 3
|
||||||
|
|
||||||
|
ComboBoxRoundedPopupMenuButton < UIButton
|
||||||
|
height: 23
|
||||||
|
font: verdana-11px-antialised
|
||||||
|
text-align: left
|
||||||
|
text-offset: 4 0
|
||||||
|
color: #dfdfdf
|
||||||
|
background-color: alpha
|
||||||
|
|
||||||
|
$hover !disabled:
|
||||||
|
color: #ffffff
|
||||||
|
background-color: #355d89
|
||||||
|
|
||||||
|
$disabled:
|
||||||
|
color: #dfdfdf88
|
||||||
|
|
||||||
ComboBoxRoundedPopupMenu < UIPopupMenu
|
ComboBoxRoundedPopupMenu < UIPopupMenu
|
||||||
image-source: /images/ui/combobox_rounded
|
image-source: /images/ui/combobox_rounded
|
||||||
image-clip: 0 60 89 20
|
image-clip: 0 69 91 23
|
||||||
image-border-left: 1
|
image-border: 3
|
||||||
image-border-right: 1
|
|
||||||
|
|
||||||
ComboBoxRounded < ComboBox
|
ComboBoxRounded < ComboBox
|
||||||
image-source: /images/ui/combobox_rounded
|
image-source: /images/ui/combobox_rounded
|
||||||
image-border: 2
|
image-border: 3
|
||||||
|
@@ -1,23 +1,23 @@
|
|||||||
Label < UILabel
|
Label < UILabel
|
||||||
font: verdana-11px-antialised
|
font: verdana-11px-antialised
|
||||||
color: #bbbbbb
|
color: #dfdfdf
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
color: #bbbbbb88
|
color: #dfdfdf88
|
||||||
|
|
||||||
FlatLabel < UILabel
|
FlatLabel < UILabel
|
||||||
font: verdana-11px-antialised
|
font: verdana-11px-antialised
|
||||||
color: #aaaaaa
|
color: #dfdfdf
|
||||||
size: 86 20
|
size: 86 20
|
||||||
text-offset: 3 3
|
text-offset: 3 3
|
||||||
image-source: /images/ui/panel_flat
|
image-source: /images/ui/panel_flat
|
||||||
image-border: 1
|
image-border: 1
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
color: #aaaaaa88
|
color: #dfdfdf88
|
||||||
|
|
||||||
MenuLabel < Label
|
MenuLabel < Label
|
||||||
|
|
||||||
GameLabel < UILabel
|
GameLabel < UILabel
|
||||||
font: verdana-11px-antialised
|
font: verdana-11px-antialised
|
||||||
color: #bbbbbb
|
color: #dfdfdf
|
||||||
|
@@ -1,19 +1,19 @@
|
|||||||
TextList < UIScrollArea
|
TextList < UIScrollArea
|
||||||
layout: verticalBox
|
layout: verticalBox
|
||||||
border-width: 1
|
border-width: 1
|
||||||
border-color: #1d222b
|
border-color: #272727
|
||||||
background-color: #222833
|
background-color: #636363
|
||||||
padding: 1
|
padding: 1
|
||||||
auto-focus: none
|
auto-focus: none
|
||||||
|
|
||||||
HorizontalList < UIScrollArea
|
HorizontalList < UIScrollArea
|
||||||
layout: horizontalBox
|
layout: horizontalBox
|
||||||
border-width: 1
|
border-width: 1
|
||||||
border-color: #1d222b
|
border-color: #272727
|
||||||
background-color: #222833
|
background-color: #636363
|
||||||
|
|
||||||
VerticalList < UIScrollArea
|
VerticalList < UIScrollArea
|
||||||
layout: verticalBox
|
layout: verticalBox
|
||||||
border-width: 1
|
border-width: 1
|
||||||
border-color: #1d222b
|
border-color: #272727
|
||||||
background-color: #222833
|
background-color: #636363
|
@@ -10,7 +10,6 @@ ScrollBarSlider < UIButton
|
|||||||
image-clip: 13 26 13 13
|
image-clip: 13 26 13 13
|
||||||
$pressed:
|
$pressed:
|
||||||
image-clip: 26 26 13 13
|
image-clip: 26 26 13 13
|
||||||
image-color: #ffffff99
|
|
||||||
$disabled:
|
$disabled:
|
||||||
image-color: #ffffff66
|
image-color: #ffffff66
|
||||||
|
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
HorizontalSeparator < UIWidget
|
HorizontalSeparator < UIWidget
|
||||||
image-source: /images/ui/separator_horizontal
|
image-source: /images/ui/separator_horizontal
|
||||||
image-border-top: 2
|
image-border: 1
|
||||||
height: 2
|
height: 2
|
||||||
phantom: true
|
phantom: true
|
||||||
focusable: false
|
focusable: false
|
||||||
|
|
||||||
VerticalSeparator < UIWidget
|
VerticalSeparator < UIWidget
|
||||||
image-source: /images/ui/separator_vertical
|
image-source: /images/ui/separator_vertical
|
||||||
image-border-left: 2
|
image-border: 1
|
||||||
width: 2
|
width: 2
|
||||||
phantom: true
|
phantom: true
|
||||||
focusable: false
|
focusable: false
|
||||||
|
@@ -1,15 +1,17 @@
|
|||||||
TextEdit < UITextEdit
|
TextEdit < UITextEdit
|
||||||
font: verdana-11px-antialised
|
font: verdana-11px-antialised
|
||||||
color: #aaaaaa
|
color: #272727
|
||||||
size: 86 20
|
size: 86 22
|
||||||
text-offset: 0 3
|
text-offset: 0 4
|
||||||
padding: 3
|
opacity: 1
|
||||||
|
padding: 4
|
||||||
image-source: /images/ui/textedit
|
image-source: /images/ui/textedit
|
||||||
image-border: 1
|
image-border: 1
|
||||||
selection-color: #111416
|
selection-color: #272727
|
||||||
selection-background-color: #999999
|
selection-background-color: #cccccc
|
||||||
$disabled:
|
$disabled:
|
||||||
color: #aaaaaa88
|
color: #27272788
|
||||||
|
opacity: 0.5
|
||||||
|
|
||||||
PasswordTextEdit < TextEdit
|
PasswordTextEdit < TextEdit
|
||||||
text-hidden: true
|
text-hidden: true
|
||||||
|
@@ -2,20 +2,19 @@ Window < UIWindow
|
|||||||
font: verdana-11px-antialised
|
font: verdana-11px-antialised
|
||||||
size: 200 200
|
size: 200 200
|
||||||
opacity: 1
|
opacity: 1
|
||||||
color: white
|
color: #dfdfdf
|
||||||
text-offset: 0 4
|
text-offset: 0 6
|
||||||
text-align: top
|
text-align: top
|
||||||
image-source: /images/ui/window
|
image-source: /images/ui/window
|
||||||
image-border: 5
|
image-border: 6
|
||||||
image-border-top: 22
|
image-border-top: 27
|
||||||
opacity: 1
|
padding-top: 36
|
||||||
padding-top: 30
|
|
||||||
padding-left: 16
|
padding-left: 16
|
||||||
padding-right: 16
|
padding-right: 16
|
||||||
padding-bottom: 16
|
padding-bottom: 16
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
color: #aaaaaa88
|
color: #dfdfdf88
|
||||||
|
|
||||||
$dragging:
|
$dragging:
|
||||||
opacity: 0.8
|
opacity: 0.8
|
||||||
|
@@ -39,3 +39,45 @@ PopupMenu < UIPopupMenu
|
|||||||
image-source: /images/ui/menubox
|
image-source: /images/ui/menubox
|
||||||
image-border: 3
|
image-border: 3
|
||||||
padding: 3
|
padding: 3
|
||||||
|
|
||||||
|
PopupScrollMenuButton < UIButton
|
||||||
|
height: 18
|
||||||
|
size: 0 21
|
||||||
|
text-offset: 4 0
|
||||||
|
text-align: left
|
||||||
|
font: verdana-11px-antialised
|
||||||
|
|
||||||
|
color: #aaaaaa
|
||||||
|
background-color: alpha
|
||||||
|
|
||||||
|
$hover !disabled:
|
||||||
|
color: #ffffff
|
||||||
|
background-color: #ffffff44
|
||||||
|
image-clip: 0 40 20 20
|
||||||
|
|
||||||
|
$disabled:
|
||||||
|
color: #555555
|
||||||
|
|
||||||
|
PopupScrollMenuShortcutLabel < Label
|
||||||
|
font: verdana-11px-antialised
|
||||||
|
text-align: right
|
||||||
|
anchors.fill: parent
|
||||||
|
margin-right: 2
|
||||||
|
margin-left: 5
|
||||||
|
|
||||||
|
PopupScrollMenuSeparator < UIWidget
|
||||||
|
margin-left: 2
|
||||||
|
margin-right: 2
|
||||||
|
margin-bottom: 1
|
||||||
|
image-source: /images/ui/menubox
|
||||||
|
image-border-left: 1
|
||||||
|
image-border-right: 1
|
||||||
|
image-clip: 0 0 32 2
|
||||||
|
height: 2
|
||||||
|
phantom: true
|
||||||
|
|
||||||
|
PopupScrollMenu < UIPopupScrollMenu
|
||||||
|
width: 50
|
||||||
|
image-source: /images/ui/menubox
|
||||||
|
image-border: 3
|
||||||
|
padding: 3
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
SpinBox < TextEdit
|
SpinBox < TextEdit
|
||||||
__class: UISpinBox
|
__class: UISpinBox
|
||||||
text-align: left
|
text-align: left
|
||||||
size: 86 20
|
size: 86 22
|
||||||
padding: 0
|
padding: 0
|
||||||
padding-left: 2
|
padding-left: 2
|
||||||
|
|
||||||
Button
|
Button
|
||||||
id: up
|
id: up
|
||||||
size: 10 10
|
size: 11 11
|
||||||
image-source: /images/ui/spinbox_up
|
image-source: /images/ui/spinbox_up
|
||||||
image-border: 1
|
image-border: 1
|
||||||
image-clip: 0 0 10 10
|
image-clip: 0 0 10 10
|
||||||
@@ -21,7 +21,7 @@ SpinBox < TextEdit
|
|||||||
|
|
||||||
Button
|
Button
|
||||||
id: down
|
id: down
|
||||||
size: 10 10
|
size: 11 11
|
||||||
image-source: /images/ui/spinbox_down
|
image-source: /images/ui/spinbox_down
|
||||||
image-border: 1
|
image-border: 1
|
||||||
image-clip: 0 0 10 10
|
image-clip: 0 0 10 10
|
||||||
|
@@ -1,47 +1,49 @@
|
|||||||
MoveableTabBar < UIMoveableTabBar
|
MoveableTabBar < UIMoveableTabBar
|
||||||
size: 80 20
|
size: 80 21
|
||||||
MoveableTabBarPanel < Panel
|
MoveableTabBarPanel < Panel
|
||||||
MoveableTabBarButton < UIButton
|
MoveableTabBarButton < UIButton
|
||||||
size: 20 20
|
size: 20 21
|
||||||
image-source: /images/ui/tabbutton_square
|
image-source: /images/ui/tabbutton_square
|
||||||
image-color: white
|
image-color: #dfdfdf
|
||||||
image-clip: 0 0 20 20
|
image-clip: 0 0 20 21
|
||||||
image-border: 3
|
image-border: 3
|
||||||
icon-color: white
|
image-border-bottom: 0
|
||||||
color: #aaaaaa
|
icon-color: #dfdfdf
|
||||||
|
color: #dfdfdf
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
padding: 5
|
padding: 5
|
||||||
|
|
||||||
$hover !checked:
|
$hover !checked:
|
||||||
image-clip: 0 20 20 20
|
image-clip: 0 21 20 21
|
||||||
color: white
|
color: #dfdfdf
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
image-color: #ffffff66
|
image-color: #dfdfdf88
|
||||||
icon-color: #888888
|
icon-color: #dfdfdf
|
||||||
|
|
||||||
$checked:
|
$checked:
|
||||||
image-clip: 0 40 20 20
|
image-clip: 0 42 20 21
|
||||||
color: #D8E7F0
|
color: #dfdfdf
|
||||||
|
|
||||||
$on !checked:
|
$on !checked:
|
||||||
color: #F55E5E
|
color: #dfdfdf
|
||||||
|
|
||||||
TabBar < UITabBar
|
TabBar < UITabBar
|
||||||
size: 80 20
|
size: 80 21
|
||||||
Panel
|
Panel
|
||||||
id: buttonsPanel
|
id: buttonsPanel
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
TabBarPanel < Panel
|
TabBarPanel < Panel
|
||||||
TabBarButton < UIButton
|
TabBarButton < UIButton
|
||||||
size: 20 20
|
size: 22 23
|
||||||
image-source: /images/ui/tabbutton_square
|
image-source: /images/ui/tabbutton_square
|
||||||
image-color: white
|
image-color: #dfdfdf
|
||||||
image-clip: 0 0 20 20
|
image-clip: 0 0 22 23
|
||||||
image-border: 3
|
image-border: 3
|
||||||
icon-color: white
|
image-border-bottom: 0
|
||||||
color: #aaaaaa
|
icon-color: #dfdfdf
|
||||||
|
color: #dfdfdf
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
padding: 5
|
padding: 5
|
||||||
|
|
||||||
@@ -53,19 +55,19 @@ TabBarButton < UIButton
|
|||||||
margin-left: 5
|
margin-left: 5
|
||||||
|
|
||||||
$hover !checked:
|
$hover !checked:
|
||||||
image-clip: 0 20 20 20
|
image-clip: 0 23 22 23
|
||||||
color: white
|
color: #dfdfdf
|
||||||
|
|
||||||
$disabled:
|
$disabled:
|
||||||
image-color: #ffffff66
|
image-color: #dfdfdf88
|
||||||
icon-color: #888888
|
icon-color: #dfdfdf
|
||||||
|
|
||||||
$checked:
|
$checked:
|
||||||
image-clip: 0 40 20 20
|
image-clip: 0 46 22 23
|
||||||
color: #80c7f8
|
color: #dfdfdf
|
||||||
|
|
||||||
$on !checked:
|
$on !checked:
|
||||||
color: #F55E5E
|
color: #dfdfdf
|
||||||
|
|
||||||
TabBarRounded < TabBar
|
TabBarRounded < TabBar
|
||||||
TabBarRoundedPanel < TabBarPanel
|
TabBarRoundedPanel < TabBarPanel
|
||||||
@@ -107,7 +109,7 @@ TabBarVerticalButton < UIButton
|
|||||||
margin-top: 10
|
margin-top: 10
|
||||||
$hover !checked:
|
$hover !checked:
|
||||||
color: white
|
color: white
|
||||||
icon-color: #cccccc
|
icon-color: #dfdfdf
|
||||||
$disabled:
|
$disabled:
|
||||||
icon-color: #333333
|
icon-color: #333333
|
||||||
$checked:
|
$checked:
|
||||||
|
4
init.lua
@@ -27,8 +27,8 @@ g_resources.setupUserWriteDir(g_app.getCompactName())
|
|||||||
-- search all packages
|
-- search all packages
|
||||||
g_resources.searchAndAddPackages('/', '.otpkg', true)
|
g_resources.searchAndAddPackages('/', '.otpkg', true)
|
||||||
|
|
||||||
-- load configurations
|
-- load settings
|
||||||
g_configs.load("/config.otml")
|
g_configs.loadSettings("/config.otml")
|
||||||
|
|
||||||
g_modules.discoverModules()
|
g_modules.discoverModules()
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@ function startup()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function init()
|
function init()
|
||||||
connect(g_app, { onRun = startup,
|
connect(g_app, { onRun = startup,
|
||||||
onExit = exit })
|
onExit = exit })
|
||||||
|
|
||||||
g_window.setMinimumSize({ width = 600, height = 480 })
|
g_window.setMinimumSize({ width = 600, height = 480 })
|
||||||
@@ -91,14 +91,14 @@ function init()
|
|||||||
g_keyboard.bindKeyDown('Ctrl+Shift+R', reloadScripts)
|
g_keyboard.bindKeyDown('Ctrl+Shift+R', reloadScripts)
|
||||||
|
|
||||||
-- generate machine uuid, this is a security measure for storing passwords
|
-- generate machine uuid, this is a security measure for storing passwords
|
||||||
if not g_crypt.setMachineUUID(g_configs.get('uuid')) then
|
if not g_crypt.setMachineUUID(g_settings.get('uuid')) then
|
||||||
g_configs.set('uuid', g_crypt.getMachineUUID())
|
g_settings.set('uuid', g_crypt.getMachineUUID())
|
||||||
g_configs.save()
|
g_settings.save()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function terminate()
|
function terminate()
|
||||||
disconnect(g_app, { onRun = startup,
|
disconnect(g_app, { onRun = startup,
|
||||||
onExit = exit })
|
onExit = exit })
|
||||||
-- save window configs
|
-- save window configs
|
||||||
g_settings.set('window-size', g_window.getUnmaximizedSize())
|
g_settings.set('window-size', g_window.getUnmaximizedSize())
|
||||||
|
@@ -243,7 +243,7 @@ function CharacterList.create(characters, account, otui)
|
|||||||
else
|
else
|
||||||
accountStatusLabel:setText(tr('Free Account'))
|
accountStatusLabel:setText(tr('Free Account'))
|
||||||
end
|
end
|
||||||
|
|
||||||
if account.premDays > 0 and account.premDays <= 7 then
|
if account.premDays > 0 and account.premDays <= 7 then
|
||||||
accountStatusLabel:setOn(true)
|
accountStatusLabel:setOn(true)
|
||||||
else
|
else
|
||||||
|
@@ -81,7 +81,7 @@ MainWindow
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: next.top
|
anchors.bottom: next.top
|
||||||
margin-bottom: 1
|
margin-bottom: 1
|
||||||
|
|
||||||
Label
|
Label
|
||||||
id: accountStatusLabel
|
id: accountStatusLabel
|
||||||
!text: tr('Free Account')
|
!text: tr('Free Account')
|
||||||
|
@@ -35,7 +35,7 @@ end
|
|||||||
|
|
||||||
local function onCharacterList(protocol, characters, account, otui)
|
local function onCharacterList(protocol, characters, account, otui)
|
||||||
-- Try add server to the server list
|
-- Try add server to the server list
|
||||||
ServerList.add(G.host, G.port, g_game.getProtocolVersion())
|
ServerList.add(G.host, G.port, g_game.getClientVersion())
|
||||||
|
|
||||||
if enterGame:getChildById('rememberPasswordBox'):isChecked() then
|
if enterGame:getChildById('rememberPasswordBox'):isChecked() then
|
||||||
local account = g_crypt.encrypt(G.account)
|
local account = g_crypt.encrypt(G.account)
|
||||||
@@ -82,7 +82,7 @@ local function onUpdateNeeded(protocol, signature)
|
|||||||
local cancelFunc = EnterGame.show
|
local cancelFunc = EnterGame.show
|
||||||
EnterGame.updateFunc(signature, continueFunc, cancelFunc)
|
EnterGame.updateFunc(signature, continueFunc, cancelFunc)
|
||||||
else
|
else
|
||||||
local errorBox = displayErrorBox(tr('Update needed'), tr('Your client needs update, try redownloading it.'))
|
local errorBox = displayErrorBox(tr('Update needed'), tr('Your client needs updating, try redownloading it.'))
|
||||||
connect(errorBox, { onOk = EnterGame.show })
|
connect(errorBox, { onOk = EnterGame.show })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -225,7 +225,7 @@ function EnterGame.doLogin()
|
|||||||
|
|
||||||
g_settings.set('host', G.host)
|
g_settings.set('host', G.host)
|
||||||
g_settings.set('port', G.port)
|
g_settings.set('port', G.port)
|
||||||
g_settings.set('client-version', clientVersion)
|
g_settings.set('client-version', clientVersion)
|
||||||
|
|
||||||
protocolLogin = ProtocolLogin.create()
|
protocolLogin = ProtocolLogin.create()
|
||||||
protocolLogin.onLoginError = onError
|
protocolLogin.onLoginError = onError
|
||||||
@@ -242,7 +242,7 @@ function EnterGame.doLogin()
|
|||||||
|
|
||||||
g_game.chooseRsa(G.host)
|
g_game.chooseRsa(G.host)
|
||||||
g_game.setClientVersion(clientVersion)
|
g_game.setClientVersion(clientVersion)
|
||||||
g_game.setProtocolVersion(g_game.getProtocolVersionForClient(clientVersion))
|
g_game.setProtocolVersion(g_game.getClientProtocolVersion(clientVersion))
|
||||||
|
|
||||||
if modules.game_things.isLoaded() then
|
if modules.game_things.isLoaded() then
|
||||||
protocolLogin:login(G.host, G.port, G.account, G.password)
|
protocolLogin:login(G.host, G.port, G.account, G.password)
|
||||||
|
@@ -92,6 +92,9 @@ EnterGameWindow
|
|||||||
margin-top: 2
|
margin-top: 2
|
||||||
margin-right: 3
|
margin-right: 3
|
||||||
width: 90
|
width: 90
|
||||||
|
menu-scroll: true
|
||||||
|
menu-height: 125
|
||||||
|
menu-scroll-step: 25
|
||||||
|
|
||||||
MenuLabel
|
MenuLabel
|
||||||
id: portLabel
|
id: portLabel
|
||||||
|
@@ -14,7 +14,8 @@ function init()
|
|||||||
g_keyboard.bindKeyPress('Up', function() moduleList:focusPreviousChild(KeyboardFocusReason) end, moduleManagerWindow)
|
g_keyboard.bindKeyPress('Up', function() moduleList:focusPreviousChild(KeyboardFocusReason) end, moduleManagerWindow)
|
||||||
g_keyboard.bindKeyPress('Down', function() moduleList:focusNextChild(KeyboardFocusReason) end, moduleManagerWindow)
|
g_keyboard.bindKeyPress('Down', function() moduleList:focusNextChild(KeyboardFocusReason) end, moduleManagerWindow)
|
||||||
|
|
||||||
moduleManagerButton = modules.client_topmenu.addLeftButton('moduleManagerButton', tr('Module Manager'), '/images/topbuttons/modulemanager', toggle)
|
moduleManagerButton = modules.client_topmenu.addLeftButton('moduleManagerButton',
|
||||||
|
tr('Module Manager'), '/images/topbuttons/modulemanager', toggle)
|
||||||
|
|
||||||
-- refresh modules only after all modules are loaded
|
-- refresh modules only after all modules are loaded
|
||||||
addEvent(listModules)
|
addEvent(listModules)
|
||||||
|
@@ -39,10 +39,10 @@ Panel
|
|||||||
id: fullscreen
|
id: fullscreen
|
||||||
!text: tr('Fullscreen')
|
!text: tr('Fullscreen')
|
||||||
tooltip: Ctrl+Shift+F
|
tooltip: Ctrl+Shift+F
|
||||||
|
|
||||||
OptionCheckBox
|
OptionCheckBox
|
||||||
id: dontStretchShrink
|
id: dontStretchShrink
|
||||||
!text: tr('Don\'t stretch/shrink Game Window')
|
!text: tr('Don\'t stretch/shrink Game Window')
|
||||||
|
|
||||||
Label
|
Label
|
||||||
id: backgroundFrameRateLabel
|
id: backgroundFrameRateLabel
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
MainWindow
|
MainWindow
|
||||||
id: addServerWindow
|
id: addServerWindow
|
||||||
!text: tr('New Server')
|
!text: tr('New Server')
|
||||||
size: 180 180
|
size: 180 195
|
||||||
visible: false
|
visible: false
|
||||||
@onEscape: AddServer.hide()
|
@onEscape: AddServer.hide()
|
||||||
@onEnter: AddServer.add()
|
@onEnter: AddServer.add()
|
||||||
@@ -48,6 +48,9 @@ MainWindow
|
|||||||
anchors.top: protocolLabel.bottom
|
anchors.top: protocolLabel.bottom
|
||||||
anchors.left: protocolLabel.left
|
anchors.left: protocolLabel.left
|
||||||
anchors.right: port.right
|
anchors.right: port.right
|
||||||
|
menu-scroll: true
|
||||||
|
menu-height: 125
|
||||||
|
menu-scroll-step: 25
|
||||||
@onSetup: |
|
@onSetup: |
|
||||||
for _, proto in pairs(g_game.getSupportedClients()) do
|
for _, proto in pairs(g_game.getSupportedClients()) do
|
||||||
self:addOption(proto)
|
self:addOption(proto)
|
||||||
|
@@ -50,7 +50,7 @@ function ServerList.add(host, port, protocol, load)
|
|||||||
end
|
end
|
||||||
local widget = g_ui.createWidget('ServerWidget', serverTextList)
|
local widget = g_ui.createWidget('ServerWidget', serverTextList)
|
||||||
widget:setId(host)
|
widget:setId(host)
|
||||||
|
|
||||||
if not load then
|
if not load then
|
||||||
servers[host] = {
|
servers[host] = {
|
||||||
port = port,
|
port = port,
|
||||||
|
@@ -131,11 +131,11 @@ function init()
|
|||||||
commandTextEdit = terminalWindow:getChildById('commandTextEdit')
|
commandTextEdit = terminalWindow:getChildById('commandTextEdit')
|
||||||
g_keyboard.bindKeyPress('Up', function() navigateCommand(1) end, commandTextEdit)
|
g_keyboard.bindKeyPress('Up', function() navigateCommand(1) end, commandTextEdit)
|
||||||
g_keyboard.bindKeyPress('Down', function() navigateCommand(-1) end, commandTextEdit)
|
g_keyboard.bindKeyPress('Down', function() navigateCommand(-1) end, commandTextEdit)
|
||||||
g_keyboard.bindKeyPress('Ctrl+C',
|
g_keyboard.bindKeyPress('Ctrl+C',
|
||||||
function()
|
function()
|
||||||
if commandTextEdit:hasSelection() or not terminalSelectText:hasSelection() then return false end
|
if commandTextEdit:hasSelection() or not terminalSelectText:hasSelection() then return false end
|
||||||
g_window.setClipboardText(terminalSelectText:getSelection())
|
g_window.setClipboardText(terminalSelectText:getSelection())
|
||||||
return true
|
return true
|
||||||
end, commandTextEdit)
|
end, commandTextEdit)
|
||||||
g_keyboard.bindKeyDown('Tab', completeCommand, commandTextEdit)
|
g_keyboard.bindKeyDown('Tab', completeCommand, commandTextEdit)
|
||||||
g_keyboard.bindKeyDown('Enter', doCommand, commandTextEdit)
|
g_keyboard.bindKeyDown('Enter', doCommand, commandTextEdit)
|
||||||
@@ -202,9 +202,9 @@ function popWindow()
|
|||||||
else
|
else
|
||||||
terminalWindow:breakAnchors()
|
terminalWindow:breakAnchors()
|
||||||
terminalWindow:setOn(true)
|
terminalWindow:setOn(true)
|
||||||
local size = oldSize or { width = g_window.getWidth()/2, height = g_window.getHeight()/2 }
|
local size = oldSize or { width = g_window.getWidth()/2.5, height = g_window.getHeight()/4 }
|
||||||
terminalWindow:setSize(size)
|
terminalWindow:setSize(size)
|
||||||
local pos = oldPos or { x = (g_window.getWidth() - terminalWindow:getWidth())/2, y = (g_window.getHeight() - terminalWindow:getHeight())/2 }
|
local pos = oldPos or { x = 0, y = g_window.getHeight() }
|
||||||
terminalWindow:setPosition(pos)
|
terminalWindow:setPosition(pos)
|
||||||
terminalWindow:getChildById('bottomResizeBorder'):enable()
|
terminalWindow:getChildById('bottomResizeBorder'):enable()
|
||||||
terminalWindow:getChildById('rightResizeBorder'):enable()
|
terminalWindow:getChildById('rightResizeBorder'):enable()
|
||||||
@@ -224,7 +224,7 @@ function toggle()
|
|||||||
if not firstShown then
|
if not firstShown then
|
||||||
local settings = g_settings.getNode('terminal-window')
|
local settings = g_settings.getNode('terminal-window')
|
||||||
if settings then
|
if settings then
|
||||||
if settings.size then oldSize = size end
|
if settings.size then oldSize = settings.size end
|
||||||
if settings.pos then oldPos = settings.pos end
|
if settings.pos then oldPos = settings.pos end
|
||||||
if settings.poped then popWindow() end
|
if settings.poped then popWindow() end
|
||||||
end
|
end
|
||||||
|
@@ -27,7 +27,7 @@ local function addButton(id, description, icon, callback, panel, toggle, front)
|
|||||||
button:setTooltip(description)
|
button:setTooltip(description)
|
||||||
button:setIcon(resolvepath(icon, 3))
|
button:setIcon(resolvepath(icon, 3))
|
||||||
button.onMouseRelease = function(widget, mousePos, mouseButton)
|
button.onMouseRelease = function(widget, mousePos, mouseButton)
|
||||||
if widget:containsPoint(mousePos) and mouseButton ~= MouseMiddleButton then
|
if widget:containsPoint(mousePos) and mouseButton ~= MouseMidButton then
|
||||||
callback()
|
callback()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
73
modules/corelib/config.lua
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
-- @docclass
|
||||||
|
|
||||||
|
local function convertSettingValue(value)
|
||||||
|
if type(value) == 'table' then
|
||||||
|
if value.x and value.width then
|
||||||
|
return recttostring(value)
|
||||||
|
elseif value.x then
|
||||||
|
return pointtostring(value)
|
||||||
|
elseif value.width then
|
||||||
|
return sizetostring(value)
|
||||||
|
elseif value.r then
|
||||||
|
return colortostring(value)
|
||||||
|
else
|
||||||
|
return value
|
||||||
|
end
|
||||||
|
elseif value == nil then
|
||||||
|
return ''
|
||||||
|
else
|
||||||
|
return tostring(value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Config:set(key, value)
|
||||||
|
self:setValue(key, convertSettingValue(value))
|
||||||
|
end
|
||||||
|
|
||||||
|
function Config:setDefault(key, value)
|
||||||
|
if self:exists(key) then return false end
|
||||||
|
self:set(key, value)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function Config:get(key, default)
|
||||||
|
if not self:exists(key) and default ~= nil then
|
||||||
|
self:set(key, default)
|
||||||
|
end
|
||||||
|
return self:getValue(key)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Config:getString(key, default)
|
||||||
|
return self:get(key, default)
|
||||||
|
end
|
||||||
|
|
||||||
|
function Config:getInteger(key, default)
|
||||||
|
local v = tonumber(self:get(key, default)) or 0
|
||||||
|
return v
|
||||||
|
end
|
||||||
|
|
||||||
|
function Config:getNumber(key, default)
|
||||||
|
local v = tonumber(self:get(key, default)) or 0
|
||||||
|
return v
|
||||||
|
end
|
||||||
|
|
||||||
|
function Config:getBoolean(key, default)
|
||||||
|
return toboolean(self:get(key, default))
|
||||||
|
end
|
||||||
|
|
||||||
|
function Config:getPoint(key, default)
|
||||||
|
return topoint(self:get(key, default))
|
||||||
|
end
|
||||||
|
|
||||||
|
function Config:getRect(key, default)
|
||||||
|
return torect(self:get(key, default))
|
||||||
|
end
|
||||||
|
|
||||||
|
function Config:getSize(key, default)
|
||||||
|
return tosize(self:get(key, default))
|
||||||
|
end
|
||||||
|
|
||||||
|
function Config:getColor(key, default)
|
||||||
|
return tocolor(self:get(key, default))
|
||||||
|
end
|
||||||
|
|
@@ -14,12 +14,14 @@ Module
|
|||||||
dofile 'const'
|
dofile 'const'
|
||||||
dofile 'util'
|
dofile 'util'
|
||||||
dofile 'globals'
|
dofile 'globals'
|
||||||
|
dofile 'config'
|
||||||
dofile 'settings'
|
dofile 'settings'
|
||||||
dofile 'keyboard'
|
dofile 'keyboard'
|
||||||
dofile 'mouse'
|
dofile 'mouse'
|
||||||
dofile 'net'
|
dofile 'net'
|
||||||
|
|
||||||
|
dofiles 'classes'
|
||||||
dofiles 'ui'
|
dofiles 'ui'
|
||||||
|
|
||||||
dofile 'inputmessage'
|
dofile 'inputmessage'
|
||||||
dofile 'outputmessage'
|
dofile 'outputmessage'
|
@@ -1,86 +1,3 @@
|
|||||||
-- @docclass
|
g_settings = makesingleton(g_configs.getSettings())
|
||||||
g_settings = {}
|
|
||||||
|
|
||||||
g_settings.exists = g_configs.exists
|
-- Reserved for future functionality
|
||||||
g_settings.setNode = g_configs.setNode
|
|
||||||
g_settings.mergeNode = g_configs.mergeNode
|
|
||||||
g_settings.getNode = g_configs.getNode
|
|
||||||
g_settings.remove = g_configs.remove
|
|
||||||
g_settings.setList = g_configs.setList
|
|
||||||
g_settings.getList = g_configs.getList
|
|
||||||
g_settings.save = g_configs.save
|
|
||||||
|
|
||||||
local function convertSettingValue(value)
|
|
||||||
if type(value) == 'table' then
|
|
||||||
if value.x and value.width then
|
|
||||||
return recttostring(value)
|
|
||||||
elseif value.x then
|
|
||||||
return pointtostring(value)
|
|
||||||
elseif value.width then
|
|
||||||
return sizetostring(value)
|
|
||||||
elseif value.r then
|
|
||||||
return colortostring(value)
|
|
||||||
else
|
|
||||||
return value
|
|
||||||
end
|
|
||||||
elseif value == nil then
|
|
||||||
return ''
|
|
||||||
else
|
|
||||||
return tostring(value)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.set(key, value)
|
|
||||||
g_configs.set(key, convertSettingValue(value))
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.setDefault(key, value)
|
|
||||||
if g_settings.exists(key) then return false end
|
|
||||||
g_settings.set(key, value)
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.get(key, default)
|
|
||||||
if not g_settings.exists(key) and default ~= nil then
|
|
||||||
g_settings.set(key, default)
|
|
||||||
end
|
|
||||||
return g_configs.get(key)
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.getString(key, default)
|
|
||||||
return g_settings.get(key, default)
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.getInteger(key, default)
|
|
||||||
local v = tonumber(g_settings.get(key, default)) or 0
|
|
||||||
return v
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.getNumber(key, default)
|
|
||||||
local v = tonumber(g_settings.get(key, default)) or 0
|
|
||||||
return v
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.getBoolean(key, default)
|
|
||||||
return toboolean(g_settings.get(key, default))
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.getPoint(key, default)
|
|
||||||
return topoint(g_settings.get(key, default))
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.getRect(key, default)
|
|
||||||
return torect(g_settings.get(key, default))
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.getSize(key, default)
|
|
||||||
return tosize(g_settings.get(key, default))
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.getColor(key, default)
|
|
||||||
return tocolor(g_settings.get(key, default))
|
|
||||||
end
|
|
||||||
|
|
||||||
function g_settings.getColor(key, default)
|
|
||||||
return tocolor(g_settings.get(key, default))
|
|
||||||
end
|
|
||||||
|
@@ -49,3 +49,11 @@ function string:explode(sep, limit)
|
|||||||
table.insert(t, tmp)
|
table.insert(t, tmp)
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function string:contains(str, checkCase, start, plain)
|
||||||
|
if(not checkCase) then
|
||||||
|
self = self:lower()
|
||||||
|
str = str:lower()
|
||||||
|
end
|
||||||
|
return string.find(self, str, start and start or 1, plain == nil and true or false)
|
||||||
|
end
|
||||||
|
@@ -55,7 +55,7 @@ end
|
|||||||
|
|
||||||
function table.find(t, value, lowercase)
|
function table.find(t, value, lowercase)
|
||||||
for k,v in pairs(t) do
|
for k,v in pairs(t) do
|
||||||
if lowercase and type(value) == 'string' and type(v) == 'string' then
|
if lowercase and type(value) == 'string' and type(v) == 'string' then
|
||||||
if v:lower() == value:lower() then return k end
|
if v:lower() == value:lower() then return k end
|
||||||
end
|
end
|
||||||
if v == value then return k end
|
if v == value then return k end
|
||||||
@@ -64,7 +64,7 @@ end
|
|||||||
|
|
||||||
function table.findbykey(t, key, lowercase)
|
function table.findbykey(t, key, lowercase)
|
||||||
for k,v in pairs(t) do
|
for k,v in pairs(t) do
|
||||||
if lowercase and type(key) == 'string' and type(k) == 'string' then
|
if lowercase and type(key) == 'string' and type(k) == 'string' then
|
||||||
if k:lower() == key:lower() then return v end
|
if k:lower() == key:lower() then return v end
|
||||||
end
|
end
|
||||||
if k == key then return v end
|
if k == key then return v end
|
||||||
@@ -149,7 +149,7 @@ function table.size(t)
|
|||||||
for i, n in pairs(t) do
|
for i, n in pairs(t) do
|
||||||
size = size + 1
|
size = size + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
return size
|
return size
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -157,6 +157,7 @@ function table.tostring(t)
|
|||||||
local maxn = #t
|
local maxn = #t
|
||||||
local str = ""
|
local str = ""
|
||||||
for k,v in pairs(t) do
|
for k,v in pairs(t) do
|
||||||
|
v = tostring(v)
|
||||||
if k == maxn and k ~= 1 then
|
if k == maxn and k ~= 1 then
|
||||||
str = str .. " and " .. v
|
str = str .. " and " .. v
|
||||||
elseif maxn > 1 and k ~= 1 then
|
elseif maxn > 1 and k ~= 1 then
|
||||||
@@ -181,3 +182,11 @@ function table.collect(t, func)
|
|||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function table.equals(t, comp)
|
||||||
|
if type(t) == "table" and type(comp) == "table" then
|
||||||
|
for k,v in pairs(t) do
|
||||||
|
if v ~= comp[k] then return false end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIButton = extends(UIWidget)
|
UIButton = extends(UIWidget, "UIButton")
|
||||||
|
|
||||||
function UIButton.create()
|
function UIButton.create()
|
||||||
local button = UIButton.internalCreate()
|
local button = UIButton.internalCreate()
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UICheckBox = extends(UIWidget)
|
UICheckBox = extends(UIWidget, "UICheckBox")
|
||||||
|
|
||||||
function UICheckBox.create()
|
function UICheckBox.create()
|
||||||
local checkbox = UICheckBox.internalCreate()
|
local checkbox = UICheckBox.internalCreate()
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIComboBox = extends(UIWidget)
|
UIComboBox = extends(UIWidget, "UIComboBox")
|
||||||
|
|
||||||
function UIComboBox.create()
|
function UIComboBox.create()
|
||||||
local combobox = UIComboBox.internalCreate()
|
local combobox = UIComboBox.internalCreate()
|
||||||
@@ -7,6 +7,9 @@ function UIComboBox.create()
|
|||||||
combobox.options = {}
|
combobox.options = {}
|
||||||
combobox.currentIndex = -1
|
combobox.currentIndex = -1
|
||||||
combobox.mouseScroll = true
|
combobox.mouseScroll = true
|
||||||
|
combobox.menuScroll = false
|
||||||
|
combobox.menuHeight = 100
|
||||||
|
combobox.menuScrollStep = 0
|
||||||
return combobox
|
return combobox
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -25,25 +28,33 @@ function UIComboBox:getOption(text)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIComboBox:setCurrentOption(text)
|
function UIComboBox:setOption(text, dontSignal)
|
||||||
|
self:setCurrentOption(text, dontSignal)
|
||||||
|
end
|
||||||
|
|
||||||
|
function UIComboBox:setCurrentOption(text, dontSignal)
|
||||||
if not self.options then return end
|
if not self.options then return end
|
||||||
for i,v in ipairs(self.options) do
|
for i,v in ipairs(self.options) do
|
||||||
if v.text == text and self.currentIndex ~= i then
|
if v.text == text and self.currentIndex ~= i then
|
||||||
self.currentIndex = i
|
self.currentIndex = i
|
||||||
self:setText(text)
|
self:setText(text)
|
||||||
signalcall(self.onOptionChange, self, text, v.data)
|
if not dontSignal then
|
||||||
|
signalcall(self.onOptionChange, self, text, v.data)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIComboBox:setCurrentOptionByData(data)
|
function UIComboBox:setCurrentOptionByData(data, dontSignal)
|
||||||
if not self.options then return end
|
if not self.options then return end
|
||||||
for i,v in ipairs(self.options) do
|
for i,v in ipairs(self.options) do
|
||||||
if v.data == data and self.currentIndex ~= i then
|
if v.data == data and self.currentIndex ~= i then
|
||||||
self.currentIndex = i
|
self.currentIndex = i
|
||||||
self:setText(v.text)
|
self:setText(v.text)
|
||||||
signalcall(self.onOptionChange, self, v.text, v.data)
|
if not dontSignal then
|
||||||
|
signalcall(self.onOptionChange, self, v.text, v.data)
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -86,7 +97,16 @@ function UIComboBox:removeOption(text)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function UIComboBox:onMousePress(mousePos, mouseButton)
|
function UIComboBox:onMousePress(mousePos, mouseButton)
|
||||||
local menu = g_ui.createWidget(self:getStyleName() .. 'PopupMenu')
|
local menu
|
||||||
|
if self.menuScroll then
|
||||||
|
menu = g_ui.createWidget(self:getStyleName() .. 'PopupScrollMenu')
|
||||||
|
menu:setHeight(self.menuHeight)
|
||||||
|
if self.menuScrollStep > 0 then
|
||||||
|
menu:setScrollbarStep(self.menuScrollStep)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
menu = g_ui.createWidget(self:getStyleName() .. 'PopupMenu')
|
||||||
|
end
|
||||||
menu:setId(self:getId() .. 'PopupMenu')
|
menu:setId(self:getId() .. 'PopupMenu')
|
||||||
for i,v in ipairs(self.options) do
|
for i,v in ipairs(self.options) do
|
||||||
menu:addOption(v.text, function() self:setCurrentOption(v.text) end)
|
menu:addOption(v.text, function() self:setCurrentOption(v.text) end)
|
||||||
@@ -129,6 +149,12 @@ function UIComboBox:onStyleApply(styleName, styleNode)
|
|||||||
for name,value in pairs(styleNode) do
|
for name,value in pairs(styleNode) do
|
||||||
if name == 'mouse-scroll' then
|
if name == 'mouse-scroll' then
|
||||||
self.mouseScroll = value
|
self.mouseScroll = value
|
||||||
|
elseif name == 'menu-scroll' then
|
||||||
|
self.menuScroll = value
|
||||||
|
elseif name == 'menu-height' then
|
||||||
|
self.menuHeight = value
|
||||||
|
elseif name == 'menu-scroll-step' then
|
||||||
|
self.menuScrollStep = value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIImageView = extends(UIWidget)
|
UIImageView = extends(UIWidget, "UIImageView")
|
||||||
|
|
||||||
function UIImageView.create()
|
function UIImageView.create()
|
||||||
local imageView = UIImageView.internalCreate()
|
local imageView = UIImageView.internalCreate()
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
if not UIWindow then dofile 'uiwindow' end
|
if not UIWindow then dofile 'uiwindow' end
|
||||||
|
|
||||||
-- @docclass
|
-- @docclass
|
||||||
UIInputBox = extends(UIWindow)
|
UIInputBox = extends(UIWindow, "UIInputBox")
|
||||||
|
|
||||||
function UIInputBox.create(title, okCallback, cancelCallback)
|
function UIInputBox.create(title, okCallback, cancelCallback)
|
||||||
local inputBox = UIInputBox.internalCreate()
|
local inputBox = UIInputBox.internalCreate()
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UILabel = extends(UIWidget)
|
UILabel = extends(UIWidget, "UILabel")
|
||||||
|
|
||||||
function UILabel.create()
|
function UILabel.create()
|
||||||
local label = UILabel.internalCreate()
|
local label = UILabel.internalCreate()
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
if not UIWindow then dofile 'uiwindow' end
|
if not UIWindow then dofile 'uiwindow' end
|
||||||
|
|
||||||
-- @docclass
|
-- @docclass
|
||||||
UIMessageBox = extends(UIWindow)
|
UIMessageBox = extends(UIWindow, "UIMessageBox")
|
||||||
|
|
||||||
-- messagebox cannot be created from otui files
|
-- messagebox cannot be created from otui files
|
||||||
UIMessageBox.create = nil
|
UIMessageBox.create = nil
|
||||||
|
@@ -1,15 +1,11 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIMiniWindow = extends(UIWindow)
|
UIMiniWindow = extends(UIWindow, "UIMiniWindow")
|
||||||
|
|
||||||
function UIMiniWindow.create()
|
function UIMiniWindow.create()
|
||||||
local miniwindow = UIMiniWindow.internalCreate()
|
local miniwindow = UIMiniWindow.internalCreate()
|
||||||
return miniwindow
|
return miniwindow
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIMiniWindow:getClassName()
|
|
||||||
return 'UIMiniWindow'
|
|
||||||
end
|
|
||||||
|
|
||||||
function UIMiniWindow:open(dontSave)
|
function UIMiniWindow:open(dontSave)
|
||||||
self:setVisible(true)
|
self:setVisible(true)
|
||||||
|
|
||||||
@@ -81,7 +77,7 @@ function UIMiniWindow:setup()
|
|||||||
self:minimize()
|
self:minimize()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self:getChildById('miniwindowTopBar').onDoubleClick =
|
self:getChildById('miniwindowTopBar').onDoubleClick =
|
||||||
function()
|
function()
|
||||||
if self:isOn() then
|
if self:isOn() then
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIMiniWindowContainer = extends(UIWidget)
|
UIMiniWindowContainer = extends(UIWidget, "UIMiniWindowContainer")
|
||||||
|
|
||||||
function UIMiniWindowContainer.create()
|
function UIMiniWindowContainer.create()
|
||||||
local container = UIMiniWindowContainer.internalCreate()
|
local container = UIMiniWindowContainer.internalCreate()
|
||||||
@@ -9,10 +9,6 @@ function UIMiniWindowContainer.create()
|
|||||||
return container
|
return container
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIMiniWindowContainer:getClassName()
|
|
||||||
return 'UIMiniWindowContainer'
|
|
||||||
end
|
|
||||||
|
|
||||||
-- TODO: connect to window onResize event
|
-- TODO: connect to window onResize event
|
||||||
-- TODO: try to resize another widget?
|
-- TODO: try to resize another widget?
|
||||||
-- TODO: try to find another panel?
|
-- TODO: try to find another panel?
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIMoveableTabBar = extends(UIWidget)
|
UIMoveableTabBar = extends(UIWidget, "UIMoveableTabBar")
|
||||||
|
|
||||||
-- private functions
|
-- private functions
|
||||||
local function onTabClick(tab)
|
local function onTabClick(tab)
|
||||||
@@ -8,7 +8,7 @@ end
|
|||||||
|
|
||||||
local function updateMargins(tabBar, ignored)
|
local function updateMargins(tabBar, ignored)
|
||||||
if #tabBar.tabs == 0 then return end
|
if #tabBar.tabs == 0 then return end
|
||||||
|
|
||||||
local currentMargin = 0
|
local currentMargin = 0
|
||||||
for i = 1, #tabBar.tabs do
|
for i = 1, #tabBar.tabs do
|
||||||
tabBar.tabs[i]:setMarginLeft(currentMargin)
|
tabBar.tabs[i]:setMarginLeft(currentMargin)
|
||||||
@@ -279,17 +279,17 @@ end
|
|||||||
function UIMoveableTabBar:moveTab(tab, units)
|
function UIMoveableTabBar:moveTab(tab, units)
|
||||||
local index = table.find(self.tabs, tab)
|
local index = table.find(self.tabs, tab)
|
||||||
if index == nil then return end
|
if index == nil then return end
|
||||||
|
|
||||||
local focus = false
|
local focus = false
|
||||||
if self.currentTab == tab then
|
if self.currentTab == tab then
|
||||||
self:selectPrevTab()
|
self:selectPrevTab()
|
||||||
focus = true
|
focus = true
|
||||||
end
|
end
|
||||||
|
|
||||||
table.remove(self.tabs, index)
|
table.remove(self.tabs, index)
|
||||||
|
|
||||||
local newIndex = math.min(#self.tabs+1, math.max(index + units, 1))
|
local newIndex = math.min(#self.tabs+1, math.max(index + units, 1))
|
||||||
table.insert(self.tabs, newIndex, tab)
|
table.insert(self.tabs, newIndex, tab)
|
||||||
if focus then self:selectTab(tab) end
|
if focus then self:selectTab(tab) end
|
||||||
updateMargins(self)
|
updateMargins(self)
|
||||||
return newIndex
|
return newIndex
|
||||||
@@ -389,8 +389,16 @@ function UIMoveableTabBar:selectNextTab()
|
|||||||
if #self.postTabs > 0 then
|
if #self.postTabs > 0 then
|
||||||
local widget = showPostTab(self)
|
local widget = showPostTab(self)
|
||||||
self:selectTab(widget)
|
self:selectTab(widget)
|
||||||
updateTabs(self)
|
else
|
||||||
|
if #self.preTabs > 0 then
|
||||||
|
for i = 1, #self.preTabs do
|
||||||
|
showPreTab(self)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
self:selectTab(self.tabs[1])
|
||||||
end
|
end
|
||||||
|
updateTabs(self)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -417,8 +425,16 @@ function UIMoveableTabBar:selectPrevTab()
|
|||||||
if #self.preTabs > 0 then
|
if #self.preTabs > 0 then
|
||||||
local widget = showPreTab(self)
|
local widget = showPreTab(self)
|
||||||
self:selectTab(widget)
|
self:selectTab(widget)
|
||||||
updateTabs(self)
|
else
|
||||||
|
if #self.postTabs > 0 then
|
||||||
|
for i = 1, #self.postTabs do
|
||||||
|
showPostTab(self)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
self:selectTab(self.tabs[#self.tabs])
|
||||||
end
|
end
|
||||||
|
updateTabs(self)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -461,4 +477,4 @@ function UIMoveableTabBar:setNavigation(prevButton, nextButton)
|
|||||||
nextNavigation.onClick = function() self:selectNextTab() end
|
nextNavigation.onClick = function() self:selectNextTab() end
|
||||||
end
|
end
|
||||||
updateNavigation(self)
|
updateNavigation(self)
|
||||||
end
|
end
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIPopupMenu = extends(UIWidget)
|
UIPopupMenu = extends(UIWidget, "UIPopupMenu")
|
||||||
|
|
||||||
local currentMenu
|
local currentMenu
|
||||||
|
|
||||||
@@ -56,9 +56,8 @@ end
|
|||||||
|
|
||||||
function UIPopupMenu:addOption(optionName, optionCallback, shortcut)
|
function UIPopupMenu:addOption(optionName, optionCallback, shortcut)
|
||||||
local optionWidget = g_ui.createWidget(self:getStyleName() .. 'Button', self)
|
local optionWidget = g_ui.createWidget(self:getStyleName() .. 'Button', self)
|
||||||
local lastOptionWidget = self:getLastChild()
|
optionWidget.onClick = function(widget)
|
||||||
optionWidget.onClick = function(self)
|
self:destroy()
|
||||||
self:getParent():destroy()
|
|
||||||
optionCallback()
|
optionCallback()
|
||||||
end
|
end
|
||||||
optionWidget:setText(optionName)
|
optionWidget:setText(optionName)
|
||||||
|
129
modules/corelib/ui/uipopupscrollmenu.lua
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
-- @docclass
|
||||||
|
UIPopupScrollMenu = extends(UIWidget, "UIPopupScrollMenu")
|
||||||
|
|
||||||
|
local currentMenu
|
||||||
|
|
||||||
|
function UIPopupScrollMenu.create()
|
||||||
|
local menu = UIPopupScrollMenu.internalCreate()
|
||||||
|
|
||||||
|
local scrollArea = g_ui.createWidget('UIScrollArea', menu)
|
||||||
|
scrollArea:setLayout(UIVerticalLayout.create(menu))
|
||||||
|
scrollArea:setId('scrollArea')
|
||||||
|
|
||||||
|
local scrollBar = g_ui.createWidget('VerticalScrollBar', menu)
|
||||||
|
scrollBar:setId('scrollBar')
|
||||||
|
scrollBar.pixelsScroll = false
|
||||||
|
|
||||||
|
scrollBar:addAnchor(AnchorRight, 'parent', AnchorRight)
|
||||||
|
scrollBar:addAnchor(AnchorTop, 'parent', AnchorTop)
|
||||||
|
scrollBar:addAnchor(AnchorBottom, 'parent', AnchorBottom)
|
||||||
|
|
||||||
|
scrollArea:addAnchor(AnchorLeft, 'parent', AnchorLeft)
|
||||||
|
scrollArea:addAnchor(AnchorTop, 'parent', AnchorTop)
|
||||||
|
scrollArea:addAnchor(AnchorBottom, 'parent', AnchorBottom)
|
||||||
|
scrollArea:addAnchor(AnchorRight, 'next', AnchorLeft)
|
||||||
|
scrollArea:setVerticalScrollBar(scrollBar)
|
||||||
|
|
||||||
|
menu.scrollArea = scrollArea
|
||||||
|
menu.scrollBar = scrollBar
|
||||||
|
return menu
|
||||||
|
end
|
||||||
|
|
||||||
|
function UIPopupScrollMenu:setScrollbarStep(step)
|
||||||
|
self.scrollBar:setStep(step)
|
||||||
|
end
|
||||||
|
|
||||||
|
function UIPopupScrollMenu:display(pos)
|
||||||
|
-- don't display if not options was added
|
||||||
|
if self.scrollArea:getChildCount() == 0 then
|
||||||
|
self:destroy()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if g_ui.isMouseGrabbed() then
|
||||||
|
self:destroy()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if currentMenu then
|
||||||
|
currentMenu:destroy()
|
||||||
|
end
|
||||||
|
|
||||||
|
if pos == nil then
|
||||||
|
pos = g_window.getMousePosition()
|
||||||
|
end
|
||||||
|
|
||||||
|
rootWidget:addChild(self)
|
||||||
|
self:setPosition(pos)
|
||||||
|
self:grabMouse()
|
||||||
|
currentMenu = self
|
||||||
|
end
|
||||||
|
|
||||||
|
function UIPopupScrollMenu:onGeometryChange(oldRect, newRect)
|
||||||
|
local parent = self:getParent()
|
||||||
|
if not parent then return end
|
||||||
|
local ymax = parent:getY() + parent:getHeight()
|
||||||
|
local xmax = parent:getX() + parent:getWidth()
|
||||||
|
if newRect.y + newRect.height > ymax then
|
||||||
|
local newy = newRect.y - newRect.height
|
||||||
|
if newy > 0 and newy + newRect.height < ymax then self:setY(newy) end
|
||||||
|
end
|
||||||
|
if newRect.x + newRect.width > xmax then
|
||||||
|
local newx = newRect.x - newRect.width
|
||||||
|
if newx > 0 and newx + newRect.width < xmax then self:setX(newx) end
|
||||||
|
end
|
||||||
|
self:bindRectToParent()
|
||||||
|
end
|
||||||
|
|
||||||
|
function UIPopupScrollMenu:addOption(optionName, optionCallback, shortcut)
|
||||||
|
local optionWidget = g_ui.createWidget(self:getStyleName() .. 'Button', self.scrollArea)
|
||||||
|
optionWidget.onClick = function(widget)
|
||||||
|
self:destroy()
|
||||||
|
optionCallback()
|
||||||
|
end
|
||||||
|
optionWidget:setText(optionName)
|
||||||
|
local width = optionWidget:getTextSize().width + optionWidget:getMarginLeft() + optionWidget:getMarginRight() + 15
|
||||||
|
|
||||||
|
if shortcut then
|
||||||
|
local shortcutLabel = g_ui.createWidget(self:getStyleName() .. 'ShortcutLabel', optionWidget)
|
||||||
|
shortcutLabel:setText(shortcut)
|
||||||
|
width = width + shortcutLabel:getTextSize().width + shortcutLabel:getMarginLeft() + shortcutLabel:getMarginRight()
|
||||||
|
end
|
||||||
|
|
||||||
|
self:setWidth(math.max(self:getWidth(), width))
|
||||||
|
end
|
||||||
|
|
||||||
|
function UIPopupScrollMenu:addSeparator()
|
||||||
|
g_ui.createWidget(self:getStyleName() .. 'Separator', self.scrollArea)
|
||||||
|
end
|
||||||
|
|
||||||
|
function UIPopupScrollMenu:onDestroy()
|
||||||
|
if currentMenu == self then
|
||||||
|
currentMenu = nil
|
||||||
|
end
|
||||||
|
self:ungrabMouse()
|
||||||
|
end
|
||||||
|
|
||||||
|
function UIPopupScrollMenu:onMousePress(mousePos, mouseButton)
|
||||||
|
-- clicks outside menu area destroys the menu
|
||||||
|
if not self:containsPoint(mousePos) then
|
||||||
|
self:destroy()
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function UIPopupScrollMenu:onKeyPress(keyCode, keyboardModifiers)
|
||||||
|
if keyCode == KeyEscape then
|
||||||
|
self:destroy()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- close all menus when the window is resized
|
||||||
|
local function onRootGeometryUpdate()
|
||||||
|
if currentMenu then
|
||||||
|
currentMenu:destroy()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
connect(rootWidget, { onGeometryChange = onRootGeometryUpdate} )
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIProgressBar = extends(UIWidget)
|
UIProgressBar = extends(UIWidget, "UIProgressBar")
|
||||||
|
|
||||||
function UIProgressBar.create()
|
function UIProgressBar.create()
|
||||||
local progressbar = UIProgressBar.internalCreate()
|
local progressbar = UIProgressBar.internalCreate()
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIRadioGroup = newclass()
|
UIRadioGroup = newclass("UIRadioGroup")
|
||||||
|
|
||||||
function UIRadioGroup.create()
|
function UIRadioGroup.create()
|
||||||
local radiogroup = UIRadioGroup.internalCreate()
|
local radiogroup = UIRadioGroup.internalCreate()
|
||||||
@@ -28,7 +28,7 @@ function UIRadioGroup:removeWidget(widget)
|
|||||||
table.removevalue(self.widgets, widget)
|
table.removevalue(self.widgets, widget)
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIRadioGroup:selectWidget(selectedWidget)
|
function UIRadioGroup:selectWidget(selectedWidget, dontSignal)
|
||||||
if selectedWidget == self.selectedWidget then return end
|
if selectedWidget == self.selectedWidget then return end
|
||||||
|
|
||||||
local previousSelectedWidget = self.selectedWidget
|
local previousSelectedWidget = self.selectedWidget
|
||||||
@@ -42,12 +42,14 @@ function UIRadioGroup:selectWidget(selectedWidget)
|
|||||||
selectedWidget:setChecked(true)
|
selectedWidget:setChecked(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
signalcall(self.onSelectionChange, self, selectedWidget, previousSelectedWidget)
|
if not dontSignal then
|
||||||
|
signalcall(self.onSelectionChange, self, selectedWidget, previousSelectedWidget)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIRadioGroup:clearSelected()
|
function UIRadioGroup:clearSelected()
|
||||||
if not self.selectedWidget then return end
|
if not self.selectedWidget then return end
|
||||||
|
|
||||||
local previousSelectedWidget = self.selectedWidget
|
local previousSelectedWidget = self.selectedWidget
|
||||||
self.selectedWidget:setChecked(false)
|
self.selectedWidget:setChecked(false)
|
||||||
self.selectedWidget = nil
|
self.selectedWidget = nil
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIResizeBorder = extends(UIWidget)
|
UIResizeBorder = extends(UIWidget, "UIResizeBorder")
|
||||||
|
|
||||||
function UIResizeBorder.create()
|
function UIResizeBorder.create()
|
||||||
local resizeborder = UIResizeBorder.internalCreate()
|
local resizeborder = UIResizeBorder.internalCreate()
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIScrollArea = extends(UIWidget)
|
UIScrollArea = extends(UIWidget, "UIScrollArea")
|
||||||
|
|
||||||
-- public functions
|
-- public functions
|
||||||
function UIScrollArea.create()
|
function UIScrollArea.create()
|
||||||
@@ -107,15 +107,37 @@ end
|
|||||||
|
|
||||||
function UIScrollArea:onMouseWheel(mousePos, mouseWheel)
|
function UIScrollArea:onMouseWheel(mousePos, mouseWheel)
|
||||||
if self.verticalScrollBar then
|
if self.verticalScrollBar then
|
||||||
|
if not self.verticalScrollBar:isOn() then
|
||||||
|
return false
|
||||||
|
end
|
||||||
if mouseWheel == MouseWheelUp then
|
if mouseWheel == MouseWheelUp then
|
||||||
|
local minimum = self.verticalScrollBar:getMinimum()
|
||||||
|
if self.verticalScrollBar:getValue() <= minimum then
|
||||||
|
return false
|
||||||
|
end
|
||||||
self.verticalScrollBar:decrement()
|
self.verticalScrollBar:decrement()
|
||||||
else
|
else
|
||||||
|
local maximum = self.verticalScrollBar:getMaximum()
|
||||||
|
if self.verticalScrollBar:getValue() >= maximum then
|
||||||
|
return false
|
||||||
|
end
|
||||||
self.verticalScrollBar:increment()
|
self.verticalScrollBar:increment()
|
||||||
end
|
end
|
||||||
elseif self.horizontalScrollBar then
|
elseif self.horizontalScrollBar then
|
||||||
|
if not self.horizontalScrollBar:isOn() then
|
||||||
|
return false
|
||||||
|
end
|
||||||
if mouseWheel == MouseWheelUp then
|
if mouseWheel == MouseWheelUp then
|
||||||
|
local maximum = self.horizontalScrollBar:getMaximum()
|
||||||
|
if self.horizontalScrollBar:getValue() >= maximum then
|
||||||
|
return false
|
||||||
|
end
|
||||||
self.horizontalScrollBar:increment()
|
self.horizontalScrollBar:increment()
|
||||||
else
|
else
|
||||||
|
local minimum = self.horizontalScrollBar:getMinimum()
|
||||||
|
if self.horizontalScrollBar:getValue() <= minimum then
|
||||||
|
return false
|
||||||
|
end
|
||||||
self.horizontalScrollBar:decrement()
|
self.horizontalScrollBar:decrement()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIScrollBar = extends(UIWidget)
|
UIScrollBar = extends(UIWidget, "UIScrollBar")
|
||||||
|
|
||||||
-- private functions
|
-- private functions
|
||||||
local function calcValues(self)
|
local function calcValues(self)
|
||||||
@@ -234,19 +234,23 @@ function UIScrollBar:onGeometryChange()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function UIScrollBar:onMouseWheel(mousePos, mouseWheel)
|
function UIScrollBar:onMouseWheel(mousePos, mouseWheel)
|
||||||
if not self.mouseScroll then
|
if not self.mouseScroll or not self:isOn() then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if mouseWheel == MouseWheelUp then
|
if mouseWheel == MouseWheelUp then
|
||||||
if self.orientation == 'vertical' then
|
if self.orientation == 'vertical' then
|
||||||
|
if self.value <= self.minimum then return false end
|
||||||
self:decrement()
|
self:decrement()
|
||||||
else
|
else
|
||||||
|
if self.value >= self.maximum then return false end
|
||||||
self:increment()
|
self:increment()
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if self.orientation == 'vertical' then
|
if self.orientation == 'vertical' then
|
||||||
|
if self.value >= self.maximum then return false end
|
||||||
self:increment()
|
self:increment()
|
||||||
else
|
else
|
||||||
|
if self.value <= self.minimum then return false end
|
||||||
self:decrement()
|
self:decrement()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UISpinBox = extends(UITextEdit)
|
UISpinBox = extends(UITextEdit, "UISpinBox")
|
||||||
|
|
||||||
function UISpinBox.create()
|
function UISpinBox.create()
|
||||||
local spinbox = UISpinBox.internalCreate()
|
local spinbox = UISpinBox.internalCreate()
|
||||||
@@ -7,11 +7,13 @@ function UISpinBox.create()
|
|||||||
spinbox:setValidCharacters('0123456789')
|
spinbox:setValidCharacters('0123456789')
|
||||||
spinbox.displayButtons = true
|
spinbox.displayButtons = true
|
||||||
spinbox.minimum = 0
|
spinbox.minimum = 0
|
||||||
spinbox.maximum = 0
|
spinbox.maximum = 1
|
||||||
spinbox.value = 0
|
spinbox.value = 0
|
||||||
spinbox.step = 1
|
spinbox.step = 1
|
||||||
spinbox.firstchange = true
|
spinbox.firstchange = true
|
||||||
|
spinbox.mouseScroll = true
|
||||||
spinbox:setText("0")
|
spinbox:setText("0")
|
||||||
|
spinbox:setValue(1)
|
||||||
return spinbox
|
return spinbox
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -21,6 +23,9 @@ function UISpinBox:onSetup()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function UISpinBox:onMouseWheel(mousePos, direction)
|
function UISpinBox:onMouseWheel(mousePos, direction)
|
||||||
|
if not self.mouseScroll then
|
||||||
|
return false
|
||||||
|
end
|
||||||
if direction == MouseWheelUp then
|
if direction == MouseWheelUp then
|
||||||
self:up()
|
self:up()
|
||||||
elseif direction == MouseWheelDown then
|
elseif direction == MouseWheelDown then
|
||||||
@@ -70,6 +75,8 @@ function UISpinBox:onStyleApply(styleName, styleNode)
|
|||||||
addEvent(function() self:setMaximum(value) end)
|
addEvent(function() self:setMaximum(value) end)
|
||||||
elseif name == 'minimum' then
|
elseif name == 'minimum' then
|
||||||
addEvent(function() self:setMinimum(value) end)
|
addEvent(function() self:setMinimum(value) end)
|
||||||
|
elseif name == 'mouse-scroll' then
|
||||||
|
addEvent(function() self:setMouseScroll(value) end)
|
||||||
elseif name == 'buttons' then
|
elseif name == 'buttons' then
|
||||||
addEvent(function()
|
addEvent(function()
|
||||||
if value then
|
if value then
|
||||||
@@ -157,3 +164,11 @@ end
|
|||||||
function UISpinBox:setStep(step)
|
function UISpinBox:setStep(step)
|
||||||
self.step = step or 1
|
self.step = step or 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function UISpinBox:setMouseScroll(mouseScroll)
|
||||||
|
self.mouseScroll = mouseScroll
|
||||||
|
end
|
||||||
|
|
||||||
|
function UISpinBox:getMouseScroll()
|
||||||
|
return self.mouseScroll
|
||||||
|
end
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UISplitter = extends(UIWidget)
|
UISplitter = extends(UIWidget, "UISplitter")
|
||||||
|
|
||||||
function UISplitter.create()
|
function UISplitter.create()
|
||||||
local splitter = UISplitter.internalCreate()
|
local splitter = UISplitter.internalCreate()
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UITabBar = extends(UIWidget)
|
UITabBar = extends(UIWidget, "UITabBar")
|
||||||
|
|
||||||
-- private functions
|
-- private functions
|
||||||
local function onTabClick(tab)
|
local function onTabClick(tab)
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* Get dynamic row heights working with text wrapping.
|
* Get dynamic row heights working with text wrapping.
|
||||||
* Every second row different background color applied.
|
* Every second row different background color applied.
|
||||||
]]
|
]]
|
||||||
UITable = extends(UIWidget)
|
UITable = extends(UIWidget, "UITable")
|
||||||
|
|
||||||
local HEADER_ID = 'row0'
|
local HEADER_ID = 'row0'
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
-- @docclass
|
-- @docclass
|
||||||
UIWindow = extends(UIWidget)
|
UIWindow = extends(UIWidget, "UIWindow")
|
||||||
|
|
||||||
function UIWindow.create()
|
function UIWindow.create()
|
||||||
local window = UIWindow.internalCreate()
|
local window = UIWindow.internalCreate()
|
||||||
@@ -9,10 +9,6 @@ function UIWindow.create()
|
|||||||
return window
|
return window
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIWindow:getClassName()
|
|
||||||
return 'UIWindow'
|
|
||||||
end
|
|
||||||
|
|
||||||
function UIWindow:onKeyDown(keyCode, keyboardModifiers)
|
function UIWindow:onKeyDown(keyCode, keyboardModifiers)
|
||||||
if keyboardModifiers == KeyboardNoModifier then
|
if keyboardModifiers == KeyboardNoModifier then
|
||||||
if keyCode == KeyEnter then
|
if keyCode == KeyEnter then
|
||||||
|
@@ -117,7 +117,11 @@ function disconnect(object, arg1, arg2)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function newclass()
|
function newclass(name)
|
||||||
|
if not name then
|
||||||
|
perror(debug.traceback('new class has no name.'))
|
||||||
|
end
|
||||||
|
|
||||||
local class = {}
|
local class = {}
|
||||||
function class.internalCreate()
|
function class.internalCreate()
|
||||||
local instance = {}
|
local instance = {}
|
||||||
@@ -127,10 +131,16 @@ function newclass()
|
|||||||
return instance
|
return instance
|
||||||
end
|
end
|
||||||
class.create = class.internalCreate
|
class.create = class.internalCreate
|
||||||
|
class.__class = name
|
||||||
|
class.getClassName = function() return name end
|
||||||
return class
|
return class
|
||||||
end
|
end
|
||||||
|
|
||||||
function extends(base)
|
function extends(base, name)
|
||||||
|
if not name then
|
||||||
|
perror(debug.traceback('extended class has no name.'))
|
||||||
|
end
|
||||||
|
|
||||||
local derived = {}
|
local derived = {}
|
||||||
function derived.internalCreate()
|
function derived.internalCreate()
|
||||||
local instance = base.create()
|
local instance = base.create()
|
||||||
@@ -140,6 +150,8 @@ function extends(base)
|
|||||||
return instance
|
return instance
|
||||||
end
|
end
|
||||||
derived.create = derived.internalCreate
|
derived.create = derived.internalCreate
|
||||||
|
derived.__class = name
|
||||||
|
derived.getClassName = function() return name end
|
||||||
return derived
|
return derived
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -328,4 +340,16 @@ function getOppositeAnchor(anchor)
|
|||||||
return anchor
|
return anchor
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function makesingleton(obj)
|
||||||
|
local singleton = {}
|
||||||
|
if obj.getClassName then
|
||||||
|
for key,value in pairs(_G[obj:getClassName()]) do
|
||||||
|
if type(value) == 'function' then
|
||||||
|
singleton[key] = function(...) return value(obj, ...) end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return singleton
|
||||||
|
end
|
||||||
|
|
||||||
-- @}
|
-- @}
|
@@ -32,11 +32,11 @@ function init()
|
|||||||
|
|
||||||
filterPanel = battleWindow:recursiveGetChildById('filterPanel')
|
filterPanel = battleWindow:recursiveGetChildById('filterPanel')
|
||||||
toggleFilterButton = battleWindow:recursiveGetChildById('toggleFilterButton')
|
toggleFilterButton = battleWindow:recursiveGetChildById('toggleFilterButton')
|
||||||
|
|
||||||
if isHidingFilters() then
|
if isHidingFilters() then
|
||||||
hideFilterPanel()
|
hideFilterPanel()
|
||||||
end
|
end
|
||||||
|
|
||||||
sortTypeBox = battleWindow:recursiveGetChildById('sortTypeBox')
|
sortTypeBox = battleWindow:recursiveGetChildById('sortTypeBox')
|
||||||
sortOrderBox = battleWindow:recursiveGetChildById('sortOrderBox')
|
sortOrderBox = battleWindow:recursiveGetChildById('sortOrderBox')
|
||||||
hidePlayersButton = battleWindow:recursiveGetChildById('hidePlayers')
|
hidePlayersButton = battleWindow:recursiveGetChildById('hidePlayers')
|
||||||
@@ -63,7 +63,7 @@ function init()
|
|||||||
sortOrderBox:addOption('Desc.', 'desc')
|
sortOrderBox:addOption('Desc.', 'desc')
|
||||||
sortOrderBox:setCurrentOptionByData(getSortOrder())
|
sortOrderBox:setCurrentOptionByData(getSortOrder())
|
||||||
sortOrderBox.onOptionChange = onChangeSortOrder
|
sortOrderBox.onOptionChange = onChangeSortOrder
|
||||||
|
|
||||||
connect(Creature, {
|
connect(Creature, {
|
||||||
onSkullChange = updateCreatureSkull,
|
onSkullChange = updateCreatureSkull,
|
||||||
onEmblemChange = updateCreatureEmblem,
|
onEmblemChange = updateCreatureEmblem,
|
||||||
@@ -73,7 +73,7 @@ function init()
|
|||||||
onAppear = onCreatureAppear,
|
onAppear = onCreatureAppear,
|
||||||
onDisappear = onCreatureDisappear
|
onDisappear = onCreatureDisappear
|
||||||
})
|
})
|
||||||
|
|
||||||
connect(LocalPlayer, {
|
connect(LocalPlayer, {
|
||||||
onPositionChange = onCreaturePositionChange
|
onPositionChange = onCreaturePositionChange
|
||||||
})
|
})
|
||||||
@@ -95,7 +95,7 @@ function terminate()
|
|||||||
battleWindow:destroy()
|
battleWindow:destroy()
|
||||||
mouseWidget:destroy()
|
mouseWidget:destroy()
|
||||||
|
|
||||||
disconnect(Creature, {
|
disconnect(Creature, {
|
||||||
onSkullChange = updateCreatureSkull,
|
onSkullChange = updateCreatureSkull,
|
||||||
onEmblemChange = updateCreatureEmblem,
|
onEmblemChange = updateCreatureEmblem,
|
||||||
onOutfitChange = onCreatureOutfitChange,
|
onOutfitChange = onCreatureOutfitChange,
|
||||||
@@ -108,7 +108,7 @@ function terminate()
|
|||||||
disconnect(LocalPlayer, {
|
disconnect(LocalPlayer, {
|
||||||
onPositionChange = onCreaturePositionChange
|
onPositionChange = onCreaturePositionChange
|
||||||
})
|
})
|
||||||
|
|
||||||
disconnect(g_game, {
|
disconnect(g_game, {
|
||||||
onAttackingCreatureChange = onAttack,
|
onAttackingCreatureChange = onAttack,
|
||||||
onFollowingCreatureChange = onFollow,
|
onFollowingCreatureChange = onFollow,
|
||||||
@@ -214,38 +214,35 @@ function onChangeSortType(comboBox, option)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function onChangeSortOrder(comboBox, option)
|
function onChangeSortOrder(comboBox, option)
|
||||||
setSortOrder(option:lower():gsub('[.]', '')) -- Replace dot in option name
|
-- Replace dot in option name
|
||||||
|
setSortOrder(option:lower():gsub('[.]', ''))
|
||||||
end
|
end
|
||||||
|
|
||||||
function checkCreatures()
|
function checkCreatures()
|
||||||
removeAllCreatures()
|
removeAllCreatures()
|
||||||
|
|
||||||
local spectators = {}
|
if not g_game.isOnline() then
|
||||||
local player = g_game.getLocalPlayer()
|
return
|
||||||
if g_game.isOnline() then
|
|
||||||
creatures = g_map.getSpectators(player:getPosition(), false)
|
|
||||||
for i, creature in ipairs(creatures) do
|
|
||||||
if creature ~= player and doCreatureFitFilters(creature) then
|
|
||||||
table.insert(spectators, creature)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
for i, v in pairs(spectators) do
|
local player = g_game.getLocalPlayer()
|
||||||
addCreature(v)
|
local spectators = g_map.getSpectators(player:getPosition(), false)
|
||||||
|
for _, creature in ipairs(spectators) do
|
||||||
|
if doCreatureFitFilters(creature) then
|
||||||
|
addCreature(creature)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function doCreatureFitFilters(creature)
|
function doCreatureFitFilters(creature)
|
||||||
local localPlayer = g_game.getLocalPlayer()
|
if creature:isLocalPlayer() then
|
||||||
if creature == localPlayer then
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local pos = creature:getPosition()
|
local pos = creature:getPosition()
|
||||||
if not pos then return false end
|
if not pos then return false end
|
||||||
|
|
||||||
|
local localPlayer = g_game.getLocalPlayer()
|
||||||
if pos.z ~= localPlayer:getPosition().z or not creature:canBeSeen() then return false end
|
if pos.z ~= localPlayer:getPosition().z or not creature:canBeSeen() then return false end
|
||||||
|
|
||||||
local hidePlayers = hidePlayersButton:isChecked()
|
local hidePlayers = hidePlayersButton:isChecked()
|
||||||
@@ -293,23 +290,23 @@ function onCreaturePositionChange(creature, newPos, oldPos)
|
|||||||
-- Distance will change when moving, recalculate and move to correct index
|
-- Distance will change when moving, recalculate and move to correct index
|
||||||
if getSortType() == 'distance' then
|
if getSortType() == 'distance' then
|
||||||
local distanceList = {}
|
local distanceList = {}
|
||||||
for id, creatureButton in pairs(battleButtonsByCreaturesList) do
|
for _, battleButton in pairs(battleButtonsByCreaturesList) do
|
||||||
table.insert(distanceList, {distance = getDistanceBetween(newPos, creatureButton.creature:getPosition()), widget = creatureButton})
|
table.insert(distanceList, {distance = getDistanceBetween(newPos, battleButton.creature:getPosition()), widget = battleButton})
|
||||||
end
|
end
|
||||||
|
|
||||||
if isSortAsc() then
|
if isSortAsc() then
|
||||||
table.sort(distanceList, function(a, b) return a.distance < b.distance end)
|
table.sort(distanceList, function(a, b) return a.distance < b.distance end)
|
||||||
else
|
else
|
||||||
table.sort(distanceList, function(a, b) return a.distance > b.distance end)
|
table.sort(distanceList, function(a, b) return a.distance > b.distance end)
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, #distanceList do
|
for i = 1, #distanceList do
|
||||||
battlePanel:moveChildToIndex(distanceList[i].widget, i)
|
battlePanel:moveChildToIndex(distanceList[i].widget, i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for id, creatureButton in pairs(battleButtonsByCreaturesList) do
|
for _, battleButton in pairs(battleButtonsByCreaturesList) do
|
||||||
addCreature(creatureButton.creature)
|
addCreature(battleButton.creature)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -335,6 +332,12 @@ function onCreatureOutfitChange(creature, outfit, oldOutfit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function onCreatureAppear(creature)
|
function onCreatureAppear(creature)
|
||||||
|
if creature:isLocalPlayer() then
|
||||||
|
addEvent(function()
|
||||||
|
updateStaticSquare()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
if doCreatureFitFilters(creature) then
|
if doCreatureFitFilters(creature) then
|
||||||
addCreature(creature)
|
addCreature(creature)
|
||||||
end
|
end
|
||||||
@@ -356,7 +359,7 @@ function addCreature(creature)
|
|||||||
if not creatureAgeList[creatureId] then
|
if not creatureAgeList[creatureId] then
|
||||||
creatureAgeList[creatureId] = os.time()
|
creatureAgeList[creatureId] = os.time()
|
||||||
end
|
end
|
||||||
|
|
||||||
if not battleButton then
|
if not battleButton then
|
||||||
battleButton = g_ui.createWidget('BattleButton')
|
battleButton = g_ui.createWidget('BattleButton')
|
||||||
battleButton:setup(creature)
|
battleButton:setup(creature)
|
||||||
@@ -373,14 +376,14 @@ function addCreature(creature)
|
|||||||
if creature == g_game.getFollowingCreature() then
|
if creature == g_game.getFollowingCreature() then
|
||||||
onFollow(creature)
|
onFollow(creature)
|
||||||
end
|
end
|
||||||
|
|
||||||
local inserted = false
|
local inserted = false
|
||||||
local nameLower = creature:getName():lower()
|
local nameLower = creature:getName():lower()
|
||||||
local healthPercent = creature:getHealthPercent()
|
local healthPercent = creature:getHealthPercent()
|
||||||
local playerPosition = g_game.getLocalPlayer():getPosition()
|
local playerPosition = g_game.getLocalPlayer():getPosition()
|
||||||
local distance = getDistanceBetween(playerPosition, creature:getPosition())
|
local distance = getDistanceBetween(playerPosition, creature:getPosition())
|
||||||
local age = creatureAgeList[creatureId]
|
local age = creatureAgeList[creatureId]
|
||||||
|
|
||||||
local childCount = battlePanel:getChildCount()
|
local childCount = battlePanel:getChildCount()
|
||||||
for i = 1, childCount do
|
for i = 1, childCount do
|
||||||
local child = battlePanel:getChildByIndex(i)
|
local child = battlePanel:getChildByIndex(i)
|
||||||
@@ -412,9 +415,9 @@ function addCreature(creature)
|
|||||||
break
|
break
|
||||||
elseif healthPercent == childHealth then
|
elseif healthPercent == childHealth then
|
||||||
equal = true
|
equal = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- If any other sort type is selected and values are equal, sort it by name also
|
-- If any other sort type is selected and values are equal, sort it by name also
|
||||||
if getSortType() == 'name' or equal then
|
if getSortType() == 'name' or equal then
|
||||||
local length = math.min(childName:len(), nameLower:len())
|
local length = math.min(childName:len(), nameLower:len())
|
||||||
@@ -425,7 +428,7 @@ function addCreature(creature)
|
|||||||
break
|
break
|
||||||
elseif (nameLower:byte(j) > childName:byte(j) and isSortAsc()) or (nameLower:byte(j) < childName:byte(j) and isSortDesc()) then
|
elseif (nameLower:byte(j) > childName:byte(j) and isSortAsc()) or (nameLower:byte(j) < childName:byte(j) and isSortDesc()) then
|
||||||
break
|
break
|
||||||
elseif j == nameLower:len() and isSortAsc() then
|
elseif j == nameLower:len() and isSortAsc() then
|
||||||
battlePanel:insertChild(i, battleButton)
|
battlePanel:insertChild(i, battleButton)
|
||||||
inserted = true
|
inserted = true
|
||||||
elseif j == childName:len() and isSortDesc() then
|
elseif j == childName:len() and isSortDesc() then
|
||||||
@@ -439,7 +442,7 @@ function addCreature(creature)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Insert at the end if no other place is found
|
-- Insert at the end if no other place is found
|
||||||
if not inserted then
|
if not inserted then
|
||||||
battlePanel:insertChild(childCount + 1, battleButton)
|
battlePanel:insertChild(childCount + 1, battleButton)
|
||||||
@@ -454,8 +457,8 @@ end
|
|||||||
|
|
||||||
function removeAllCreatures()
|
function removeAllCreatures()
|
||||||
creatureAgeList = {}
|
creatureAgeList = {}
|
||||||
for i, v in pairs(battleButtonsByCreaturesList) do
|
for _, battleButton in pairs(battleButtonsByCreaturesList) do
|
||||||
removeCreature(v.creature)
|
removeCreature(battleButton.creature)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -478,7 +481,7 @@ function onBattleButtonMouseRelease(self, mousePosition, mouseButton)
|
|||||||
mouseWidget.cancelNextRelease = false
|
mouseWidget.cancelNextRelease = false
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if ((g_mouse.isPressed(MouseLeftButton) and mouseButton == MouseRightButton)
|
if ((g_mouse.isPressed(MouseLeftButton) and mouseButton == MouseRightButton)
|
||||||
or (g_mouse.isPressed(MouseRightButton) and mouseButton == MouseLeftButton)) then
|
or (g_mouse.isPressed(MouseRightButton) and mouseButton == MouseLeftButton)) then
|
||||||
mouseWidget.cancelNextRelease = true
|
mouseWidget.cancelNextRelease = true
|
||||||
g_game.look(self.creature)
|
g_game.look(self.creature)
|
||||||
@@ -500,10 +503,10 @@ function onBattleButtonMouseRelease(self, mousePosition, mouseButton)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function onBattleButtonHoverChange(widget, hovered)
|
function onBattleButtonHoverChange(battleButton, hovered)
|
||||||
if widget.isBattleButton then
|
if battleButton.isBattleButton then
|
||||||
widget.isHovered = hovered
|
battleButton.isHovered = hovered
|
||||||
updateBattleButton(widget)
|
updateBattleButton(battleButton)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -523,6 +526,14 @@ function onFollow(creature)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function updateStaticSquare()
|
||||||
|
for _, battleButton in pairs(battleButtonsByCreaturesList) do
|
||||||
|
if battleButton.isTarget then
|
||||||
|
battleButton:update()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function updateCreatureSkull(creature, skullId)
|
function updateCreatureSkull(creature, skullId)
|
||||||
local battleButton = battleButtonsByCreaturesList[creature:getId()]
|
local battleButton = battleButtonsByCreaturesList[creature:getId()]
|
||||||
if battleButton then
|
if battleButton then
|
||||||
|
@@ -92,7 +92,7 @@ MiniWindow
|
|||||||
height: 20
|
height: 20
|
||||||
width: 128
|
width: 128
|
||||||
margin-top: 6
|
margin-top: 6
|
||||||
|
|
||||||
ComboBox
|
ComboBox
|
||||||
id: sortTypeBox
|
id: sortTypeBox
|
||||||
width: 74
|
width: 74
|
||||||
@@ -107,7 +107,7 @@ MiniWindow
|
|||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: prev.right
|
anchors.left: prev.right
|
||||||
margin-left: 4
|
margin-left: 4
|
||||||
|
|
||||||
Panel
|
Panel
|
||||||
height: 18
|
height: 18
|
||||||
anchors.top: prev.bottom
|
anchors.top: prev.bottom
|
||||||
@@ -132,7 +132,7 @@ MiniWindow
|
|||||||
anchors.right: miniwindowScrollBar.left
|
anchors.right: miniwindowScrollBar.left
|
||||||
margin-right: 1
|
margin-right: 1
|
||||||
margin-top: 11
|
margin-top: 11
|
||||||
|
|
||||||
MiniWindowContents
|
MiniWindowContents
|
||||||
anchors.top: prev.bottom
|
anchors.top: prev.bottom
|
||||||
margin-top: 6
|
margin-top: 6
|
||||||
|