It looks like you're new here. If you want to get involved, click one of these buttons!
Gideros UIKit Plugin API To use the plugin: Copy uikit.mm to Xcode project "plugins" directory and then add to Xcode project. In lua file: require "ui" -- perhaps do this? stage:addEventListener(Event.ENTER_FRAME, function(event) collectgarbage() end) Lua API int hideStatusBar(bool show) int addToRootView(view v) int removeFromRootView(view v) NSArray luaTableToArray(table t) View : GEventDispatcherProxy new() void addView(view childView) void removeFromParent() void setPosition(int x, int y) void setSize(int width, int height) Button : View new() void setTitle(string title) void setTitleColor(float r, float g, float b) void setBGColor(float r, float g, float b) void setFont(string fontname, float s) void setImage(string imagefile) void setBGImage(string imagefile) Generated event: "onButtonClick" Label : View new() void setText(string text) void setTextColor(float r, float g, float b) void setBGColor(float r, float g, float b) void setFont(string fontname, float s) AlertView : GEventDispatcherProxy new(string title, string message, string button) void show() void addButton(string title) Generated event: "complete" Switch : View new() void setState(bool state) bool getState() Generated event: "onSwitchClick" Slider : View new(float min, float max) void setValue(float value) int getValue() void setThumbImage(string imagefile) Generated event: "onSliderChange" TextField2 : View void create(string text) void setText(string text) string getText() void setTextColor(float r, float g, float b) void setBGColor(float r, float g, float b) void showKeyboard() Generated events: "onTextFieldEdit", "onTextFieldReturn" WebView : View new(string url) void loadLocalFile(string filename) Generated events: "onWebViewNavigation" PickerView : View new(table items) virtual int getRowCount() virtual void setRow(int row) virtual int getPickedRow() virtual string getPickedItem() Generated event: "onPickerRows" Toolbar : View new() void addButton() void addTextButton(string caption) void add(view xview) //void setValue(float value) //void setThumbImage(string imagefile) Generated event: "onToolbarClick" ScrollView : View new(float x, float y, float w, float h, float cw, float ch) void add(view v) Generated event: onScrollViewClick TableView : View new() void setData(NSArray data) -- use luaTableToArray() void setCellText(string text) setPosition(x, y) setSize(width, height) Generated events: "cellForRowAtIndexPath", "didSelectRowAtIndexPath" event table includes the additional field: "Row" (event.Row) |
Comments
Seriously, I don't understand what you intention for your post is. Can someone explain this? Above I see Lua code, and then some kind of CPP code? But not really, so what is that?
Good idea, @Magnusviri - I'll include it in the github when I get a chance.
Mike
http://www.sharksoupstudios.com
I left out the garbage collection - is that something that's necessary?
But I needed a list of what it could do, and in reality, when I posted this I wasn't even sure if I understood it enough that this was the list. So I do hope someone verifies that this is actually correct.
And @Caroline, I put the call to collectgarbage() for every frame in it because it was in the uikit sample code. I didn't know if it was there because including uikit introduced issues that required using it every frame or not. @MikeHart, do you know if it is required?
My apps: http://www.yummyyellow.com
Personally in my apps I collect garbadge in every frame because I don't want to deal with big hickups when the GC finally collects something. But everyone has their own opinion about this.
My apps: http://www.yummyyellow.com
No, I don't think so.
Edit, yeah that. I will probably make a list then.
My apps: http://www.yummyyellow.com
My apps: http://www.yummyyellow.com
what should i do?
thanks
Makes the whole UI / Plugin thing a lot simpler to understand!
KISS!
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill