intermediate
This commit is contained in:
parent
d83f28c212
commit
af1f9cfbeb
@ -1,106 +1,12 @@
|
||||
// Workspace: Target workspace
|
||||
|
||||
//
|
||||
// String added via add_build_string() from /Users/vfs/Dev/ui/first.jai:138.
|
||||
// String added via add_build_string() from C:/Users/vfs/Dev/ui/first.jai:138.
|
||||
//
|
||||
NAME :: "mexplore";
|
||||
VERSION :: "0.1";
|
||||
JAI_VERSION :: "beta 0.2.014, built on 24 May 2025";
|
||||
RELEASE_DATE :: "9 July 2025, 08:38:11";
|
||||
RELEASE_DATE :: "9 July 2025, 09:01:30";
|
||||
GIT_BRANCH :: "main";
|
||||
GIT_REVISION :: "6675f39303fac93bdb6e9216afc488b6c41706ed";
|
||||
GIT_REVISION :: "d83f28c212c26e9aaef856dffd7eb64d22117083";
|
||||
DEBUG :: true;
|
||||
|
||||
//
|
||||
// #insert text. Generated from /opt/jai/modules/Objective_C/module.jai:56.
|
||||
//
|
||||
<<(cast(*Selector) (data + 0)) = sel_registerName("drain");
|
||||
<<(cast(*Selector) (data + 8)) = sel_registerName("showPools");
|
||||
<<(cast(*Selector) (data + 16)) = sel_registerName("resourcePath");
|
||||
<<(cast(*Selector) (data + 24)) = sel_registerName("mainBundle");
|
||||
<<(cast(*Selector) (data + 32)) = sel_registerName("distantPast");
|
||||
<<(cast(*Selector) (data + 40)) = sel_registerName("distantFuture");
|
||||
<<(cast(*Selector) (data + 48)) = sel_registerName("initWithBytes:length:encoding:");
|
||||
<<(cast(*Selector) (data + 56)) = sel_registerName("UTF8String");
|
||||
<<(cast(*Selector) (data + 64)) = sel_registerName("dataUsingEncoding:allowLossyConversion:");
|
||||
<<(cast(*Selector) (data + 72)) = sel_registerName("stringByExpandingTildeInPath");
|
||||
<<(cast(*Selector) (data + 80)) = sel_registerName("scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:");
|
||||
<<(cast(*Selector) (data + 88)) = sel_registerName("currentRunLoop");
|
||||
<<(cast(*Selector) (data + 96)) = sel_registerName("run");
|
||||
<<(cast(*Selector) (data + 104)) = sel_registerName("operatingSystem");
|
||||
<<(cast(*Selector) (data + 112)) = sel_registerName("operatingSystemName");
|
||||
<<(cast(*Selector) (data + 120)) = sel_registerName("isOperatingSystemAtLeastVersion:");
|
||||
<<(cast(*Selector) (data + 128)) = sel_registerName("disableSuddenTermination");
|
||||
<<(cast(*Selector) (data + 136)) = sel_registerName("enableSuddenTermination");
|
||||
<<(cast(*Selector) (data + 144)) = sel_registerName("disableAutomaticTermination:");
|
||||
<<(cast(*Selector) (data + 152)) = sel_registerName("enableAutomaticTermination:");
|
||||
<<(cast(*Selector) (data + 160)) = sel_registerName("processInfo");
|
||||
<<(cast(*Selector) (data + 168)) = sel_registerName("environment");
|
||||
<<(cast(*Selector) (data + 176)) = sel_registerName("arguments");
|
||||
<<(cast(*Selector) (data + 184)) = sel_registerName("hostName");
|
||||
<<(cast(*Selector) (data + 192)) = sel_registerName("processName");
|
||||
<<(cast(*Selector) (data + 200)) = sel_registerName("setProcessName:");
|
||||
<<(cast(*Selector) (data + 208)) = sel_registerName("processIdentifier");
|
||||
<<(cast(*Selector) (data + 216)) = sel_registerName("globallyUniqueString");
|
||||
<<(cast(*Selector) (data + 224)) = sel_registerName("operatingSystemVersionString");
|
||||
<<(cast(*Selector) (data + 232)) = sel_registerName("operatingSystemVersion");
|
||||
<<(cast(*Selector) (data + 240)) = sel_registerName("processorCount");
|
||||
<<(cast(*Selector) (data + 248)) = sel_registerName("activeProcessorCount");
|
||||
<<(cast(*Selector) (data + 256)) = sel_registerName("physicalMemory");
|
||||
<<(cast(*Selector) (data + 264)) = sel_registerName("systemUptime");
|
||||
<<(cast(*Selector) (data + 272)) = sel_registerName("automaticTerminationSupportEnabled");
|
||||
<<(cast(*Selector) (data + 280)) = sel_registerName("setAutomaticTerminationSupportEnabled:");
|
||||
<<(cast(*Selector) (data + 288)) = sel_registerName("detachNewThreadSelector:toTarget:withObject:");
|
||||
<<(cast(*Selector) (data + 296)) = sel_registerName("isMultiThreaded");
|
||||
<<(cast(*Selector) (data + 304)) = sel_registerName("object");
|
||||
<<(cast(*Selector) (data + 312)) = sel_registerName("defaultCenter");
|
||||
<<(cast(*Selector) (data + 320)) = sel_registerName("addObserver:selector:name:object:");
|
||||
<<(cast(*Selector) (data + 328)) = sel_registerName("URLWithString:");
|
||||
<<(cast(*Selector) (data + 336)) = sel_registerName("fileURLWithPath:");
|
||||
<<(cast(*Selector) (data + 344)) = sel_registerName("fileURLWithPath:isDirectory:");
|
||||
<<(cast(*Selector) (data + 352)) = sel_registerName("path");
|
||||
<<(cast(*Selector) (data + 360)) = sel_registerName("URLByDeletingLastPathComponent");
|
||||
<<(cast(*Selector) (data + 368)) = sel_registerName("hasDirectoryPath");
|
||||
<<(cast(*Selector) (data + 376)) = sel_registerName("URLByAppendingPathComponent:");
|
||||
<<(cast(*Selector) (data + 384)) = sel_registerName("lastPathComponent");
|
||||
<<(cast(*Selector) (data + 392)) = sel_registerName("bytes");
|
||||
<<(cast(*Selector) (data + 400)) = sel_registerName("length");
|
||||
<<(cast(*Selector) (data + 408)) = sel_registerName("arrayWithObject:");
|
||||
<<(cast(*Selector) (data + 416)) = sel_registerName("arrayWithObjects:count:");
|
||||
<<(cast(*Selector) (data + 424)) = sel_registerName("containsObject:");
|
||||
<<(cast(*Selector) (data + 432)) = sel_registerName("objectAtIndex:");
|
||||
<<(cast(*Selector) (data + 440)) = sel_registerName("count");
|
||||
<<(cast(*Selector) (data + 448)) = sel_registerName("defaultManager");
|
||||
<<(cast(*Selector) (data + 456)) = sel_registerName("URLForDirectory:inDomain:appropriateForURL:create:error:");
|
||||
<<(cast(*Selector) (data + 464)) = sel_registerName("currentHost");
|
||||
<<(cast(*Selector) (data + 472)) = sel_registerName("localizedName");
|
||||
<<(cast(*Selector) (data + 480)) = sel_registerName("localizedDescription");
|
||||
|
||||
//
|
||||
// #insert text. Generated from /opt/jai/modules/Objective_C/module.jai:56.
|
||||
//
|
||||
<<(cast(*Selector) (data + 0)) = sel_registerName("alloc");
|
||||
<<(cast(*Selector) (data + 8)) = sel_registerName("objc:copy");
|
||||
<<(cast(*Selector) (data + 16)) = sel_registerName("autorelease");
|
||||
<<(cast(*Selector) (data + 24)) = sel_registerName("release");
|
||||
<<(cast(*Selector) (data + 32)) = sel_registerName("retain");
|
||||
<<(cast(*Selector) (data + 40)) = sel_registerName("class");
|
||||
<<(cast(*Selector) (data + 48)) = sel_registerName("superclass");
|
||||
<<(cast(*Selector) (data + 56)) = sel_registerName("isEqual:");
|
||||
<<(cast(*Selector) (data + 64)) = sel_registerName("init");
|
||||
<<(cast(*Selector) (data + 72)) = sel_registerName("addItem:");
|
||||
|
||||
//
|
||||
// #insert text. Generated from /opt/jai/modules/Objective_C/AppKit.jai:379.
|
||||
//
|
||||
_nswindowcontroller_data: [72] u8; // size of NSWindowController minus size of parent class
|
||||
|
||||
//
|
||||
// #insert text. Generated from /opt/jai/modules/Objective_C/AppKit.jai:373.
|
||||
//
|
||||
_nsresponder_data: [24] u8; // size of NSResponder minus size of parent class
|
||||
|
||||
//
|
||||
// #insert text. Generated from /opt/jai/modules/Objective_C/AppKit.jai:898.
|
||||
//
|
||||
_nsviewcontroller_data: [88] u8; // size of NSViewController minus size of parent class
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
17
src/ui.jai
17
src/ui.jai
@ -457,22 +457,33 @@ ui_draw_label :: (using label: *Label) {
|
||||
// Restore modified GL state
|
||||
// restore_opengl_state(*opengl_state);
|
||||
|
||||
n : s32 = xx label.text.count;
|
||||
//n : s32 = xx label.text.count;
|
||||
|
||||
midline : Vector2 = pos + Vector2.{cast(float, margin + padding), xx (size.y / 2.0)};
|
||||
|
||||
this_size : Vector2;
|
||||
idx : s32;
|
||||
while this_size.x < label.max_size.x {
|
||||
word_size, word_max_descent, read := next_word_size(label.font, string.{label.text.count, label.text.data}, n + idx, label.max_size.x);
|
||||
row_start : s32;
|
||||
row_end : s32;
|
||||
while idx < label.text.count {
|
||||
word_size, word_max_descent, read := next_word_size(label.font, string.{label.text.count, label.text.data}, idx, label.max_size.x);
|
||||
|
||||
if this_size.x + word_size.x > label.max_size.x {
|
||||
render_text(font, .{row_end - row_start, label.text.data + row_start},
|
||||
midline, colour = font_colour);
|
||||
row_start = row_end;
|
||||
midline.y += label.font.face.size.metrics.height >> 6;
|
||||
}
|
||||
|
||||
this_size.x += word_size.x;
|
||||
this_size.y = max(this_size.y, word_size.y);
|
||||
idx += read;
|
||||
row_end += read;
|
||||
}
|
||||
|
||||
if row_start < row_end {
|
||||
render_text(font, .{row_end - row_start, label.text.data + row_start},
|
||||
midline, colour = font_colour);
|
||||
}
|
||||
|
||||
//label_size := Vector2.{xx Simp.prepare_text(font, text), xx font.character_height};
|
||||
|
||||
13
ui.rad
13
ui.rad
@ -1,9 +1,11 @@
|
||||
// raddbg 0.9.20 project file
|
||||
|
||||
recent_file: path: "src/ui.jai"
|
||||
recent_file: path: "src/main.jai"
|
||||
recent_file: path: "../../../../jai/modules/basic/array.jai"
|
||||
recent_file: path: "src/text.jai"
|
||||
recent_file: path: "src/ui.jai"
|
||||
recent_file: path: "../../../../jai/modules/basic/array.jai"
|
||||
recent_file: path: "../../../../jai/modules/basic/module.jai"
|
||||
recent_file: path: "../../../../jai/modules/default_allocator/module.jai"
|
||||
recent_file: path: "src/main.jai"
|
||||
recent_file: path: "modules/kb_text_shape/kb_text_shape.h"
|
||||
recent_file: path: "../../../../jai/modules/runtime_support.jai"
|
||||
target:
|
||||
@ -14,7 +16,6 @@ target:
|
||||
}
|
||||
breakpoint:
|
||||
{
|
||||
source_location: "src/ui.jai:413:1"
|
||||
hit_count: 0
|
||||
enabled: 0
|
||||
source_location: "src/ui.jai:469:1"
|
||||
hit_count: 1
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user