Commit Graph

1062 Commits

Author SHA1 Message Date
Eduardo Bart 0c1540e531 Improve multiline text selection, closes #507 2015-06-03 10:51:39 -03:00
Konrad Kuśnierz 6893a5e98a Optimize UITextEdit rendering 2015-06-03 14:56:43 +02:00
Konrad Kuśnierz f35c939fc3 Start working on multi-line selection for console
Unfortunately UITextEdit is really bad in terms of performance. It
cannot be used as overlying widget (just like in terminal). On the other
hand we could optimize it by rewriting (unfortunately) the whole widget.

There still is a lot of things to do, but for now it is possible to
select several lines of text and copy it using CTRL + C. In order to
make text copyable in context menu it will be required to override
onMousePress (return true).
2015-06-02 19:16:41 +02:00
Ranieri Althoff 944b220c90 Use native optimizations instead of hardcoded defaults 2015-05-25 00:59:39 -03:00
Gabriel Pedro 04b516a1a0 Update copyright for 2015 2015-03-04 10:36:51 -04:00
TheSumm 26fb35fd4d Fixed major bug 2015-01-18 23:57:19 +01:00
Eduardo Bart f6fb785cea Use -O2 in release build 2014-11-05 10:45:28 -02:00
Dominique Verellen 682694cc07 Update graphicalapplication.cpp 2014-09-29 11:28:13 -05:00
BenDol 09d830d02e Fix build error 2014-08-03 10:10:33 +12:00
BenDol d7429c201c Started 1050 implementation and fix ups:
* Dat now loads (new animations aren't yet functional).
* Fixed the way we reference client versions.

TODO: Write new animation functionality & find out protocol changes.
2014-08-03 10:02:28 +12:00
BenDol 9e0ddb08e3 More debug prints and avoid null pointer. 2014-07-14 01:56:17 +12:00
BenDol 0f362f80e3 Added easy menu hooking, fixed terminal default size/pos & more:
* Added autowalk style option to Minimap style.
* Added onCreate for setting up variables before styling is applied etc.
2014-07-13 22:27:09 +12:00
BenDol 07ac5c27ca Added some missing lua functions. 2014-07-12 01:03:21 +12:00
Henrique Santiago 72b3403728 Fix filestream read 2014-05-09 18:56:15 -03:00
BenDol 45b41b88bd Merge branch 'master' of https://github.com/edubart/otclient 2014-04-06 15:29:23 +12:00
BenDol 1baad726ae Just use g_configs.unload(config) to unload config files.
Avoids concurrent modification errors.
2014-04-06 15:29:02 +12:00
Nail 41b2f9b911 Per-pixel transparency. 2014-04-04 12:58:12 -03:00
BenDol a02c091376 Fix stop crashing with UIWidget::moveChildToIndex. 2014-04-04 11:33:17 +13:00
BenDol 01e6169cfb Fix to setText method. 2014-04-04 04:49:44 +13:00
BenDol 1074b6b787 Provide the option to suppress lua call in setText 2014-04-03 05:20:35 +13:00
BenDol 3ce37dacbd Removed onUnload from corelib and added more lua bindings for resources. 2014-04-02 05:20:18 +13:00
BenDol 166eb7614f Fix accidental cmake changes. 2014-04-02 03:04:10 +13:00
BenDol 8b3f3b11f0 Can now unload a Config by config:unload() 2014-04-02 02:34:12 +13:00
BenDol 2d84fae2c8 Can now create new configs on the fly using: local config = g_configs.create(file) 2014-04-02 01:54:13 +13:00
BenDol 5204e3ac03 Proper termination and initialization of the ConfigManager. 2014-04-02 00:30:17 +13:00
BenDol 547b18db9a Update copyright for 2014 2014-04-01 18:36:42 +13:00
BenDol 37f9d3e200 Fix building issues. 2014-04-01 18:09:25 +13:00
BenDol b295053662 Finished stable implementation (as far as tested), still requires more testing. 2014-04-01 16:27:33 +13:00
BenDol 61059e66ec Started implementing ability to load custom config files (currently unstable).
Feel free to help out with this if you like :)
2014-04-01 05:43:31 +13:00
Shawak d20c263912 Ability to get buffer from inputmessage 2014-03-22 18:09:11 +01:00
Shawak 07e40afa3d Ability to get buffer from inputmessage 2014-03-22 18:07:13 +01:00
Shawak 8179915e06 Ability to get buffer from inputmessage 2014-03-22 18:05:32 +01:00
Henrique Santiago b7b8fdfd0c Fix BinaryTree skip, small otb changes 2014-02-13 00:42:06 -02:00
Ahmed Samy c8b4566194 TextEdit: If cursor pos reaches end, move to start, and the opposite 2014-02-10 08:05:45 +02:00
Sam 67c2453c82 savePNG method for Image 2014-01-20 23:04:49 +01:00
Sam 455000c02d Fix save_png definition / New UISprite function 2014-01-20 22:48:50 +01:00
Jacek Wielemborek e6c9e78935 Get rid of trailing whitespace.
Commit generated by command:

find -type f ! -path '*.git*' ! -path '*.png' ! -path '*.ico' ! -path \
    '*.ogg' | xargs -I '{}' sed -i '{}' -e 's/\t*$//g' -e 's/ *$//g'
2014-01-18 15:09:26 +01:00
Ahmed Samy 6745bff132 Introduce g_resources.getDirectoryFiles
This can recursively find files in a directory that's not in physfs search
path, this is needed for mapeditor needs, esp the file browser.

We do not want to limit users to the application run directory
so we have to use this.

This function uses boost filesystem.
Prototype:
	g_resources.getDirectoryFiles(directory STRING, filenameOnly BOOL,
	recursive BOOL)

filenameOnly is there if we want to just get the filenames in the
directory.
recursive if we want to loop directories in the directory.
2013-12-25 21:32:49 +02:00
Henrique Santiago 1e17919a26 Use of createTable on containers 2013-12-22 17:36:43 -02:00
Ahmed Samy df3546b073 lua: now we have a function to static allocate an array
lua_newtable() definition:
	#define lua_newtable(L) 	lua_createtable(L, 0, 0)

This simply allocates space for 0 fields, meaning, if we push any
values into this array, it will re-allocate the array, which is bad.

This function statically allocates an array, so it's ready to have
X fields into it.

Performance tests:

lua_newtable
1428161
1426992
1413513

lua_createtable
2004544
1974117
1957533

These tests were done on an AMD 8350fx CPU, single thread used.

narr: This is for fields that just have an index, e.g. arr[0] etc.
nrec: For fields which needs like arr.a, arr.b etc.

This is how many times each of the functions can run per second, as
you can see about 1.7x the calls to lua_newtable.

All credits goes to @dalkon, he was too lazy to do it by himself, and
asked me to do it for him.
2013-12-21 16:13:24 +02:00
Sam 863bece70b VC12 fixes by @dalkon 2013-12-15 19:09:03 +01:00
conde2 ba091c9f5b Indentation 2013-12-01 01:30:48 -02:00
conde2 3288711d16 Mistake 2013-12-01 01:25:34 -02:00
conde2 8b0509a5c3 Try to fix compilation 2013-12-01 01:19:29 -02:00
conde2 4dcb30110f Use of clamp 2013-12-01 00:48:36 -02:00
conde2 7ff73d1064 Fix indentation 2013-11-30 23:34:21 -02:00
conde2 ca2fe9cf45 Fix compilation under MSVC
Use template for std::min and std::max
2013-11-30 23:08:43 -02:00
Ahmed Samy 25d3019d1a force use of template version of std::min/max 2013-11-14 00:02:47 +02:00
Ahmed Samy 1711d8bdaf Revert "replace all std::min/std::max with just min/max"
This reverts commit 28d967ccce.
2013-11-13 23:53:54 +02:00
Ahmed Samy 28d967ccce replace all std::min/std::max with just min/max
This errors out in MSVC since the inclusion of winsock2.h, CL uses the
macro not the template version.
2013-11-13 23:48:10 +02:00