Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Kitty Hello

#10471
GLBasic - en / Pocket PC
2004-Dec-12
Hmmm. What device is that in particular?
#10472
GLBasic - en / Linux update
2004-Dec-12
Sorry, download the new setup. Lot's of things have changed. Now Linux copilation *works*.
http://www.glbasic.com/files/glbasic_sdk.exe
#10473
GLBasic - en / Linux update
2004-Dec-09
It *should* work with the latest update. If it doesn't, write again. The new updates (since a month or so...) should provide a "Linux" option in menu: Project/Options.
-Gernot
#10474
Oh weia. Das ist so einfach nicht möglich. Dafür war GLBasic nie gedacht. Ich könnte es schon einbauen, aber zur Zeit habe ich leider viel zu viel anderes zu tun. Tut mir echt leid...
#10475
Ja, klar irgendwann muss Linux und Win zusammen kommunizieren können.
Datenaustausch unter Win ist kein Problem. Einfach mal die "NET..." Befehle ansehen und/oder das Tutorial in der Hilfe lesen.
#10476
GLBasic - en / Updates
2004-Dec-01
Oh dear. You must download the setup for version 2.x from here http://www.glbasic.com/files/glbasic_sdk.exe, and then you can get updates.
Sorry,
Gernot
#10477
Nein. Die Netzwerkbefehle können nur unter GLBasic Programmen austauschen. Unter Linux geht das auch noch nicht.
#10478
GLBasic - en / Updates
2004-Nov-30
Hmmm. What Version do you have? What operating system? Is there an Update.exe (or Update_e.exe) in your GLBasic-Directory?
#10479
GLBasic - de / X-Mas Special
2004-Nov-25
Ho-ho-ho. Für den rest des Jahres bieten wir einen 25% Preisnachlass :D auf GLBasic SDK premium:
https://secure.shareit.com/shareit/checkout.html?PRODUCT[190536]=1&cartcoupon=1&COUPON1=xmas2004&DELIVERY[190536]=EML&pc=9no1l
Angebot endet am 01-jan-2005.

Grüße,
Gernot
#10480
Snowy greeting from Germany, for the rest of the year we offer a 25% price off :D for GLBasic SDK premium:
https://secure.shareit.com/shareit/checkout.html?PRODUCT[190536]=1&cartcoupon=1&COUPON1=xmas2004&DELIVERY[190536]=EML&pc=9no1l
Offer ends 01-jan-2005.

Greetings,
Gernot
#10481
schön. Besonders das mit dem Panzer. Ist Dein Freund bei Y-Tours, oder?
#10482
GLBasic - en / gui
2004-Nov-20
Then you would have to be able to resize a window as well as creating other new windws...
Hmmm... I've been thinking about a simple gui (buttons, edit boxes, dropdown boxes) for a game options menu. However, if I would write one, I'd do it in GLBasic, so you can extend it freely.
Here's a simple file selector. Maybe it's of some help? It's not really designed for extendability, however.

Code (glbasic) Select
// --------------------------------- //
// Project: FileDialog - a nice OpenGL File Dialog
// Start: Saturday, November 22, 2003
// IDE Version: 1.31120

// Simply insert this file into your project and call:
// name$ = FileDialog$("*.bmp", TRUE, 100, 100, 250, 220)
// IF name$="NO_FILE" THEN UserSelectedNothing()


FOR i=0 TO 40
DrawButton(RND(640)-120, RND(480)-80, RND(640-120), RND(400), RGB(224, 224, 224+RND(31)), RGB(128, 128, 128+RND(127)), RGB(64, 64, 64+RND(128)))
NEXT

FILLRECT 0,0,320,240,0

// Call the file dialog
name$ = FileDialog$("*.bmp", TRUE, 0, 0, 320, 240)
// Debug the file name
PRINT name$, 0, 100
SHOWSCREEN
MOUSEWAIT

// ------------------------------------------------------------- //
// -=#  FILEDIALOG  #=-
// ------------------------------------------------------------- //
FUNCTION FileDialog$: filter$, must_exist, pos_x, pos_y, size_x, size_y
// Diese Variablen sind als LOCAL definiert:
// open, filter$, filename$,

LOCAL files$[], i, offset, old_dir$, font_x, font_y, num, max_file, max_text, max_show
LOCAL r_width, displ$, mx, my, b2, b1
LOCAL name$, n_selected, curdir$
LOCAL c_lite, c_norm, c_dark

LOADFONT "filereqf.bmp", 2
SETFONT 2

r_width=12 // Width of ruler
c_lite = RGB(0xc0, 0xd0, 0xff)
c_norm = RGB(0xa0, 0xc0, 0xe0)
c_dark = RGB(0x40, 0x40, 0xa0)

USEASBMP // Store current back buffer for drawing
old_dir$ = GETCURRENTDIR$()

GETFONTSIZE font_x, font_y
// Buttons...
size_y = size_y - font_y*4 - 13 - 1// - 6
pos_x=pos_x+6
size_x=size_x-font_x
pos_y=pos_y+6+font_y+1

sort_n_show:
offset=0
n_selected=-1
num = GETFILELIST(filter$, files$[]) // For return value see manual
max_show=INTEGER(size_y/font_y)
max_file=BOUNDS(files$[], 0)-1
max_text=INTEGER((size_x-r_width)/font_x)

FOR i=0 TO INTEGER(num/0x10000)-1 // mark directories
files$[i] = "/"+files$[i]
NEXT
curdir$=GETCURRENTDIR$()
IF LEN(curdir$) > max_text+1
curdir$ = "..."+MID$(curdir$, LEN(curdir$)-max_text+3, max_text-3)
ENDIF

WHILE TRUE
PRINT num, 0, 0
// Dialog:
DrawButton(pos_x-6, pos_y-font_y-6, size_x+12, size_y+font_y*4+13, c_lite, c_norm, c_dark)
DrawButtonText(curdir$, pos_x, pos_y-font_y-5, size_x, font_y+2, c_dark, c_norm, c_lite)

// Input
caret=caret+1
displ$=name$
IF MOD(caret/30, 2)
displ$ = displ$+"|"
ELSE
displ$ = displ$+" "
ENDIF
PRINT "File:", pos_x+font_x, pos_y+size_y
DrawButtonText(displ$, pos_x+font_x, pos_y+size_y+font_y, size_x-2*font_x, font_y+2, c_dark, c_norm, c_lite)

// OK / Abort
DrawButtonText("OK", pos_x+font_x, pos_y+size_y+font_y*2+5, size_x/3, font_y, c_lite, c_norm, c_dark)
DrawButtonText("Exit", pos_x+size_x*2/3-font_x, pos_y+size_y+font_y*2+5, size_x/3, font_y, c_lite, c_norm, c_dark)

// List show
DrawButton(pos_x, pos_y-1, size_x, size_y+2, c_dark, c_norm, c_lite)
fin = max_file
IF fin>=offset+max_show THEN fin=offset+max_show-1
FOR i=offset TO fin
IF n_selected = i
FILLRECT pos_x, pos_y+(i - offset)*font_y, pos_x+size_x-r_width, pos_y+(i - offset + 1)*font_y, c_dark
ALPHAMODE 1
ENDIF
displ$ = files$[i]
IF LEN(displ$) > max_text
displ$ = MID$(displ$, 0, max_text-2) + ".."
ENDIF
// Draw folder-icon
IF MID$(displ$, 0, 1) = "/" THEN displ$ = "<" + MID$(displ$, 1, 2048) + ">"
PRINT displ$, pos_x+1, pos_y+(i - offset)*font_y
ALPHAMODE 0
NEXT

// Ruler
FILLRECT pos_x+size_x-r_width, pos_y, pos_x+size_x-2, pos_y+size_y, c_dark
rul_size = max_show / max_file
IF rul_size<1 // not all files visible
r_len = (max_show/max_file)*(size_y-font_y)
r_top = (size_y - 2*font_y - r_len) * (offset/(max_file-max_show)) + font_y
DrawButtonText("}", pos_x+size_x-r_width, pos_y, r_width-1, font_y-1, c_lite, c_norm, c_dark)
DrawButtonText("{", pos_x+size_x-r_width, pos_y+size_y-font_y, r_width-1, font_y, c_lite, c_norm, c_dark)
DrawButton(pos_x+size_x-r_width, pos_y+r_top, r_width-1, r_len, c_lite, c_norm, c_dark)
ENDIF

MOUSESTATE mx, my, b1, b2

STARTPOLY -1
POLYVECTOR mx, my, 0,0, c_lite
POLYVECTOR mx+10, my+18, 0,0,c_norm
POLYVECTOR mx+20, my+27 ,0,0,c_norm
POLYVECTOR mx+27, my+20 ,0,0,c_norm
POLYVECTOR mx+18, my+10 ,0,0,c_norm
ENDPOLY

mx=mx-pos_x
my=my-pos_y
IF b1
bn_clicked=0
IF mx>size_x-r_width AND mx IF my>=font_y AND my<=size_y-font_y // Ruler
offset = INTEGER(( (my-font_y)/(size_y-2*font_y) ) * max_file)
ELSE
IF my>0 AND my IF my>size_y-font_y AND my ENDIF
IF offset>=max_file-max_show THEN offset=max_file-max_show
IF offset<0 THEN offset=0
ELSE // Main window clicked?
IF mx>0 AND mx i = INTEGER(my/font_y)+offset
IF i>=0 AND i<=max_file
name$ = files$[i]
n_selected=i
bn_clicked=1
ENDIF
ENDIF
// OK / Cancel
IF my>size_y+font_y*2 AND my IF mx>0 AND mx IF mx>size_x*.66 AND mx ENDIF
ENDIF
ELSE // Mouse released??
SELECT bn_clicked
CASE 1
IF MID$(name$, 0, 1)="/" THEN GOTO change_folder
CASE 2
IF (must_exist AND DOESFILEEXIST(name$)) OR must_exist=FALSE THEN GOTO on_ok
CASE 3
GOTO on_cancel
ENDSELECT
ENDIF

IF KEY(14)
IF ky_hold=0 // Backspc
i=LEN(name$)-1
IF i<0 THEN i=0
name$ = MID$(name$, 0, i)
ENDIF
ky_hold=14
ELSE
IF KEY(28)
ky_hold=28
GOTO on_ok // Enter / OK
ELSE
ky_hold=0
name$=name$+INKEY$()
ENDIF
ENDIF
SHOWSCREEN
WEND

change_folder:
IF MID$(name$, 0, 1) = "/"
name$ = MID$(name$, 1, 2048)
SETCURRENTDIR(name$)
ENDIF
GOTO sort_n_show

on_cancel:
BLACKSCREEN
SETCURRENTDIR(old_dir$)
RETURN "NO_FILE"

on_ok:
LOADFONT "", 2
SETFONT 0
BLACKSCREEN
SETCURRENTDIR(old_dir$)
RETURN GETCURRENTDIR$() + name$

ENDFUNCTION // filename$

FUNCTION DrawButtonText: t$, px, py, dx, dy, c1, c2, c3
LOCAL fx, fy
DrawButton(px, py, dx, dy, c1, c2, c3)
GETFONTSIZE fx, fy
px = px + (dx - LEN(t$)*fx)/2
py = py + (dy - fy)/2

c1=RGB(255,255,255)
SELECT t$
CASE "{"
DRAWLINE px+fx/2, py+fy/3,   px,    py,      c1
DRAWLINE px+fx/2, py+fy/3,   px+fx, py,      c1
DRAWLINE px+fx/2, py+fy*.83, px   , py+fy/2, c1
DRAWLINE px+fx/2, py+fy*.83, px+fx, py+fy/2, c1
CASE "}"
DRAWLINE px+fx/2, py,      px,    py+fy/3,   c1
DRAWLINE px+fx/2, py,      px+fx, py+fy/3,   c1
DRAWLINE px+fx/2, py+fy/2, px   , py+fy*.83, c1
DRAWLINE px+fx/2, py+fy/2, px+fx, py+fy*.83, c1
DEFAULT
PRINT t$, px, py
ENDSELECT
ENDFUNCTION

FUNCTION DrawButton: px, py, dx, dy, c1, c2, c3
FILLRECT px, py, px+dx, py+dy, c2
DRAWLINE px, py, px+dx-1, py, c1
DRAWLINE px, py, px, py+dy-1, c1
DRAWLINE px+dx, py+1, px+dx, py+dy, c3
DRAWLINE px+1, py+dy, px+dx, py+dy, c3
ENDFUNCTION
#10483
Porblem bei beiden Karten in 32 Bit? Ufz!
#10484
Ja, klar. Weil das eben kein GLBasic, sondern ein OpenGL Problem ist. Die traurige Wahrheit: Mit 16 Bit kann man das nur mit glReadPixel machen, und das wird so eklatant langsam sein, das alles zu spät ist.
Bei Dir geht's auch mit 32 bit nicht? Was hast Du für eine Grafikkarte?
#10485
Vollbild? Da wird leider 16 Bit verwendet. Im Fenster dürfte bei 32 Bit das Prob. nicht sein. Jedenfalls muss ich mir da was überlegen. Bis dahin ist die Loadsprite varianlte natürlich die beste.