Wysłany: 2014-08-19, 15:01
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
Witam mam problem poniewa? na mniejszych rozdzielczo?ciach moje gui robi sie za du?e przez co nie mo?na klikn?? buttona zaloguj lub zarejstruj. GUI robione na rozdzielczo?ci 1680 x 1050 x 32
GUI
GUIEditor = {
tab = {},
staticimage = {},
label = {},
button = {},
window = {}
}
Window = guiCreateWindow ( 0 , 0 , 674 , 1050 , "The Simple Life" , false )
guiWindowSetSizable ( Window , true )
ButtonZaloguj = guiCreateButton ( 9 , 938 , 275 , 83 , "Zaloguj" , false , Window )
guiSetFont ( Window , "default-bold-small" )
ButtonZarejestruj = guiCreateButton ( 384 , 938 , 274 , 82 , "Zarejestruj" , false , Window )
guiSetFont ( Window , "default-bold-small" )
loginedit = guiCreateEdit ( 37 , 416 , 585 , 53 , "" , false , Window )
hasloedit = guiCreateEdit ( 37 , 556 , 585 , 52 , "" , false , Window )
guiEditSetMasked ( hasloedit , true )
GUIEditor . label [ 1 ] = guiCreateLabel ( 200 , 326 , 261 , 80 , "Login" , false , Window )
guiSetFont ( GUIEditor . label [ 1 ], "sa-header" )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 1 ], "center" , false )
guiLabelSetVerticalAlign ( GUIEditor . label [ 1 ], "center" )
GUIEditor . label [ 2 ] = guiCreateLabel ( 200 , 494 , 261 , 52 , "Haslo" , false , Window )
guiSetFont ( GUIEditor . label [ 2 ], "sa-header" )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 2 ], "center" , false )
guiLabelSetVerticalAlign ( GUIEditor . label [ 2 ], "center" )
guiSetVisible ( Window , true )
showCursor ( true )
Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Wysłany: 2014-08-19, 15:18
kubak14
Wiek: 24 Na forum: 5205 dni Posty: 119
Nick w MP: Heavy
Piwa : 149
Sproboj tak:
local screenW , screenH = guiGetScreenSize ()
local resW , resH = 1280 , 720
local sW , sH = ( screenW / resW ), ( screenH / resH )
GUIEditor = {
tab = {},
staticimage = {},
label = {},
button = {},
window = {}
}
Window = guiCreateWindow ( sW , sH , 674 , 1050 , "The Simple Life" , false )
guiWindowSetSizable ( Window , true )
ButtonZaloguj = guiCreateButton ( 9 , 938 , 275 , 83 , "Zaloguj" , false , Window )
guiSetFont ( Window , "default-bold-small" )
ButtonZarejestruj = guiCreateButton ( 384 , 938 , 274 , 82 , "Zarejestruj" , false , Window )
guiSetFont ( Window , "default-bold-small" )
loginedit = guiCreateEdit ( 37 , 416 , 585 , 53 , "" , false , Window )
hasloedit = guiCreateEdit ( 37 , 556 , 585 , 52 , "" , false , Window )
guiEditSetMasked ( hasloedit , true )
GUIEditor . label [ 1 ] = guiCreateLabel ( 200 , 326 , 261 , 80 , "Login" , false , Window )
guiSetFont ( GUIEditor . label [ 1 ], "sa-header" )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 1 ], "center" , false )
guiLabelSetVerticalAlign ( GUIEditor . label [ 1 ], "center" )
GUIEditor . label [ 2 ] = guiCreateLabel ( 200 , 494 , 261 , 52 , "Haslo" , false , Window )
guiSetFont ( GUIEditor . label [ 2 ], "sa-header" )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 2 ], "center" , false )
guiLabelSetVerticalAlign ( GUIEditor . label [ 2 ], "center" )
guiSetVisible ( Window , true )
showCursor ( true )
Ostatnio zmieniony przez kubak14 2014-08-19, 15:38, w całości zmieniany 2 razy
Wysłany: 2014-08-19, 15:35
PolskiSebek12
Programista
Wiek: 28 Na forum: 4347 dni Posty: 343
Nick w MP: CrosRoad95
Piwa : 3883
niepolecam tego jak zrobil kubak
ale polecam ci
https://wiki.multitheftauto.com/wiki/GuiCreateWindow
a dok?adnie chodzi mi oto ?e r??nica pomi?dzy:
guiCreateWindow(0, 0, 674, 1050, "The Simple Life", false)
a
guiCreateWindow(0, 0, 674, 1050, "The Simple Life", true)
polega na tym ?e True na koncu oznacza czy to ma by? w pikselach pozycja czy w "rozdzielczosci"
wi?c u?yj:
guiCreateWindow(0.1, 0.1, 0.8, 0.8, "The Simple Life", true)
i to spowoduje ze na KA?DEJ rozdzielczo?ci gui b?dzie mia?o "przeswit" z ka?dej strony 10% ( jak masz monitor 1000x1000 to gui bedzie 800x800 i po kazdej stronie bedzie 100pikseli odleglosci od granicy ekranu )
my?l? ze pomoglem wi?c
Wysłany: 2014-08-19, 15:40
kubak14
Wiek: 24 Na forum: 5205 dni Posty: 119
Nick w MP: Heavy
Piwa : 149
Edit Kod (Dopasuje sie do kazdego rozmiaru ekranu)
local screenW , screenH = guiGetScreenSize ()
local resW , resH = 1280 , 720
local sW , sH = ( screenW / resW ), ( screenH / resH )
GUIEditor = {
tab = {},
staticimage = {},
label = {},
button = {},
window = {}
}
Window = guiCreateWindow ( sW , sH , 674 , 1050 , "The Simple Life" , false )
guiWindowSetSizable ( Window , true )
ButtonZaloguj = guiCreateButton ( 9 , 938 , 275 , 83 , "Zaloguj" , false , Window )
guiSetFont ( Window , "default-bold-small" )
ButtonZarejestruj = guiCreateButton ( 384 , 938 , 274 , 82 , "Zarejestruj" , false , Window )
guiSetFont ( Window , "default-bold-small" )
loginedit = guiCreateEdit ( 37 , 416 , 585 , 53 , "" , false , Window )
hasloedit = guiCreateEdit ( 37 , 556 , 585 , 52 , "" , false , Window )
guiEditSetMasked ( hasloedit , true )
GUIEditor . label [ 1 ] = guiCreateLabel ( 200 , 326 , 261 , 80 , "Login" , false , Window )
guiSetFont ( GUIEditor . label [ 1 ], "sa-header" )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 1 ], "center" , false )
guiLabelSetVerticalAlign ( GUIEditor . label [ 1 ], "center" )
GUIEditor . label [ 2 ] = guiCreateLabel ( 200 , 494 , 261 , 52 , "Haslo" , false , Window )
guiSetFont ( GUIEditor . label [ 2 ], "sa-header" )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 2 ], "center" , false )
guiLabelSetVerticalAlign ( GUIEditor . label [ 2 ], "center" )
guiSetVisible ( Window , true )
showCursor ( true )
Ostatnio zmieniony przez kubak14 2014-08-19, 15:46, w całości zmieniany 2 razy
Wysłany: 2014-08-19, 15:42
PolskiSebek12
Programista
Wiek: 28 Na forum: 4347 dni Posty: 343
Nick w MP: CrosRoad95
Piwa : 3883
kubak na mojej rozdzielczosci 800x600 nie zmiesci sie na ekranie a moja propozycja jak to zrobi? spowoduje ze nawet na monitorze 10x10 pikseli b?dzie si? w cudzys?owiu "poprawnie wy?wietlac" ale mo?e niekt?re napisy ucina? ale bedzie na srodku ekranu
Wysłany: 2014-08-19, 15:44
kubak14
Wiek: 24 Na forum: 5205 dni Posty: 119
Nick w MP: Heavy
Piwa : 149
Tw?j spos?b jest b??dny
Ostatnio zmieniony przez kubak14 2014-08-19, 20:49, w całości zmieniany 1 raz
Wysłany: 2014-08-19, 16:25
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4395 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Eh, same g?upoty... Zr?b gui na najmniejszej rozdzielczo?ci. Nast?pnie wklej ten kod:
mojeW , mojeH = 640 , 480
sW , sH = guiGetScreenSize ()
width , height = ( sW / mojeW ), ( sH / mojeH )
i *width b?d? *height.
Wysłany: 2014-08-19, 18:55
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
a gdzie to *width i *height wkleji??
Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Wysłany: 2014-08-19, 20:48
kubak14
Wiek: 24 Na forum: 5205 dni Posty: 119
Nick w MP: Heavy
Piwa : 149
maciek3286 ,
local screenW , screenH = guiGetScreenSize ()
local resW , resH = 640 , 480
local sW , sH = ( screenW / resW ), ( screenH / resH )
GUIEditor = {
tab = {},
staticimage = {},
label = {},
button = {},
window = {}
}
Window = guiCreateWindow ( sW , sH , 674 , 1050 , "The Simple Life" , false )
guiWindowSetSizable ( Window , true )
ButtonZaloguj = guiCreateButton ( 9 , 938 , 275 , 83 , "Zaloguj" , false , Window )
guiSetFont ( Window , "default-bold-small" )
ButtonZarejestruj = guiCreateButton ( 384 , 938 , 274 , 82 , "Zarejestruj" , false , Window )
guiSetFont ( Window , "default-bold-small" )
loginedit = guiCreateEdit ( 37 , 416 , 585 , 53 , "" , false , Window )
hasloedit = guiCreateEdit ( 37 , 556 , 585 , 52 , "" , false , Window )
guiEditSetMasked ( hasloedit , true )
GUIEditor . label [ 1 ] = guiCreateLabel ( 200 , 326 , 261 , 80 , "Login" , false , Window )
guiSetFont ( GUIEditor . label [ 1 ], "sa-header" )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 1 ], "center" , false )
guiLabelSetVerticalAlign ( GUIEditor . label [ 1 ], "center" )
GUIEditor . label [ 2 ] = guiCreateLabel ( 200 , 494 , 261 , 52 , "Haslo" , false , Window )
guiSetFont ( GUIEditor . label [ 2 ], "sa-header" )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 2 ], "center" , false )
guiLabelSetVerticalAlign ( GUIEditor . label [ 2 ], "center" )
guiSetVisible ( Window , true )
showCursor ( true )
[ Dodano : 2014-08-19, 20:51 ]
PanMaszyna , jednak dobrze my?la?em
Wysłany: 2014-08-19, 21:44
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
PanMaszyna , Zrobi?em jak mi kaza?e? i zobacz co sie zrobi?o
kod:
mojeW , mojeH = 640 , 480
sW , sH = guiGetScreenSize ()
width , height = ( sW / mojeW ), ( sH / mojeH )
Window = guiCreateWindow ( 0 , 0 , 267 * width , 480 * height , "The Simple Life" , false )
guiWindowSetSizable ( Window , true )
ButtonZaloguj = guiCreateButton ( 9 , 422 , 114 , 48 , "Zaloguj" , false , Window )
guiSetFont ( Window , "default-bold-small" )
ButtonZarejestruj = guiCreateButton ( 143 , 422 , 114 , 48 , "Zarejestruj" , false , Window )
guiSetFont ( Window , "default-bold-small" )
loginedit = guiCreateEdit ( 26 , 230 , 207 , 40 , "" , false , Window )
hasloedit = guiCreateEdit ( 26 , 127 , 207 , 40 , "" , false , Window )
guiEditSetMasked ( hasloedit , true )
GUIEditor . label [ 1 ] = guiCreateLabel ( 66 , 64 , 133 , 53 , "Login" , false , Window )
guiSetFont ( GUIEditor . label [ 1 ], "sa-header" )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 1 ], "center" , false )
guiLabelSetVerticalAlign ( GUIEditor . label [ 1 ], "center" )
GUIEditor . label [ 2 ] = guiCreateLabel ( 66 , 167 , 133 , 53 , "Haslo" , false , Window )
guiSetFont ( GUIEditor . label [ 2 ], "sa-header" )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 2 ], "center" , false )
guiLabelSetVerticalAlign ( GUIEditor . label [ 2 ], "center" )
guiSetVisible ( Window , true )
showCursor ( true )
Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Wysłany: 2014-08-19, 22:14
kubak14
Wiek: 24 Na forum: 5205 dni Posty: 119
Nick w MP: Heavy
Piwa : 149
maciek3286 ,
skorzystaj z mojego kodu...
Wysłany: 2014-08-19, 22:32
maciek3286
LUA Developer
Wiek: 26 Na forum: 5201 dni Posty: 230
Nick w MP: maciek00
Piwa : 3207
kubak14 , tw?j kod jest b??dny.
PanMaszyna , ju? sobie poradzi?em nie doczyta?em twojego postu.
Temat Do zamkni?cia
Podpis
"Ludzie będą zawsze dla ciebie źli, jeżeli konieczność nie zmusi ich do tego, by byli dobrzy" ~~ Niccolò Machiavelli
Tagi: gui
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: